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
88 !$ use omp_lib
89 implicit none
90 private
91
92 !Struct to arrange our multigridlevels
93 type, private :: multigrid_t
94 type(dofmap_t), pointer :: dof
95 type(gs_t), pointer :: gs_h
96 type(space_t), pointer :: xh
97 type(coef_t), pointer :: coef
98 type(bc_list_t), pointer :: bclst
99 type(schwarz_t), pointer :: schwarz
100 type(field_t), pointer :: e
101 end type multigrid_t
102
103 type, public, extends(pc_t) :: hsmg_t
104 type(mesh_t), pointer :: msh
105 integer :: nlvls
106 type(multigrid_t), allocatable :: grids(:)
107 type(gs_t) :: gs_crs, gs_mg
108 type(space_t) :: xh_crs, xh_mg
109 type(dofmap_t) :: dm_crs, dm_mg
110 type(coef_t) :: c_crs, c_mg
111 type(dirichlet_t) :: bc_crs, bc_mg, bc_reg
112 type(bc_list_t) :: bclst_crs, bclst_mg, bclst_reg
113 type(schwarz_t) :: schwarz, schwarz_mg, schwarz_crs
114 type(field_t) :: e, e_mg, e_crs
115 type(field_t) :: wf
116 class(ksp_t), allocatable :: crs_solver
117 type(tamg_solver_t), allocatable :: amg_solver
118 integer :: niter = 10
119 class(pc_t), allocatable :: pc_crs
120 class(ax_t), allocatable :: ax
121 real(kind=rp), allocatable :: r(:)
122 type(interpolator_t) :: interp_fine_mid
123 type(interpolator_t) :: interp_mid_crs
124 real(kind=rp), allocatable :: w(:)
125 type(c_ptr) :: w_d = c_null_ptr
126 type(c_ptr) :: r_d = c_null_ptr
127 type(c_ptr) :: hsmg_event
128 type(c_ptr) :: gs_event
129 contains
130 procedure, pass(this) :: init => hsmg_init
131 procedure, pass(this) :: free => hsmg_free
132 procedure, pass(this) :: solve => hsmg_solve
133 procedure, pass(this) :: update => hsmg_set_h
134 end type hsmg_t
135
136contains
137
139 subroutine hsmg_init(this, msh, Xh, coef, dof, gs_h, bclst, crs_pctype)
140 class(hsmg_t), intent(inout), target :: this
141 type(mesh_t), intent(inout), target :: msh
142 type(space_t), intent(inout), target :: Xh
143 type(coef_t), intent(in), target :: coef
144 type(dofmap_t), intent(in), target :: dof
145 type(gs_t), intent(inout), target :: gs_h
146 type(bc_list_t), intent(inout), target :: bclst
147 character(len=*), optional :: crs_pctype
148 integer :: n, i
149 integer :: lx_crs, lx_mid
150
151 call this%free()
152 this%nlvls = 3
153 lx_crs = 2
154 if (xh%lx .lt. 5) then
155 lx_mid = max(xh%lx-1,3)
156
157 if(xh%lx .le. 2) then
158 call neko_error('Polynomial order < 2 not supported for hsmg precon')
159 end if
160
161 else
162 lx_mid = 4
163 end if
164 this%msh => msh
165 allocate(this%grids(this%nlvls))
166 allocate(this%w(dof%size()))
167 allocate(this%r(dof%size()))
168
169
170 ! Compute all elements as if they are deformed
171 call msh%all_deformed()
172
173 n = dof%size()
174 call this%e%init(dof, 'work array')
175 call this%wf%init(dof, 'work 2')
176
177 call this%Xh_crs%init(gll, lx_crs, lx_crs, lx_crs)
178 call this%dm_crs%init(msh, this%Xh_crs)
179 call this%gs_crs%init(this%dm_crs)
180 call this%e_crs%init(this%dm_crs, 'work crs')
181 call this%c_crs%init(this%gs_crs)
182
183 call this%Xh_mg%init(gll, lx_mid, lx_mid, lx_mid)
184 call this%dm_mg%init(msh, this%Xh_mg)
185 call this%gs_mg%init(this%dm_mg)
186 call this%e_mg%init(this%dm_mg, 'work midl')
187 call this%c_mg%init(this%gs_mg)
188
189 ! Create backend specific Ax operator
190 call ax_helm_factory(this%ax, full_formulation = .false.)
191
192 ! Create a backend specific preconditioner
193 call precon_factory(this%pc_crs, 'jacobi')
194
195 call this%bc_crs%init_base(this%c_crs)
196 call this%bc_mg%init_base(this%c_mg)
197 call this%bc_reg%init_base(coef)
198 if (bclst%size .gt. 0) then
199 do i = 1, bclst%size
200 call this%bc_reg%mark_facets(bclst%items(i)%ptr%marked_facet)
201 call this%bc_crs%mark_facets(bclst%items(i)%ptr%marked_facet)
202 call this%bc_mg%mark_facets(bclst%items(i)%ptr%marked_facet)
203 end do
204 end if
205 call this%bc_reg%finalize()
206 call this%bc_reg%set_g(real(0d0, rp))
207 call this%bclst_reg%init()
208 call this%bclst_reg%append(this%bc_reg)
209
210 call this%bc_crs%finalize()
211 call this%bc_crs%set_g(real(0d0, rp))
212 call this%bclst_crs%init()
213 call this%bclst_crs%append(this%bc_crs)
214
215 call this%bc_mg%finalize()
216 call this%bc_mg%set_g(0.0_rp)
217 call this%bclst_mg%init()
218 call this%bclst_mg%append(this%bc_mg)
219
220 call this%schwarz%init(xh, dof, gs_h, this%bclst_reg, msh)
221 call this%schwarz_mg%init(this%Xh_mg, this%dm_mg, this%gs_mg,&
222 this%bclst_mg, msh)
223
224 call this%interp_fine_mid%init(xh, this%Xh_mg)
225 call this%interp_mid_crs%init(this%Xh_mg, this%Xh_crs)
226
227 call hsmg_fill_grid(dof, gs_h, xh, coef, this%bclst_reg, this%schwarz, &
228 this%e, this%grids, 3)
229 call hsmg_fill_grid(this%dm_mg, this%gs_mg, this%Xh_mg, this%c_mg, &
230 this%bclst_mg, this%schwarz_mg, this%e_mg, &
231 this%grids, 2)
232 call hsmg_fill_grid(this%dm_crs, this%gs_crs, this%Xh_crs, &
233 this%c_crs, this%bclst_crs, this%schwarz_crs, &
234 this%e_crs, this%grids, 1)
235
236 call hsmg_set_h(this)
237 if (neko_bcknd_device .eq. 1) then
238 call device_map(this%w, this%w_d, n)
239 call device_map(this%r, this%r_d, n)
240 end if
241
242 select type(pc => this%pc_crs)
243 type is (jacobi_t)
244 call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
245 type is (sx_jacobi_t)
246 call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
247 type is (device_jacobi_t)
248 call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
249 end select
250
251 call device_event_create(this%hsmg_event, 2)
252 call device_event_create(this%gs_event, 2)
253
254 ! Create a backend specific krylov solver
255 if (present(crs_pctype)) then
256 if (trim(crs_pctype) .eq. 'tamg') then
257 if (neko_bcknd_device .eq. 1) then
258 call neko_error('Tree-amg only supported for CPU')
259 end if
260
261 allocate(this%amg_solver)
262
263 call this%amg_solver%init(this%ax, this%grids(1)%e%Xh, &
264 this%grids(1)%coef, this%msh, this%grids(1)%gs_h, 4, &
265 this%grids(1)%bclst, 1)
266 else
267 call krylov_solver_factory(this%crs_solver, &
268 this%dm_crs%size(), trim(crs_pctype), ksp_max_iter, m = this%pc_crs)
269 end if
270 else
271 call krylov_solver_factory(this%crs_solver, &
272 this%dm_crs%size(), 'cg', ksp_max_iter, m = this%pc_crs)
273 end if
274
275
276
277
278 end subroutine hsmg_init
279
280 subroutine hsmg_set_h(this)
281 class(hsmg_t), intent(inout) :: this
282! integer :: i
283 !Yeah I dont really know what to do here. For incompressible flow not much happens
284 this%grids(1)%coef%ifh2 = .false.
285 call copy(this%grids(1)%coef%h1, this%grids(3)%coef%h1, &
286 this%grids(1)%dof%size())
287 if (neko_bcknd_device .eq. 1) then
288 call device_copy(this%grids(1)%coef%h1_d, this%grids(3)%coef%h1_d, &
289 this%grids(1)%dof%size())
290 end if
291 end subroutine hsmg_set_h
292
293
294 subroutine hsmg_fill_grid(dof, gs_h, Xh, coef, bclst, schwarz, e, grids, l)
295 type(dofmap_t), target, intent(in) :: dof
296 type(gs_t), target, intent(in) :: gs_h
297 type(space_t), target, intent(in) :: Xh
298 type(coef_t), target, intent(in) :: coef
299 type(bc_list_t), target, intent(in) :: bclst
300 type(schwarz_t), target, intent(in) :: schwarz
301 type(field_t), target, intent(in) :: e
302 integer, intent(in) :: l
303 type(multigrid_t), intent(inout), dimension(l) :: grids
304
305
306 grids(l)%dof => dof
307 grids(l)%gs_h => gs_h
308 grids(l)%Xh => xh
309 grids(l)%coef => coef
310 grids(l)%bclst => bclst
311 grids(l)%schwarz => schwarz
312 grids(l)%e => e
313
314 end subroutine hsmg_fill_grid
315
316 subroutine hsmg_free(this)
317 class(hsmg_t), intent(inout) :: this
318
319 if (allocated(this%ax)) then
320 deallocate(this%ax)
321 end if
322
323 if (allocated(this%grids)) then
324 deallocate(this%grids)
325 end if
326
327 if (allocated(this%w)) then
328 deallocate(this%w)
329 end if
330
331 if (allocated(this%r)) then
332 deallocate(this%r)
333 end if
334
335 call this%schwarz%free()
336 call this%schwarz_mg%free()
337
338 call this%c_crs%free()
339 call this%c_mg%free()
340 call this%e%free()
341 call this%e_mg%free()
342 call this%e_crs%free()
343
344 call this%gs_crs%free()
345 call this%gs_mg%free()
346 call this%interp_mid_crs%free()
347 call this%interp_fine_mid%free()
348
349 if (allocated(this%crs_solver)) then
350 call krylov_solver_destroy(this%crs_solver)
351 deallocate(this%crs_solver)
352 end if
353
354 if (allocated(this%pc_crs)) then
355 call precon_destroy(this%pc_crs)
356 end if
357
358 end subroutine hsmg_free
359
361 subroutine hsmg_solve(this, z, r, n)
362 integer, intent(in) :: n
363 class(hsmg_t), intent(inout) :: this
364 real(kind=rp), dimension(n), intent(inout) :: z
365 real(kind=rp), dimension(n), intent(inout) :: r
366 type(c_ptr) :: z_d, r_d
367 type(ksp_monitor_t) :: crs_info
368 integer :: thrdid, nthrds
369
370 call profiler_start_region('HSMG_solve', 8)
371 if (neko_bcknd_device .eq. 1) then
372 z_d = device_get_ptr(z)
373 r_d = device_get_ptr(r)
374 !We should not work with the input
375 call device_copy(this%r_d, r_d, n)
376 call this%bclst_reg%apply_scalar(r, n)
377
378 !OVERLAPPING Schwarz exchange and solve
379 !! DOWNWARD Leg of V-cycle, we are pretty hardcoded here but w/e
380 call device_col2(this%r_d, this%grids(3)%coef%mult_d, &
381 this%grids(3)%dof%size())
382 !Restrict to middle level
383 call this%interp_fine_mid%map(this%e%x, this%r, &
384 this%msh%nelv, this%grids(2)%Xh)
385 call this%grids(2)%gs_h%op(this%e%x, &
386 this%grids(2)%dof%size(), gs_op_add, this%gs_event)
387 call device_event_sync(this%gs_event)
388 call device_copy(this%r_d, r_d, n)
389 call this%bclst_reg%apply_scalar(r, n)
390 call device_copy(this%w_d, this%e%x_d, this%grids(2)%dof%size())
391 call this%bclst_mg%apply_scalar(this%w, this%grids(2)%dof%size())
392 !OVERLAPPING Schwarz exchange and solve
393 call device_col2(this%w_d, this%grids(2)%coef%mult_d, &
394 this%grids(2)%dof%size())
395 !restrict residual to crs
396 call this%interp_mid_crs%map(this%wf%x, this%w, this%msh%nelv, &
397 this%grids(1)%Xh)
398 !Crs solve
399 call device_copy(this%w_d, this%e%x_d, this%grids(2)%dof%size())
400 call this%bclst_mg%apply_scalar(this%w, this%grids(2)%dof%size())
401
402 !$omp parallel private(thrdid, nthrds)
403
404 thrdid = 0
405 nthrds = 1
406 !$ thrdid = omp_get_thread_num()
407 !$ nthrds = omp_get_num_threads()
408
409 if (thrdid .eq. 0) then
410 call profiler_start_region('HSMG_schwarz', 9)
411 call this%grids(3)%schwarz%compute(z, this%r)
412 call this%grids(2)%schwarz%compute(this%grids(2)%e%x, this%w)
413 call profiler_end_region('HSMG_schwarz', 9)
414 end if
415 if (nthrds .eq. 1 .or. thrdid .eq. 1) then
416 call profiler_start_region('HSMG_coarse_grid', 10)
417 call this%grids(1)%gs_h%op(this%wf%x, &
418 this%grids(1)%dof%size(), gs_op_add, this%gs_event)
419 call device_event_sync(this%gs_event)
420 call this%grids(1)%bclst%apply_scalar(this%wf%x, &
421 this%grids(1)%dof%size())
422 call profiler_start_region('HSMG_coarse_solve', 11)
423 crs_info = this%crs_solver%solve(this%Ax, this%grids(1)%e, &
424 this%wf%x, &
425 this%grids(1)%dof%size(), &
426 this%grids(1)%coef, &
427 this%grids(1)%bclst, &
428 this%grids(1)%gs_h, this%niter)
429 call profiler_end_region('HSMG_coarse_solve', 11)
430 call this%grids(1)%bclst%apply_scalar(this%grids(1)%e%x,&
431 this%grids(1)%dof%size())
432 call profiler_end_region('HSMG_coarse_grid', 10)
433 end if
434 !$omp end parallel
435
436 call this%interp_mid_crs%map(this%w, this%grids(1)%e%x, &
437 this%msh%nelv, this%grids(2)%Xh)
438 call device_add2(this%grids(2)%e%x_d, this%w_d, this%grids(2)%dof%size())
439
440 call this%interp_fine_mid%map(this%w, this%grids(2)%e%x, &
441 this%msh%nelv, this%grids(3)%Xh)
442 call device_add2(z_d, this%w_d, this%grids(3)%dof%size())
443 call this%grids(3)%gs_h%op(z, this%grids(3)%dof%size(), &
444 gs_op_add, this%gs_event)
445 call device_event_sync(this%gs_event)
446 call device_col2(z_d, this%grids(3)%coef%mult_d, &
447 this%grids(3)%dof%size())
448 else
449 !We should not work with the input
450 call copy(this%r, r, n)
451
452 !OVERLAPPING Schwarz exchange and solve
453 call this%grids(3)%schwarz%compute(z, this%r)
454 ! DOWNWARD Leg of V-cycle, we are pretty hardcoded here but w/e
455 call col2(this%r, this%grids(3)%coef%mult, &
456 this%grids(3)%dof%size())
457 !Restrict to middle level
458 call this%interp_fine_mid%map(this%w, this%r, &
459 this%msh%nelv, this%grids(2)%Xh)
460 call this%grids(2)%gs_h%op(this%w, this%grids(2)%dof%size(), gs_op_add)
461 !OVERLAPPING Schwarz exchange and solve
462 call this%grids(2)%schwarz%compute(this%grids(2)%e%x, this%w)
463 call col2(this%w, this%grids(2)%coef%mult, this%grids(2)%dof%size())
464 !restrict residual to crs
465 call this%interp_mid_crs%map(this%r, this%w, &
466 this%msh%nelv, this%grids(1)%Xh)
467 !Crs solve
468
469 call this%grids(1)%gs_h%op(this%r, this%grids(1)%dof%size(), gs_op_add)
470 call this%grids(1)%bclst%apply(this%r, this%grids(1)%dof%size())
471
472 call profiler_start_region('HSMG_coarse-solve', 11)
473 if (allocated(this%amg_solver)) then
474 call this%amg_solver%solve(this%grids(1)%e%x, this%r, this%grids(1)%dof%size())
475 else
476 crs_info = this%crs_solver%solve(this%Ax, this%grids(1)%e, this%r, &
477 this%grids(1)%dof%size(), &
478 this%grids(1)%coef, &
479 this%grids(1)%bclst, &
480 this%grids(1)%gs_h, this%niter)
481 end if
482 call profiler_end_region('HSMG_coarse-solve', 11)
483
484 call this%grids(1)%bclst%apply_scalar(this%grids(1)%e%x, &
485 this%grids(1)%dof%size())
486
487
488 call this%interp_mid_crs%map(this%w, this%grids(1)%e%x, &
489 this%msh%nelv, this%grids(2)%Xh)
490 call add2(this%grids(2)%e%x, this%w, this%grids(2)%dof%size())
491
492 call this%interp_fine_mid%map(this%w, this%grids(2)%e%x, &
493 this%msh%nelv, this%grids(3)%Xh)
494 call add2(z, this%w, this%grids(3)%dof%size())
495 call this%grids(3)%gs_h%op(z, this%grids(3)%dof%size(), gs_op_add)
496 call col2(z, this%grids(3)%coef%mult, this%grids(3)%dof%size())
497
498 end if
499 call profiler_end_region('HSMG_solve', 8)
500 end subroutine hsmg_solve
501end module hsmg
double real
Return the device pointer for an associated Fortran array.
Definition device.F90:81
Map a Fortran array to a device (allocate and associate)
Definition device.F90:57
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:1229
subroutine, public device_event_create(event, flags)
Create a device event queue.
Definition device.F90:1164
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:362
subroutine hsmg_set_h(this)
Definition pc_hsmg.f90:281
subroutine hsmg_init(this, msh, xh, coef, dof, gs_h, bclst, crs_pctype)
Definition pc_hsmg.f90:140
subroutine hsmg_free(this)
Definition pc_hsmg.f90:317
subroutine hsmg_fill_grid(dof, gs_h, xh, coef, bclst, schwarz, e, grids, l)
Definition pc_hsmg.f90:295
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
Base type for a matrix-vector product providing .
Definition ax.f90:43
Base type for a boundary condition.
Definition bc.f90:51
A list of allocatable `bc_t`. Follows the standard interface of lists.
Definition bc_list.f90:46
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:44
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.
#define max(a, b)
Definition tensor.cu:40