Neko  0.8.1
A portable framework for high-order spectral element flow simulations
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 !
61 module hsmg
62  use neko_config
63  use num_types
64  use math
65  use utils, only : neko_error
66  use precon, only : pc_t
67  use ax_product, only : ax_t
68  use ax_helm_fctry, only : ax_helm_factory
69  use gather_scatter
70  use interpolation
71  use bc
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
76  use device_jacobi, only : device_jacobi_t
77  use device
78  use device_math
79  use profiler
80  use space
81  use dofmap, only : dofmap_t
82  use field, only : field_t
83  use coefs, only : coef_t
84  use mesh, only : mesh_t
87  !$ use omp_lib
88  implicit none
89  private
90 
91  !Struct to arrange our multigridlevels
92  type, private :: multigrid_t
93  type(dofmap_t), pointer :: dof
94  type(gs_t), pointer :: gs_h
95  type(space_t), pointer :: xh
96  type(coef_t), pointer :: coef
97  type(bc_list_t), pointer :: bclst
98  type(schwarz_t), pointer :: schwarz
99  type(field_t), pointer :: e
100  end type multigrid_t
101 
102  type, public, extends(pc_t) :: hsmg_t
103  type(mesh_t), pointer :: msh
104  integer :: nlvls
105  type(multigrid_t), allocatable :: grids(:)
106  type(gs_t) :: gs_crs, gs_mg
107  type(space_t) :: xh_crs, xh_mg
108  type(dofmap_t) :: dm_crs, dm_mg
109  type(coef_t) :: c_crs, c_mg
110  type(dirichlet_t) :: bc_crs, bc_mg, bc_reg
111  type(bc_list_t) :: bclst_crs, bclst_mg, bclst_reg
112  type(schwarz_t) :: schwarz, schwarz_mg, schwarz_crs
113  type(field_t) :: e, e_mg, e_crs
114  type(field_t) :: wf
115  class(ksp_t), allocatable :: crs_solver
116  integer :: niter = 10
117  class(pc_t), allocatable :: pc_crs
118  class(ax_t), allocatable :: ax
119  real(kind=rp), allocatable :: r(:)
120  type(interpolator_t) :: interp_fine_mid
121  type(interpolator_t) :: interp_mid_crs
122  real(kind=rp), allocatable :: w(:)
123  type(c_ptr) :: w_d = c_null_ptr
124  type(c_ptr) :: r_d = c_null_ptr
125  type(c_ptr) :: hsmg_event
126  type(c_ptr) :: gs_event
127  contains
128  procedure, pass(this) :: init => hsmg_init
129  procedure, pass(this) :: free => hsmg_free
130  procedure, pass(this) :: solve => hsmg_solve
131  procedure, pass(this) :: update => hsmg_set_h
132  end type hsmg_t
133 
134 contains
135 
137  subroutine hsmg_init(this, msh, Xh, coef, dof, gs_h, bclst, crs_pctype)
138  class(hsmg_t), intent(inout), target :: this
139  type(mesh_t), intent(inout), target :: msh
140  type(space_t), intent(inout), target :: Xh
141  type(coef_t), intent(inout), target :: coef
142  type(dofmap_t), intent(inout), target :: dof
143  type(gs_t), intent(inout), target :: gs_h
144  type(bc_list_t), intent(inout), target :: bclst
145  character(len=*), optional :: crs_pctype
146  integer :: n, i
147  integer :: lx_crs, lx_mid
148 
149  call this%free()
150  this%nlvls = 3
151  lx_crs = 2
152  if (xh%lx .lt. 5) then
153  lx_mid = max(xh%lx-1,3)
154 
155  if(xh%lx .le. 2) call neko_error('Polynomial order < 2 not supported for hsmg precon')
156 
157  else
158  lx_mid = 4
159  end if
160  this%msh => msh
161  allocate(this%grids(this%nlvls))
162  allocate(this%w(dof%size()))
163  allocate(this%r(dof%size()))
164 
165 
166  ! Compute all elements as if they are deformed
167  call msh%all_deformed()
168 
169  n = dof%size()
170  call this%e%init(dof, 'work array')
171  call this%wf%init(dof, 'work 2')
172 
173  call this%Xh_crs%init(gll, lx_crs, lx_crs, lx_crs)
174  this%dm_crs = dofmap_t(msh, this%Xh_crs)
175  call this%gs_crs%init(this%dm_crs)
176  call this%e_crs%init(this%dm_crs, 'work crs')
177  call this%c_crs%init(this%gs_crs)
178 
179  call this%Xh_mg%init(gll, lx_mid, lx_mid, lx_mid)
180  this%dm_mg = dofmap_t(msh, this%Xh_mg)
181  call this%gs_mg%init(this%dm_mg)
182  call this%e_mg%init(this%dm_mg, 'work midl')
183  call this%c_mg%init(this%gs_mg)
184 
185  ! Create backend specific Ax operator
186  call ax_helm_factory(this%ax)
187 
188 
189  ! Create a backend specific preconditioner
190  ! Note we can't call the pc factory since hsmg is a pc...
191  if (neko_bcknd_sx .eq. 1) then
192  allocate(sx_jacobi_t::this%pc_crs)
193  else if (neko_bcknd_xsmm .eq. 1) then
194  allocate(jacobi_t::this%pc_crs)
195  else if (neko_bcknd_device .eq. 1) then
196  allocate(device_jacobi_t::this%pc_crs)
197  else
198  allocate(jacobi_t::this%pc_crs)
199  end if
200 
201  ! Create a backend specific krylov solver
202  if (present(crs_pctype)) then
203  call krylov_solver_factory(this%crs_solver, &
204  this%dm_crs%size(), trim(crs_pctype), ksp_max_iter, m = this%pc_crs)
205  else
206  call krylov_solver_factory(this%crs_solver, &
207  this%dm_crs%size(), 'cg', ksp_max_iter, m = this%pc_crs)
208  end if
209 
210  call this%bc_crs%init(this%c_crs)
211  call this%bc_mg%init(this%c_mg)
212  call this%bc_reg%init(coef)
213  if (bclst%n .gt. 0) then
214  do i = 1, bclst%n
215  call this%bc_reg%mark_facets(bclst%bc(i)%bcp%marked_facet)
216  call this%bc_crs%mark_facets(bclst%bc(i)%bcp%marked_facet)
217  call this%bc_mg%mark_facets(bclst%bc(i)%bcp%marked_facet)
218  end do
219  end if
220  call this%bc_reg%finalize()
221  call this%bc_reg%set_g(real(0d0,rp))
222  call bc_list_init(this%bclst_reg)
223  call bc_list_add(this%bclst_reg, this%bc_reg)
224 
225  call this%bc_crs%finalize()
226  call this%bc_crs%set_g(real(0d0,rp))
227  call bc_list_init(this%bclst_crs)
228  call bc_list_add(this%bclst_crs, this%bc_crs)
229 
230 
231  call this%bc_mg%finalize()
232  call this%bc_mg%set_g(0.0_rp)
233  call bc_list_init(this%bclst_mg)
234  call bc_list_add(this%bclst_mg, this%bc_mg)
235 
236  call this%schwarz%init(xh, dof, gs_h, this%bclst_reg, msh)
237  call this%schwarz_mg%init(this%Xh_mg, this%dm_mg, this%gs_mg,&
238  this%bclst_mg, msh)
239 
240  call this%interp_fine_mid%init(xh,this%Xh_mg)
241  call this%interp_mid_crs%init(this%Xh_mg,this%Xh_crs)
242 
243  call hsmg_fill_grid(dof, gs_h, xh, coef, this%bclst_reg, this%schwarz, &
244  this%e, this%grids, 3)
245  call hsmg_fill_grid(this%dm_mg, this%gs_mg, this%Xh_mg, this%c_mg, &
246  this%bclst_mg, this%schwarz_mg, this%e_mg, &
247  this%grids, 2)
248  call hsmg_fill_grid(this%dm_crs, this%gs_crs, this%Xh_crs, &
249  this%c_crs, this%bclst_crs, this%schwarz_crs, &
250  this%e_crs, this%grids, 1)
251 
252  call hsmg_set_h(this)
253  if (neko_bcknd_device .eq. 1) then
254  call device_map(this%w, this%w_d, n)
255  call device_map(this%r, this%r_d, n)
256  end if
257  select type(pc => this%pc_crs)
258  type is (jacobi_t)
259  call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
260  type is (sx_jacobi_t)
261  call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
262  type is (device_jacobi_t)
263  call pc%init(this%c_crs, this%dm_crs, this%gs_crs)
264  end select
265  call device_event_create(this%hsmg_event, 2)
266  call device_event_create(this%gs_event, 2)
267  end subroutine hsmg_init
268 
269  subroutine hsmg_set_h(this)
270  class(hsmg_t), intent(inout) :: this
271 ! integer :: i
272  !Yeah I dont really know what to do here. For incompressible flow not much happens
273  this%grids(1)%coef%ifh2 = .false.
274  call copy(this%grids(1)%coef%h1, this%grids(3)%coef%h1, &
275  this%grids(1)%dof%size())
276  if (neko_bcknd_device .eq. 1) then
277  call device_copy(this%grids(1)%coef%h1_d, this%grids(3)%coef%h1_d, &
278  this%grids(1)%dof%size())
279  end if
280  end subroutine hsmg_set_h
281 
282 
283  subroutine hsmg_fill_grid(dof, gs_h, Xh, coef, bclst, schwarz, e, grids, l)
284  type(dofmap_t), target, intent(in):: dof
285  type(gs_t), target, intent(in) :: gs_h
286  type(space_t), target, intent(in) :: Xh
287  type(coef_t), target, intent(in) :: coef
288  type(bc_list_t), target, intent(in) :: bclst
289  type(schwarz_t), target, intent(in) :: schwarz
290  type(field_t), target, intent(in) :: e
291  integer, intent(in) :: l
292  type(multigrid_t), intent(inout), dimension(l) :: grids
293 
294 
295  grids(l)%dof => dof
296  grids(l)%gs_h => gs_h
297  grids(l)%Xh => xh
298  grids(l)%coef => coef
299  grids(l)%bclst => bclst
300  grids(l)%schwarz => schwarz
301  grids(l)%e => e
302 
303  end subroutine hsmg_fill_grid
304 
305  subroutine hsmg_free(this)
306  class(hsmg_t), intent(inout) :: this
307 
308  if (allocated(this%ax)) then
309  deallocate(this%ax)
310  end if
311 
312  if (allocated(this%grids)) then
313  deallocate(this%grids)
314  end if
315 
316  if (allocated(this%w)) then
317  deallocate(this%w)
318  end if
319 
320  if (allocated(this%r)) then
321  deallocate(this%r)
322  end if
323 
324  call this%schwarz%free()
325  call this%schwarz_mg%free()
326 
327  call this%c_crs%free()
328  call this%c_mg%free()
329  call this%e%free()
330  call this%e_mg%free()
331  call this%e_crs%free()
332 
333  call this%gs_crs%free()
334  call this%gs_mg%free()
335  call this%interp_mid_crs%free()
336  call this%interp_fine_mid%free()
337 
338  if (allocated(this%crs_solver)) then
339  call krylov_solver_destroy(this%crs_solver)
340  deallocate(this%crs_solver)
341  end if
342 
343  if (allocated(this%pc_crs)) then
344  select type(pc => this%pc_crs)
345  type is (jacobi_t)
346  call pc%free()
347  type is (sx_jacobi_t)
348  call pc%free()
349  end select
350  deallocate(this%pc_crs)
351  end if
352 
353  end subroutine hsmg_free
354 
356  subroutine hsmg_solve(this, z, r, n)
357  integer, intent(in) :: n
358  class(hsmg_t), intent(inout) :: this
359  real(kind=rp), dimension(n), intent(inout) :: z
360  real(kind=rp), dimension(n), intent(inout) :: r
361  type(c_ptr) :: z_d, r_d
362  type(ksp_monitor_t) :: crs_info
363  integer :: i, thrdid, nthrds
364 
365  call profiler_start_region('HSMG solve', 8)
366  if (neko_bcknd_device .eq. 1) then
367  z_d = device_get_ptr(z)
368  r_d = device_get_ptr(r)
369  !We should not work with the input
370  call device_copy(this%r_d, r_d, n)
371  call bc_list_apply_scalar(this%bclst_reg, r, n)
372 
373  !OVERLAPPING Schwarz exchange and solve
374  !! DOWNWARD Leg of V-cycle, we are pretty hardcoded here but w/e
375  call device_col2(this%r_d, this%grids(3)%coef%mult_d, &
376  this%grids(3)%dof%size())
377  !Restrict to middle level
378  call this%interp_fine_mid%map(this%e%x, this%r, &
379  this%msh%nelv, this%grids(2)%Xh)
380  call this%grids(2)%gs_h%op(this%e%x, &
381  this%grids(2)%dof%size(), gs_op_add, this%gs_event)
382  call device_event_sync(this%gs_event)
383  call device_copy(this%r_d, r_d, n)
384  call bc_list_apply_scalar(this%bclst_reg, r, n)
385  call device_copy(this%w_d, this%e%x_d, this%grids(2)%dof%size())
386  call bc_list_apply_scalar(this%bclst_mg, this%w, &
387  this%grids(2)%dof%size())
388  !OVERLAPPING Schwarz exchange and solve
389  call device_col2(this%w_d, this%grids(2)%coef%mult_d, &
390  this%grids(2)%dof%size())
391  !restrict residual to crs
392  call this%interp_mid_crs%map(this%wf%x, this%w,this%msh%nelv, &
393  this%grids(1)%Xh)
394  !Crs solve
395  call device_copy(this%w_d, this%e%x_d, this%grids(2)%dof%size())
396  call bc_list_apply_scalar(this%bclst_mg, this%w, &
397  this%grids(2)%dof%size())
398 
399  !$omp parallel private(thrdid, nthrds)
400 
401  thrdid = 0
402  nthrds = 1
403  !$ thrdid = omp_get_thread_num()
404  !$ nthrds = omp_get_num_threads()
405 
406  if (thrdid .eq. 0) then
407  call profiler_start_region('HSMG schwarz', 9)
408  call this%grids(3)%schwarz%compute(z, this%r)
409  call this%grids(2)%schwarz%compute(this%grids(2)%e%x,this%w)
411  end if
412  if (nthrds .eq. 1 .or. thrdid .eq. 1) then
413  call profiler_start_region('HSMG coarse grid', 10)
414  call this%grids(1)%gs_h%op(this%wf%x, &
415  this%grids(1)%dof%size(), gs_op_add, this%gs_event)
416  call device_event_sync(this%gs_event)
417  call bc_list_apply_scalar(this%grids(1)%bclst, this%wf%x, &
418  this%grids(1)%dof%size())
419  call profiler_start_region('HSMG coarse-solve', 11)
420  crs_info = this%crs_solver%solve(this%Ax, this%grids(1)%e, this%wf%x, &
421  this%grids(1)%dof%size(), &
422  this%grids(1)%coef, &
423  this%grids(1)%bclst, &
424  this%grids(1)%gs_h, this%niter)
426  call bc_list_apply_scalar(this%grids(1)%bclst, this%grids(1)%e%x,&
427  this%grids(1)%dof%size())
429  end if
430  !$omp end parallel
431 
432  call this%interp_mid_crs%map(this%w, this%grids(1)%e%x, &
433  this%msh%nelv, this%grids(2)%Xh)
434  call device_add2(this%grids(2)%e%x_d, this%w_d, this%grids(2)%dof%size())
435 
436  call this%interp_fine_mid%map(this%w, this%grids(2)%e%x, &
437  this%msh%nelv, this%grids(3)%Xh)
438  call device_add2(z_d, this%w_d, this%grids(3)%dof%size())
439  call this%grids(3)%gs_h%op(z, this%grids(3)%dof%size(), &
440  gs_op_add, this%gs_event)
441  call device_event_sync(this%gs_event)
442  call device_col2(z_d, this%grids(3)%coef%mult_d, this%grids(3)%dof%size())
443  else
444  !We should not work with the input
445  call copy(this%r, r, n)
446 
447  !OVERLAPPING Schwarz exchange and solve
448  call this%grids(3)%schwarz%compute(z, this%r)
449  ! DOWNWARD Leg of V-cycle, we are pretty hardcoded here but w/e
450  call col2(this%r, this%grids(3)%coef%mult, &
451  this%grids(3)%dof%size())
452  !Restrict to middle level
453  call this%interp_fine_mid%map(this%w, this%r, &
454  this%msh%nelv, this%grids(2)%Xh)
455  call this%grids(2)%gs_h%op(this%w, this%grids(2)%dof%size(), gs_op_add)
456  !OVERLAPPING Schwarz exchange and solve
457  call this%grids(2)%schwarz%compute(this%grids(2)%e%x,this%w)
458  call col2(this%w, this%grids(2)%coef%mult, this%grids(2)%dof%size())
459  !restrict residual to crs
460  call this%interp_mid_crs%map(this%r,this%w,this%msh%nelv,this%grids(1)%Xh)
461  !Crs solve
462 
463  call this%grids(1)%gs_h%op(this%r, this%grids(1)%dof%size(), gs_op_add)
464  call bc_list_apply_scalar(this%grids(1)%bclst, this%r, &
465  this%grids(1)%dof%size())
466  call profiler_start_region('HSMG coarse-solve', 11)
467  crs_info = this%crs_solver%solve(this%Ax, this%grids(1)%e, this%r, &
468  this%grids(1)%dof%size(), &
469  this%grids(1)%coef, &
470  this%grids(1)%bclst, &
471  this%grids(1)%gs_h, this%niter)
473  call bc_list_apply_scalar(this%grids(1)%bclst, this%grids(1)%e%x,&
474  this%grids(1)%dof%size())
475 
476 
477  call this%interp_mid_crs%map(this%w, this%grids(1)%e%x, &
478  this%msh%nelv, this%grids(2)%Xh)
479  call add2(this%grids(2)%e%x, this%w, this%grids(2)%dof%size())
480 
481  call this%interp_fine_mid%map(this%w, this%grids(2)%e%x, &
482  this%msh%nelv, this%grids(3)%Xh)
483  call add2(z, this%w, this%grids(3)%dof%size())
484  call this%grids(3)%gs_h%op(z, this%grids(3)%dof%size(), gs_op_add)
485  call col2(z, this%grids(3)%coef%mult, this%grids(3)%dof%size())
486 
487  end if
489  end subroutine hsmg_solve
490 end module hsmg
double real
Definition: device_config.h:12
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
subroutine, public ax_helm_factory(Ax)
Factory routine for the a Helmholtz problem matrix-vector product. The selection is based on the comp...
Defines a Matrix-vector product.
Definition: ax.f90:34
Defines a boundary condition.
Definition: bc.f90:34
subroutine, public bc_list_add(bclst, bc)
Add a condition to a list of boundary conditions.
Definition: bc.f90:490
subroutine, public bc_list_init(bclst, size)
Constructor for a list of boundary conditions.
Definition: bc.f90:449
subroutine, public bc_list_apply_scalar(bclst, x, n, t, tstep)
Apply a list of boundary conditions to a scalar field.
Definition: bc.f90:515
Coefficients.
Definition: coef.f90:34
Jacobi preconditioner accelerator backend.
subroutine, public device_add2(a_d, b_d, n)
subroutine, public device_col2(a_d, b_d, n)
subroutine, public device_copy(a_d, b_d, n)
Device abstraction, common interface for various accelerators.
Definition: device.F90:34
subroutine, public device_event_sync(event)
Synchronize an event.
Definition: device.F90:1209
subroutine, public device_event_create(event, flags)
Create a device event queue.
Definition: device.F90:1142
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:357
subroutine hsmg_init(this, msh, Xh, coef, dof, gs_h, bclst, crs_pctype)
Definition: pc_hsmg.f90:138
subroutine hsmg_set_h(this)
Definition: pc_hsmg.f90:270
subroutine hsmg_free(this)
Definition: pc_hsmg.f90:306
subroutine hsmg_fill_grid(dof, gs_h, Xh, coef, bclst, schwarz, e, grids, l)
Definition: pc_hsmg.f90:284
Routines to interpolate between different spaces.
Jacobi preconditioner.
Definition: pc_jacobi.f90:34
subroutine, public krylov_solver_destroy(ksp)
Destroy an interative Krylov solver.
subroutine, public krylov_solver_factory(ksp, n, solver, max_iter, abstol, M)
Initialize an iterative Krylov solver.
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:50
Definition: math.f90:60
subroutine, public add2(a, b, n)
Vector addition .
Definition: math.f90:503
subroutine, public col2(a, b, n)
Vector multiplication .
Definition: math.f90:645
subroutine, public copy(a, b, n)
Copy a vector .
Definition: math.f90:211
Defines a mesh.
Definition: mesh.f90:34
Build configurations.
Definition: neko_config.f90:34
integer, parameter neko_bcknd_sx
Definition: neko_config.f90:39
integer, parameter neko_bcknd_device
Definition: neko_config.f90:44
integer, parameter neko_bcknd_xsmm
Definition: neko_config.f90:40
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_end_region
End the most recently started profiler region.
Definition: profiler.F90:95
subroutine, public profiler_start_region(name, region_id)
Started a named (name) profiler region.
Definition: profiler.F90:76
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.
Utilities.
Definition: utils.f90:35
Base type for a matrix-vector product providing .
Definition: ax.f90:43
A list of boundary conditions.
Definition: bc.f90:102
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition: coef.f90:54
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:55
Base abstract type for a canonical Krylov method, solving .
Definition: krylov.f90:65
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.
#define max(a, b)
Definition: tensor.cu:40