Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
pc_hsmg.f90
Go to the documentation of this file.
1! Copyright (c) 2008-2020, UCHICAGO ARGONNE, LLC.
2!
3! The UChicago Argonne, LLC as Operator of Argonne National
4! Laboratory holds copyright in the Software. The copyright holder
5! reserves all rights except those expressly granted to licensees,
6! and U.S. Government license rights.
7!
8! Redistribution and use in source and binary forms, with or without
9! modification, are permitted provided that the following conditions
10! are met:
11!
12! 1. Redistributions of source code must retain the above copyright
13! notice, this list of conditions and the disclaimer below.
14!
15! 2. Redistributions in binary form must reproduce the above copyright
16! notice, this list of conditions and the disclaimer (as noted below)
17! in the documentation and/or other materials provided with the
18! distribution.
19!
20! 3. Neither the name of ANL nor the names of its contributors
21! may be used to endorse or promote products derived from this software
22! without specific prior written permission.
23!
24! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
28! UCHICAGO ARGONNE, LLC, THE U.S. DEPARTMENT OF
29! ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
31! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33! THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34! (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36!
37! Additional BSD Notice
38! ---------------------
39! 1. This notice is required to be provided under our contract with
40! the U.S. Department of Energy (DOE). This work was produced at
41! Argonne National Laboratory under Contract
42! No. DE-AC02-06CH11357 with the DOE.
43!
44! 2. Neither the United States Government nor UCHICAGO ARGONNE,
45! LLC nor any of their employees, makes any warranty,
46! express or implied, or assumes any liability or responsibility for the
47! accuracy, completeness, or usefulness of any information, apparatus,
48! product, or process disclosed, or represents that its use would not
49! infringe privately-owned rights.
50!
51! 3. Also, reference herein to any specific commercial products, process,
52! or services by trade name, trademark, manufacturer or otherwise does
53! not necessarily constitute or imply its endorsement, recommendation,
54! or favoring by the United States Government or UCHICAGO ARGONNE LLC.
55! The views and opinions of authors expressed
56! herein do not necessarily state or reflect those of the United States
57! Government or UCHICAGO ARGONNE, LLC, and shall
58! not be used for advertising or product endorsement purposes.
59!
61module hsmg
63 use num_types, only : rp
64 use math, only : copy, col2, add2
65 use utils, only : neko_error
66 use precon, only : pc_t, precon_factory, precon_destroy
67 use ax_product, only : ax_t, ax_helm_factory
68 use gather_scatter, only : gs_t, gs_op_add
70 use bc, only: bc_t
71 use bc_list, only : bc_list_t
72 use dirichlet, only : dirichlet_t
73 use schwarz, only : schwarz_t
74 use jacobi, only : jacobi_t
75 use sx_jacobi, only : sx_jacobi_t
77 use device
80 use space, only : space_t, gll
81 use dofmap, only : dofmap_t
82 use field, only : field_t
83 use coefs, only : coef_t
84 use mesh, only : mesh_t
85 use krylov, only : ksp_t, ksp_monitor_t, ksp_max_iter, &
86 krylov_solver_factory, krylov_solver_destroy
89 use, intrinsic :: iso_c_binding, only : c_ptr, c_null_ptr, c_associated
90 !$ use omp_lib
91 implicit none
92 private
93
94 !Struct to arrange our multigridlevels
95 type, private :: multigrid_t
96 type(dofmap_t), pointer :: dof
97 type(gs_t), pointer :: gs_h
98 type(space_t), pointer :: xh
99 type(coef_t), pointer :: coef
100 type(bc_list_t), pointer :: bclst
101 type(schwarz_t), pointer :: schwarz
102 type(field_t), pointer :: e
103 end type multigrid_t
104
105 type, public, extends(pc_t) :: hsmg_t
106 type(mesh_t), pointer :: msh
107 integer :: nlvls
108 type(multigrid_t), allocatable :: grids(:)
109 type(gs_t) :: gs_crs, gs_mg
110 type(space_t) :: xh_crs, xh_mg
111 type(dofmap_t) :: dm_crs, dm_mg
112 type(coef_t) :: c_crs, c_mg
113 type(zero_dirichlet_t) :: bc_crs, bc_mg, bc_reg
114 type(bc_list_t) :: bclst_crs, bclst_mg, bclst_reg
115 type(schwarz_t) :: schwarz, schwarz_mg, schwarz_crs
116 type(field_t) :: e, e_mg, e_crs
117 type(field_t) :: wf
118 class(ksp_t), allocatable :: crs_solver
119 type(tamg_solver_t), allocatable :: amg_solver
120 integer :: niter = 10
121 class(pc_t), allocatable :: pc_crs
122 class(ax_t), allocatable :: ax
123 real(kind=rp), allocatable :: r(:)
124 type(interpolator_t) :: interp_fine_mid
125 type(interpolator_t) :: interp_mid_crs
126 real(kind=rp), allocatable :: w(:)
127 type(c_ptr) :: w_d = c_null_ptr
128 type(c_ptr) :: r_d = c_null_ptr
129 type(c_ptr) :: hsmg_event
130 type(c_ptr) :: gs_event
131 contains
132 procedure, pass(this) :: init => hsmg_init
133 procedure, pass(this) :: free => hsmg_free
134 procedure, pass(this) :: solve => hsmg_solve
135 procedure, pass(this) :: update => hsmg_set_h
136 end type hsmg_t
137
138contains
139
141 subroutine hsmg_init(this, msh, Xh, coef, dof, gs_h, bclst, crs_pctype)
142 class(hsmg_t), intent(inout), target :: this
143 type(mesh_t), intent(inout), target :: msh
144 type(space_t), intent(inout), target :: Xh
145 type(coef_t), intent(in), target :: coef
146 type(dofmap_t), intent(in), target :: dof
147 type(gs_t), intent(inout), target :: gs_h
148 type(bc_list_t), intent(inout), target :: bclst
149 character(len=*), optional :: crs_pctype
150 integer :: n, i
151 integer :: lx_crs, lx_mid
152 class(bc_t), pointer :: bc_i
153
154 call this%free()
155 this%nlvls = 3
156 lx_crs = 2
157 if (xh%lx .lt. 5) then
158 lx_mid = max(xh%lx-1,3)
159
160 if (xh%lx .le. 2) then
161 call neko_error('Polynomial order < 2 not supported for hsmg precon')
162 end if
163
164 else
165 lx_mid = 4
166 end if
167 this%msh => msh
168 allocate(this%grids(this%nlvls))
169 allocate(this%w(dof%size()))
170 allocate(this%r(dof%size()))
171
172
173 ! Compute all elements as if they are deformed
174 call msh%all_deformed()
175
176 n = dof%size()
177 call this%e%init(dof, 'work array')
178 call this%wf%init(dof, 'work 2')
179
180 call this%Xh_crs%init(gll, lx_crs, lx_crs, lx_crs)
181 call this%dm_crs%init(msh, this%Xh_crs)
182 call this%gs_crs%init(this%dm_crs)
183 call this%e_crs%init(this%dm_crs, 'work crs')
184 call this%c_crs%init(this%gs_crs)
185
186 call this%Xh_mg%init(gll, lx_mid, lx_mid, lx_mid)
187 call this%dm_mg%init(msh, this%Xh_mg)
188 call this%gs_mg%init(this%dm_mg)
189 call this%e_mg%init(this%dm_mg, 'work midl')
190 call this%c_mg%init(this%gs_mg)
191
192 ! Create backend specific Ax operator
193 call ax_helm_factory(this%ax, full_formulation = .false.)
194
195 ! Create a backend specific preconditioner
196 call precon_factory(this%pc_crs, 'jacobi')
197
198 call this%bc_crs%init_base(this%c_crs)
199 call this%bc_mg%init_base(this%c_mg)
200 call this%bc_reg%init_base(coef)
201 if (bclst%size() .gt. 0) then
202 do i = 1, bclst%size()
203 bc_i => bclst%get(i)
204 call this%bc_reg%mark_facets(bc_i%marked_facet)
205 bc_i => bclst%get(i)
206 call this%bc_crs%mark_facets(bc_i%marked_facet)
207 bc_i => bclst%get(i)
208 call this%bc_mg%mark_facets(bc_i%marked_facet)
209 end do
210 end if
211 call this%bc_reg%finalize()
212 call this%bc_crs%finalize()
213 call this%bc_mg%finalize()
214
215 call this%bclst_reg%init()
216 call this%bclst_crs%init()
217 call this%bclst_mg%init()
218
219 call this%bclst_reg%append(this%bc_reg)
220 call this%bclst_crs%append(this%bc_crs)
221 call this%bclst_mg%append(this%bc_mg)
222
223 call this%schwarz%init(xh, dof, gs_h, this%bclst_reg, msh)
224 call this%schwarz_mg%init(this%Xh_mg, this%dm_mg, this%gs_mg,&
225 this%bclst_mg, msh)
226
227 call this%interp_fine_mid%init(xh, this%Xh_mg)
228 call this%interp_mid_crs%init(this%Xh_mg, this%Xh_crs)
229
230 call hsmg_fill_grid(dof, gs_h, xh, coef, this%bclst_reg, this%schwarz, &
231 this%e, this%grids, 3)
232 call hsmg_fill_grid(this%dm_mg, this%gs_mg, this%Xh_mg, this%c_mg, &
233 this%bclst_mg, this%schwarz_mg, this%e_mg, &
234 this%grids, 2)
235 call hsmg_fill_grid(this%dm_crs, this%gs_crs, this%Xh_crs, &
236 this%c_crs, this%bclst_crs, this%schwarz_crs, &
237 this%e_crs, this%grids, 1)
238
239 call hsmg_set_h(this)
240 if (neko_bcknd_device .eq. 1) then
241 call device_map(this%w, this%w_d, n)
242 call device_map(this%r, this%r_d, n)
243 end if
244
245 select type (pc => this%pc_crs)
246 type is (jacobi_t)
247 call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
248 type is (sx_jacobi_t)
249 call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
250 type is (device_jacobi_t)
251 call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
252 end select
253
254 call device_event_create(this%hsmg_event, 2)
255 call device_event_create(this%gs_event, 2)
256
257 ! Create a backend specific krylov solver
258 if (present(crs_pctype)) then
259 if (trim(crs_pctype) .eq. 'tamg') then
260 if (neko_bcknd_device .eq. 1) then
261 call neko_error('Tree-amg only supported for CPU')
262 end if
263
264 allocate(this%amg_solver)
265
266 call this%amg_solver%init(this%ax, this%grids(1)%e%Xh, &
267 this%grids(1)%coef, this%msh, this%grids(1)%gs_h, 4, &
268 this%grids(1)%bclst, 1)
269 else
270 call krylov_solver_factory(this%crs_solver, &
271 this%dm_crs%size(), trim(crs_pctype), ksp_max_iter, &
272 m = this%pc_crs)
273 end if
274 else
275 call krylov_solver_factory(this%crs_solver, &
276 this%dm_crs%size(), 'cg', ksp_max_iter, m = this%pc_crs)
277 end if
278
279
280
281
282 end subroutine hsmg_init
283
284 subroutine hsmg_set_h(this)
285 class(hsmg_t), intent(inout) :: this
286 ! integer :: i
287 ! Yeah I dont really know what to do here. For incompressible flow not
288 ! much happens
289 this%grids(1)%coef%ifh2 = .false.
290 call copy(this%grids(1)%coef%h1, this%grids(3)%coef%h1, &
291 this%grids(1)%dof%size())
292 if (neko_bcknd_device .eq. 1) then
293 call device_copy(this%grids(1)%coef%h1_d, this%grids(3)%coef%h1_d, &
294 this%grids(1)%dof%size())
295 end if
296 end subroutine hsmg_set_h
297
298
299 subroutine hsmg_fill_grid(dof, gs_h, Xh, coef, bclst, schwarz, e, grids, l)
300 type(dofmap_t), target, intent(in) :: dof
301 type(gs_t), target, intent(in) :: gs_h
302 type(space_t), target, intent(in) :: Xh
303 type(coef_t), target, intent(in) :: coef
304 type(bc_list_t), target, intent(in) :: bclst
305 type(schwarz_t), target, intent(in) :: schwarz
306 type(field_t), target, intent(in) :: e
307 integer, intent(in) :: l
308 type(multigrid_t), intent(inout), dimension(l) :: grids
309
310
311 grids(l)%dof => dof
312 grids(l)%gs_h => gs_h
313 grids(l)%Xh => xh
314 grids(l)%coef => coef
315 grids(l)%bclst => bclst
316 grids(l)%schwarz => schwarz
317 grids(l)%e => e
318
319 end subroutine hsmg_fill_grid
320
321 subroutine hsmg_free(this)
322 class(hsmg_t), intent(inout) :: this
323
324 if (allocated(this%ax)) then
325 deallocate(this%ax)
326 end if
327
328 if (allocated(this%grids)) then
329 deallocate(this%grids)
330 end if
331
332 if (allocated(this%w)) then
333 deallocate(this%w)
334 end if
335
336 if (allocated(this%r)) then
337 deallocate(this%r)
338 end if
339
340 call this%schwarz%free()
341 call this%schwarz_mg%free()
342
343 call this%c_crs%free()
344 call this%c_mg%free()
345 call this%e%free()
346 call this%e_mg%free()
347 call this%e_crs%free()
348
349 call this%gs_crs%free()
350 call this%gs_mg%free()
351 call this%interp_mid_crs%free()
352 call this%interp_fine_mid%free()
353
354 if (allocated(this%crs_solver)) then
355 call krylov_solver_destroy(this%crs_solver)
356 deallocate(this%crs_solver)
357 end if
358
359 if (allocated(this%pc_crs)) then
360 call precon_destroy(this%pc_crs)
361 end if
362
363 end subroutine hsmg_free
364
366 subroutine hsmg_solve(this, z, r, n)
367 integer, intent(in) :: n
368 class(hsmg_t), intent(inout) :: this
369 real(kind=rp), dimension(n), intent(inout) :: z
370 real(kind=rp), dimension(n), intent(inout) :: r
371 type(c_ptr) :: z_d, r_d
372 type(ksp_monitor_t) :: crs_info
373 integer :: thrdid, nthrds
374
375 call profiler_start_region('HSMG_solve', 8)
376 if (neko_bcknd_device .eq. 1) then
377 z_d = device_get_ptr(z)
378 r_d = device_get_ptr(r)
379 !We should not work with the input
380 call device_copy(this%r_d, r_d, n)
381 call this%bclst_reg%apply_scalar(r, n)
382
383 !OVERLAPPING Schwarz exchange and solve
384 !! DOWNWARD Leg of V-cycle, we are pretty hardcoded here but w/e
385 call device_col2(this%r_d, this%grids(3)%coef%mult_d, &
386 this%grids(3)%dof%size())
387 !Restrict to middle level
388 call this%interp_fine_mid%map(this%e%x, this%r, &
389 this%msh%nelv, this%grids(2)%Xh)
390 call this%grids(2)%gs_h%op(this%e%x, &
391 this%grids(2)%dof%size(), gs_op_add, this%gs_event)
392 call device_event_sync(this%gs_event)
393 call device_copy(this%r_d, r_d, n)
394 call this%bclst_reg%apply_scalar(r, n)
395 call device_copy(this%w_d, this%e%x_d, this%grids(2)%dof%size())
396 call this%bclst_mg%apply_scalar(this%w, this%grids(2)%dof%size())
397 !OVERLAPPING Schwarz exchange and solve
398 call device_col2(this%w_d, this%grids(2)%coef%mult_d, &
399 this%grids(2)%dof%size())
400 !restrict residual to crs
401 call this%interp_mid_crs%map(this%wf%x, this%w, this%msh%nelv, &
402 this%grids(1)%Xh)
403 !Crs solve
404 call device_copy(this%w_d, this%e%x_d, this%grids(2)%dof%size())
405 call this%bclst_mg%apply_scalar(this%w, this%grids(2)%dof%size())
406
407 !$omp parallel private(thrdid, nthrds)
408
409 thrdid = 0
410 nthrds = 1
411 !$ thrdid = omp_get_thread_num()
412 !$ nthrds = omp_get_num_threads()
413
414 if (thrdid .eq. 0) then
415 call profiler_start_region('HSMG_schwarz', 9)
416 call this%grids(3)%schwarz%compute(z, this%r)
417 call this%grids(2)%schwarz%compute(this%grids(2)%e%x, this%w)
418 call profiler_end_region('HSMG_schwarz', 9)
419 end if
420 if (nthrds .eq. 1 .or. thrdid .eq. 1) then
421 call profiler_start_region('HSMG_coarse_grid', 10)
422 call this%grids(1)%gs_h%op(this%wf%x, &
423 this%grids(1)%dof%size(), gs_op_add, this%gs_event)
424 call device_event_sync(this%gs_event)
425 call this%grids(1)%bclst%apply_scalar(this%wf%x, &
426 this%grids(1)%dof%size())
427 call profiler_start_region('HSMG_coarse_solve', 11)
428 crs_info = this%crs_solver%solve(this%Ax, this%grids(1)%e, &
429 this%wf%x, &
430 this%grids(1)%dof%size(), &
431 this%grids(1)%coef, &
432 this%grids(1)%bclst, &
433 this%grids(1)%gs_h, this%niter)
434 call profiler_end_region('HSMG_coarse_solve', 11)
435 call this%grids(1)%bclst%apply_scalar(this%grids(1)%e%x,&
436 this%grids(1)%dof%size())
437 call profiler_end_region('HSMG_coarse_grid', 10)
438 end if
439 !$omp end parallel
440
441 call this%interp_mid_crs%map(this%w, this%grids(1)%e%x, &
442 this%msh%nelv, this%grids(2)%Xh)
443 call device_add2(this%grids(2)%e%x_d, this%w_d, this%grids(2)%dof%size())
444
445 call this%interp_fine_mid%map(this%w, this%grids(2)%e%x, &
446 this%msh%nelv, this%grids(3)%Xh)
447 call device_add2(z_d, this%w_d, this%grids(3)%dof%size())
448 call this%grids(3)%gs_h%op(z, this%grids(3)%dof%size(), &
449 gs_op_add, this%gs_event)
450 call device_event_sync(this%gs_event)
451 call device_col2(z_d, this%grids(3)%coef%mult_d, &
452 this%grids(3)%dof%size())
453 else
454 !We should not work with the input
455 call copy(this%r, r, n)
456
457 !OVERLAPPING Schwarz exchange and solve
458 call this%grids(3)%schwarz%compute(z, this%r)
459 ! DOWNWARD Leg of V-cycle, we are pretty hardcoded here but w/e
460 call col2(this%r, this%grids(3)%coef%mult, &
461 this%grids(3)%dof%size())
462 !Restrict to middle level
463 call this%interp_fine_mid%map(this%w, this%r, &
464 this%msh%nelv, this%grids(2)%Xh)
465 call this%grids(2)%gs_h%op(this%w, this%grids(2)%dof%size(), gs_op_add)
466 !OVERLAPPING Schwarz exchange and solve
467 call this%grids(2)%schwarz%compute(this%grids(2)%e%x, this%w)
468 call col2(this%w, this%grids(2)%coef%mult, this%grids(2)%dof%size())
469 !restrict residual to crs
470 call this%interp_mid_crs%map(this%r, this%w, &
471 this%msh%nelv, this%grids(1)%Xh)
472 !Crs solve
473
474 call this%grids(1)%gs_h%op(this%r, this%grids(1)%dof%size(), gs_op_add)
475 call this%grids(1)%bclst%apply(this%r, this%grids(1)%dof%size())
476
477 call profiler_start_region('HSMG_coarse-solve', 11)
478 if (allocated(this%amg_solver)) then
479 call this%amg_solver%solve(this%grids(1)%e%x, this%r, &
480 this%grids(1)%dof%size())
481 else
482 crs_info = this%crs_solver%solve(this%Ax, this%grids(1)%e, this%r, &
483 this%grids(1)%dof%size(), &
484 this%grids(1)%coef, &
485 this%grids(1)%bclst, &
486 this%grids(1)%gs_h, this%niter)
487 end if
488 call profiler_end_region('HSMG_coarse-solve', 11)
489
490 call this%grids(1)%bclst%apply_scalar(this%grids(1)%e%x, &
491 this%grids(1)%dof%size())
492
493
494 call this%interp_mid_crs%map(this%w, this%grids(1)%e%x, &
495 this%msh%nelv, this%grids(2)%Xh)
496 call add2(this%grids(2)%e%x, this%w, this%grids(2)%dof%size())
497
498 call this%interp_fine_mid%map(this%w, this%grids(2)%e%x, &
499 this%msh%nelv, this%grids(3)%Xh)
500 call add2(z, this%w, this%grids(3)%dof%size())
501 call this%grids(3)%gs_h%op(z, this%grids(3)%dof%size(), gs_op_add)
502 call col2(z, this%grids(3)%coef%mult, this%grids(3)%dof%size())
503
504 end if
505 call profiler_end_region('HSMG_solve', 8)
506 end subroutine hsmg_solve
507end module hsmg
Return the device pointer for an associated Fortran array.
Definition device.F90:92
Map a Fortran array to a device (allocate and associate)
Definition device.F90:68
Defines a Matrix-vector product.
Definition ax.f90:34
Defines a list of bc_t.
Definition bc_list.f90:34
Defines a boundary condition.
Definition bc.f90:34
Coefficients.
Definition coef.f90:34
Jacobi preconditioner accelerator backend.
subroutine, public device_add2(a_d, b_d, n)
Vector addition .
subroutine, public device_col2(a_d, b_d, n)
Vector multiplication .
subroutine, public device_copy(a_d, b_d, n)
Copy a vector .
Device abstraction, common interface for various accelerators.
Definition device.F90:34
subroutine, public device_event_sync(event)
Synchronize an event.
Definition device.F90:1241
subroutine, public device_event_create(event, flags)
Create a device event queue.
Definition device.F90:1176
Defines a dirichlet boundary condition.
Definition dirichlet.f90:34
Defines a mapping of the degrees of freedom.
Definition dofmap.f90:35
Defines a field.
Definition field.f90:34
Gather-scatter.
Krylov preconditioner.
Definition pc_hsmg.f90:61
subroutine hsmg_solve(this, z, r, n)
The h1mg preconditioner from Nek5000.
Definition pc_hsmg.f90:367
subroutine hsmg_set_h(this)
Definition pc_hsmg.f90:285
subroutine hsmg_init(this, msh, xh, coef, dof, gs_h, bclst, crs_pctype)
Definition pc_hsmg.f90:142
subroutine hsmg_free(this)
Definition pc_hsmg.f90:322
subroutine hsmg_fill_grid(dof, gs_h, xh, coef, bclst, schwarz, e, grids, l)
Definition pc_hsmg.f90:300
Routines to interpolate between different spaces.
Jacobi preconditioner.
Definition pc_jacobi.f90:34
Implements the base abstract type for Krylov solvers plus helper types.
Definition krylov.f90:34
integer, parameter, public ksp_max_iter
Maximum number of iters.
Definition krylov.f90:51
Definition math.f90:60
subroutine, public add2(a, b, n)
Vector addition .
Definition math.f90:586
subroutine, public col2(a, b, n)
Vector multiplication .
Definition math.f90:728
subroutine, public copy(a, b, n)
Copy a vector .
Definition math.f90:238
Defines a mesh.
Definition mesh.f90:34
Build configurations.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
Krylov preconditioner.
Definition precon.f90:34
Profiling interface.
Definition profiler.F90:34
subroutine, public profiler_start_region(name, region_id)
Started a named (name) profiler region.
Definition profiler.F90:78
subroutine, public profiler_end_region(name, region_id)
End the most recently started profiler region.
Definition profiler.F90:109
Overlapping schwarz solves.
Definition schwarz.f90:61
Defines a function space.
Definition space.f90:34
integer, parameter, public gll
Definition space.f90:48
Jacobi preconditioner SX-Aurora backend.
Implements multigrid using the TreeAMG hierarchy structure. USE:
Utilities.
Definition utils.f90:35
Defines a zero-valued Dirichlet boundary condition.
Base type for a matrix-vector product providing .
Definition ax.f90:43
Base type for a boundary condition.
Definition bc.f90:54
A list of allocatable `bc_t`. Follows the standard interface of lists.
Definition bc_list.f90:47
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:55
Defines a jacobi preconditioner.
Generic Dirichlet boundary condition on .
Definition dirichlet.f90:47
Interpolation between two space::space_t.
Defines a jacobi preconditioner.
Definition pc_jacobi.f90:45
Type for storing initial and final residuals in a Krylov solver.
Definition krylov.f90:56
Base abstract type for a canonical Krylov method, solving .
Definition krylov.f90:68
Defines a canonical Krylov preconditioner.
Definition precon.f90:40
The function space for the SEM solution fields.
Definition space.f90:62
Defines a jacobi preconditioner for SX-Aurora.
Type for the TreeAMG solver.
Zero-valued Dirichlet boundary condition. Used for no-slip walls, but also for various auxillary cond...
#define max(a, b)
Definition tensor.cu:40