Neko 1.99.5
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
fluid_volflow.f90
Go to the documentation of this file.
1! Copyright (c) 2008-2020, UCHICAGO ARGONNE, LLC.
2! Copyright (c) 2025-2026, The Neko Authors
3!
4! The UChicago Argonne, LLC as Operator of Argonne National
5! Laboratory holds copyright in the Software. The copyright holder
6! reserves all rights except those expressly granted to licensees,
7! and U.S. Government license rights.
8!
9! Redistribution and use in source and binary forms, with or without
10! modification, are permitted provided that the following conditions
11! are met:
12!
13! 1. Redistributions of source code must retain the above copyright
14! notice, this list of conditions and the disclaimer below.
15!
16! 2. Redistributions in binary form must reproduce the above copyright
17! notice, this list of conditions and the disclaimer (as noted below)
18! in the documentation and/or other materials provided with the
19! distribution.
20!
21! 3. Neither the name of ANL nor the names of its contributors
22! may be used to endorse or promote products derived from this software
23! without specific prior written permission.
24!
25! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
29! UCHICAGO ARGONNE, LLC, THE U.S. DEPARTMENT OF
30! ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
32! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34! THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35! (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37!
38! Additional BSD Notice
39! ---------------------
40! 1. This notice is required to be provided under our contract with
41! the U.S. Department of Energy (DOE). This work was produced at
42! Argonne National Laboratory under Contract
43! No. DE-AC02-06CH11357 with the DOE.
44!
45! 2. Neither the United States Government nor UCHICAGO ARGONNE,
46! LLC nor any of their employees, makes any warranty,
47! express or implied, or assumes any liability or responsibility for the
48! accuracy, completeness, or usefulness of any information, apparatus,
49! product, or process disclosed, or represents that its use would not
50! infringe privately-owned rights.
51!
52! 3. Also, reference herein to any specific commercial products, process,
53! or services by trade name, trademark, manufacturer or otherwise does
54! not necessarily constitute or imply its endorsement, recommendation,
55! or favoring by the United States Government or UCHICAGO ARGONNE LLC.
56! The views and opinions of authors expressed
57! herein do not necessarily state or reflect those of the United States
58! Government or UCHICAGO ARGONNE, LLC, and shall
59! not be used for advertising or product endorsement purposes.
60!
62 use operators, only : opgrad, cdtp, rotate_cyc
63 use num_types, only : rp
64 use mathops, only : opchsign
65 use krylov, only : ksp_t, ksp_monitor_t
66 use precon, only : pc_t
67 use dofmap, only : dofmap_t
68 use field, only : field_t
69 use coefs, only : coef_t
70 use time_state, only : time_state_t
72 use math, only : copy, glsc2, glmin, glmax, add2, abscmp
77 use gather_scatter, only : gs_t, gs_op_add
78 use json_module, only : json_file
81 use bc_list, only : bc_list_t
82 use ax_product, only : ax_t
84 use mpi_f08, only : mpi_allreduce, mpi_in_place, mpi_sum
85 use logger, only : log_size, neko_log
86 implicit none
87 private
88
90 type, public :: fluid_volflow_t
91 integer :: flow_dir
92 logical :: avflow
93 logical :: log = .true.
94 real(kind=rp) :: flow_rate
95 real(kind=rp) :: dtlag = 0d0
96 real(kind=rp) :: bdlag = 0d0
97 type(field_t) :: u_vol, v_vol, w_vol, p_vol
98 real(kind=rp) :: domain_length, base_flow
99 contains
100 procedure, pass(this) :: init => fluid_vol_flow_init
101 procedure, pass(this) :: free => fluid_vol_flow_free
102 procedure, pass(this) :: adjust => fluid_vol_flow
103 procedure, private, pass(this) :: compute => fluid_vol_flow_compute
104 end type fluid_volflow_t
105
106contains
107
108 subroutine fluid_vol_flow_init(this, dm_Xh, params)
109 class(fluid_volflow_t), intent(inout) :: this
110 type(dofmap_t), target, intent(in) :: dm_Xh
111 type(json_file), intent(inout) :: params
112 logical average, log_output
113 integer :: direction
114 real(kind=rp) :: rate
115
116 call this%free()
117
118 !Initialize vol_flow (if there is a forced volume flow)
119 call json_get_or_lookup(params, 'case.fluid.flow_rate_force.direction', &
120 direction)
121 call json_get_or_lookup(params, 'case.fluid.flow_rate_force.value', rate)
122 call json_get(params, 'case.fluid.flow_rate_force.use_averaged_flow',&
123 average)
124 call json_get_or_default(params, 'case.fluid.flow_rate_force.log', &
125 log_output, .true.)
126
127 this%flow_dir = direction
128 this%avflow = average
129 this%log = log_output
130 this%flow_rate = rate
131
132 if (this%flow_dir .ne. 0) then
133 call this%u_vol%init(dm_xh, 'u_vol')
134 call this%v_vol%init(dm_xh, 'v_vol')
135 call this%w_vol%init(dm_xh, 'w_vol')
136 call this%p_vol%init(dm_xh, 'p_vol')
137 end if
138
139 end subroutine fluid_vol_flow_init
140
141 subroutine fluid_vol_flow_free(this)
142 class(fluid_volflow_t), intent(inout) :: this
143
144 call this%u_vol%free()
145 call this%v_vol%free()
146 call this%w_vol%free()
147 call this%p_vol%free()
148
149 end subroutine fluid_vol_flow_free
150
154 subroutine fluid_vol_flow_compute(this, u_res, v_res, w_res, p_res, &
155 ext_bdf, gs_Xh, c_Xh, rho, mu, bd, dt, &
156 bclst_dp, bclst_du, bclst_dv, bclst_dw, bclst_vel_res, &
157 Ax_vel, Ax_prs, ksp_prs, ksp_vel, pc_prs, pc_vel, prs_max_iter, &
158 vel_max_iter)
159 class(fluid_volflow_t), intent(inout) :: this
160 type(field_t), intent(inout) :: u_res, v_res, w_res, p_res
161 type(coef_t), intent(inout) :: c_Xh
162 type(gs_t), intent(inout) :: gs_Xh
163 type(time_scheme_controller_t), intent(in) :: ext_bdf
164 type(bc_list_t), intent(inout) :: bclst_dp, bclst_du, bclst_dv, bclst_dw
165 type(bc_list_t), intent(inout) :: bclst_vel_res
166 class(ax_t), intent(in) :: Ax_vel
167 class(ax_t), intent(in) :: Ax_prs
168 class(ksp_t), intent(inout) :: ksp_prs, ksp_vel
169 class(pc_t), intent(inout) :: pc_prs, pc_vel
170 real(kind=rp), intent(in) :: bd
171 real(kind=rp), intent(in) :: rho, dt
172 type(field_t) :: mu
173 integer, intent(in) :: vel_max_iter, prs_max_iter
174 integer :: n, i
175 real(kind=rp) :: xlmin, xlmax
176 real(kind=rp) :: ylmin, ylmax
177 real(kind=rp) :: zlmin, zlmax
178 type(ksp_monitor_t) :: ksp_results(4)
179 type(field_t), pointer :: ta1, ta2, ta3
180 integer :: temp_indices(3)
181
182 call neko_scratch_registry%request_field(ta1, temp_indices(1), .false.)
183 call neko_scratch_registry%request_field(ta2, temp_indices(2), .false.)
184 call neko_scratch_registry%request_field(ta3, temp_indices(3), .false.)
185
186
187 associate(msh => c_xh%msh, p_vol => this%p_vol, &
188 u_vol => this%u_vol, v_vol => this%v_vol, w_vol => this%w_vol)
189
190 n = c_xh%dof%size()
191 xlmin = glmin(c_xh%dof%x, n)
192 xlmax = glmax(c_xh%dof%x, n)
193 ylmin = glmin(c_xh%dof%y, n) ! for Y!
194 ylmax = glmax(c_xh%dof%y, n)
195 zlmin = glmin(c_xh%dof%z, n) ! for Z!
196 zlmax = glmax(c_xh%dof%z, n)
197 if (this%flow_dir .eq. 1) then
198 this%domain_length = xlmax - xlmin
199 end if
200 if (this%flow_dir .eq. 2) then
201 this%domain_length = ylmax - ylmin
202 end if
203 if (this%flow_dir .eq. 3) then
204 this%domain_length = zlmax - zlmin
205 end if
206
207 if (neko_bcknd_device .eq. 1) then
208 call device_cfill(c_xh%h1_d, 1.0_rp/rho, n)
209 call device_rzero(c_xh%h2_d, n)
210 else
211 do i = 1, n
212 c_xh%h1(i,1,1,1) = 1.0_rp / rho
213 c_xh%h2(i,1,1,1) = 0.0_rp
214 end do
215 end if
216 c_xh%ifh2 = .false.
217
218 ! Compute pressure
219
220 if (this%flow_dir .eq. 1) then
221 call cdtp(p_res%x, c_xh%h1, c_xh%drdx, c_xh%dsdx, c_xh%dtdx, c_xh)
222 end if
223
224 if (this%flow_dir .eq. 2) then
225 call cdtp(p_res%x, c_xh%h1, c_xh%drdy, c_xh%dsdy, c_xh%dtdy, c_xh)
226 end if
227
228 if (this%flow_dir .eq. 3) then
229 call cdtp(p_res%x, c_xh%h1, c_xh%drdz, c_xh%dsdz, c_xh%dtdz, c_xh)
230 end if
231
232 call gs_xh%op(p_res, gs_op_add)
233 call bclst_dp%apply_scalar(p_res%x, n)
234 call pc_prs%update()
235 ksp_results(1) = ksp_prs%solve(ax_prs, p_vol, p_res%x, n, &
236 c_xh, bclst_dp, gs_xh, prs_max_iter)
237
238 ! Compute velocity
239
240 call opgrad(u_res%x, v_res%x, w_res%x, p_vol%x, c_xh)
241
242 if (neko_bcknd_device .eq. 1) then
243 call device_opchsign(u_res%x_d, v_res%x_d, w_res%x_d, msh%gdim, n)
244 call device_copy(ta1%x_d, c_xh%B_d, n)
245 call device_copy(ta2%x_d, c_xh%B_d, n)
246 call device_copy(ta3%x_d, c_xh%B_d, n)
247 else
248 call opchsign(u_res%x, v_res%x, w_res%x, msh%gdim, n)
249 call copy(ta1%x, c_xh%B, n)
250 call copy(ta2%x, c_xh%B, n)
251 call copy(ta3%x, c_xh%B, n)
252 end if
253 call bclst_vel_res%apply_vector(ta1%x, ta2%x, ta3%x, n)
254
255 ! add forcing
256
257 if (neko_bcknd_device .eq. 1) then
258 if (this%flow_dir .eq. 1) then
259 call device_add2(u_res%x_d, ta1%x_d, n)
260 else if (this%flow_dir .eq. 2) then
261 call device_add2(v_res%x_d, ta2%x_d, n)
262 else if (this%flow_dir .eq. 3) then
263 call device_add2(w_res%x_d, ta3%x_d, n)
264 end if
265 else
266 if (this%flow_dir .eq. 1) then
267 call add2(u_res%x, ta1%x, n)
268 else if (this%flow_dir .eq. 2) then
269 call add2(v_res%x, ta2%x, n)
270 else if (this%flow_dir .eq. 3) then
271 call add2(w_res%x, ta3%x, n)
272 end if
273 end if
274
275 if (neko_bcknd_device .eq. 1) then
276 call device_copy(c_xh%h1_d, mu%x_d, n)
277 call device_cfill(c_xh%h2_d, rho * (bd / dt), n)
278 else
279 call copy(c_xh%h1, mu%x, n)
280 c_xh%h2 = rho * (bd / dt)
281 end if
282 c_xh%ifh2 = .true.
283
284 call rotate_cyc(u_res, v_res, w_res, 1, c_xh)
285 call gs_xh%op(u_res%x, v_res%x, w_res%x, n, gs_op_add)
286 call rotate_cyc(u_res, v_res, w_res, 0, c_xh)
287
288 call bclst_vel_res%apply_vector(u_res%x, v_res%x, w_res%x, n)
289 call pc_vel%update()
290
291 ksp_results(2:4) = ksp_vel%solve_coupled(ax_vel, &
292 u_vol, v_vol, w_vol, &
293 u_res%x, v_res%x, w_res%x, &
294 n, c_xh, &
295 bclst_du, bclst_dv, bclst_dw, &
296 gs_xh, vel_max_iter)
297
298 if (neko_bcknd_device .eq. 1) then
299 if (this%flow_dir .eq. 1) then
300 this%base_flow = &
301 device_glsc2(u_vol%x_d, c_xh%B_d, n) / this%domain_length
302 end if
303
304 if (this%flow_dir .eq. 2) then
305 this%base_flow = &
306 device_glsc2(v_vol%x_d, c_xh%B_d, n) / this%domain_length
307 end if
308
309 if (this%flow_dir .eq. 3) then
310 this%base_flow = &
311 device_glsc2(w_vol%x_d, c_xh%B_d, n) / this%domain_length
312 end if
313 else
314 if (this%flow_dir .eq. 1) then
315 this%base_flow = glsc2(u_vol%x, c_xh%B, n) / this%domain_length
316 end if
317
318 if (this%flow_dir .eq. 2) then
319 this%base_flow = glsc2(v_vol%x, c_xh%B, n) / this%domain_length
320 end if
321
322 if (this%flow_dir .eq. 3) then
323 this%base_flow = glsc2(w_vol%x, c_xh%B, n) / this%domain_length
324 end if
325 end if
326 end associate
327
328 call neko_scratch_registry%relinquish_field(temp_indices)
329 end subroutine fluid_vol_flow_compute
330
340 subroutine fluid_vol_flow(this, u, v, w, p, u_res, v_res, w_res, p_res, &
341 c_Xh, gs_Xh, ext_bdf, rho, mu, dt, time, &
342 bclst_dp, bclst_du, bclst_dv, bclst_dw, bclst_vel_res, &
343 Ax_vel, Ax_prs, ksp_prs, ksp_vel, pc_prs, pc_vel, prs_max_iter, &
344 vel_max_iter)
345
346 class(fluid_volflow_t), intent(inout) :: this
347 type(field_t), intent(inout) :: u, v, w, p
348 type(field_t), intent(inout) :: u_res, v_res, w_res, p_res
349 type(coef_t), intent(inout) :: c_Xh
350 type(gs_t), intent(inout) :: gs_Xh
351 type(time_scheme_controller_t), intent(in) :: ext_bdf
352 type(time_state_t), intent(in) :: time
353 real(kind=rp), intent(in) :: rho, dt
354 type(field_t) :: mu
355 type(bc_list_t), intent(inout) :: bclst_dp, bclst_du, bclst_dv, bclst_dw
356 type(bc_list_t), intent(inout) :: bclst_vel_res
357 class(ax_t), intent(in) :: Ax_vel
358 class(ax_t), intent(in) :: Ax_prs
359 class(ksp_t), intent(inout) :: ksp_prs, ksp_vel
360 class(pc_t), intent(inout) :: pc_prs, pc_vel
361 integer, intent(in) :: prs_max_iter, vel_max_iter
362 real(kind=rp) :: ifcomp, flow_rate, xsec
363 real(kind=rp) :: current_flow, delta_flow, scale
364 integer :: n, ierr, i
365 character(len=5) :: flow_dir_label
366 character(len=12) :: step_str
367
368 character(len=200) :: log_buf
369
370 associate(u_vol => this%u_vol, v_vol => this%v_vol, &
371 w_vol => this%w_vol, p_vol => this%p_vol)
372
373 n = c_xh%dof%size()
374
375 ! If either dt or the backwards difference coefficient change,
376 ! then recompute base flow solution corresponding to unit forcing:
377
378 ifcomp = 0.0_rp
379
380 if ((.not. abscmp(dt, this%dtlag)) .or. &
381 (.not. abscmp(ext_bdf%diffusion_coeffs%x(1), this%bdlag))) then
382 ifcomp = 1.0_rp
383 end if
384
385 this%dtlag = dt
386 this%bdlag = ext_bdf%diffusion_coeffs%x(1)
387
388 call mpi_allreduce(mpi_in_place, ifcomp, 1, &
389 mpi_real_precision, mpi_sum, neko_comm, ierr)
390
391 if (ifcomp .gt. 0d0) then
392 call this%compute(u_res, v_res, w_res, p_res, &
393 ext_bdf, gs_xh, c_xh, rho, mu, ext_bdf%diffusion_coeffs%x(1), dt, &
394 bclst_dp, bclst_du, bclst_dv, bclst_dw, bclst_vel_res, &
395 ax_vel, ax_prs, ksp_prs, ksp_vel, pc_prs, pc_vel, prs_max_iter, &
396 vel_max_iter)
397 end if
398
399 if (neko_bcknd_device .eq. 1) then
400 if (this%flow_dir .eq. 1) then
401 current_flow = &
402 device_glsc2(u%x_d, c_xh%B_d, n) / this%domain_length ! for X
403 else if (this%flow_dir .eq. 2) then
404 current_flow = &
405 device_glsc2(v%x_d, c_xh%B_d, n) / this%domain_length ! for Y
406 else if (this%flow_dir .eq. 3) then
407 current_flow = &
408 device_glsc2(w%x_d, c_xh%B_d, n) / this%domain_length ! for Z
409 end if
410 else
411 if (this%flow_dir .eq. 1) then
412 current_flow = glsc2(u%x, c_xh%B, n) / this%domain_length ! for X
413 else if (this%flow_dir .eq. 2) then
414 current_flow = glsc2(v%x, c_xh%B, n) / this%domain_length ! for Y
415 else if (this%flow_dir .eq. 3) then
416 current_flow = glsc2(w%x, c_xh%B, n) / this%domain_length ! for Z
417 end if
418 end if
419
420 if (this%avflow) then
421 xsec = c_xh%volume / this%domain_length
422 flow_rate = this%flow_rate*xsec
423 else
424 flow_rate = this%flow_rate
425 end if
426
427 delta_flow = flow_rate - current_flow
428 scale = delta_flow / this%base_flow
429
430 if (this%log .and. pe_rank .eq. 0) then
431 if (this%flow_dir .eq. 1) then
432 flow_dir_label = ' x'
433 else if (this%flow_dir .eq. 2) then
434 flow_dir_label = ' y'
435 else if (this%flow_dir .eq. 3) then
436 flow_dir_label = ' z'
437 end if
438 write(step_str, '(I12)') time%tstep
439 step_str = adjustl(step_str)
440 write(log_buf, '(A,A3,A5,1X,5A18)') &
441 'Flow rate ', ' | ', 'Dir.:', 'Time:', 'Scale:', 'Rate:', &
442 'Current:', 'Base:'
443 call neko_log%message(log_buf)
444 write(log_buf, '(A12,A3,A5,1X,5E18.9)') step_str, ' | ', &
445 flow_dir_label, time%t, scale, flow_rate, current_flow, &
446 this%base_flow
447 call neko_log%message(log_buf)
448 end if
449
450 if (neko_bcknd_device .eq. 1) then
451 call device_add2s2(u%x_d, u_vol%x_d, scale, n)
452 call device_add2s2(v%x_d, v_vol%x_d, scale, n)
453 call device_add2s2(w%x_d, w_vol%x_d, scale, n)
454 call device_add2s2(p%x_d, p_vol%x_d, scale, n)
455 else
456 do concurrent(i = 1: n)
457 u%x(i,1,1,1) = u%x(i,1,1,1) + scale * u_vol%x(i,1,1,1)
458 v%x(i,1,1,1) = v%x(i,1,1,1) + scale * v_vol%x(i,1,1,1)
459 w%x(i,1,1,1) = w%x(i,1,1,1) + scale * w_vol%x(i,1,1,1)
460 p%x(i,1,1,1) = p%x(i,1,1,1) + scale * p_vol%x(i,1,1,1)
461 end do
462 end if
463 end associate
464
465 end subroutine fluid_vol_flow
466
467end module fluid_volflow
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Apply cyclic boundary condition to a vector field.
Defines a Matrix-vector product.
Definition ax.f90:34
Defines a list of bc_t.
Definition bc_list.f90:34
Coefficients.
Definition coef.f90:34
Definition comm.F90:1
type(mpi_datatype), public mpi_real_precision
MPI type for working precision of REAL types.
Definition comm.F90:53
integer, public pe_rank
MPI rank.
Definition comm.F90:58
type(mpi_comm), public neko_comm
MPI communicator.
Definition comm.F90:45
subroutine, public device_add2s2(a_d, b_d, c1, n, strm)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public device_add2(a_d, b_d, n, strm)
Vector addition .
subroutine, public device_rzero(a_d, n, strm)
Zero a real vector.
subroutine, public device_copy(a_d, b_d, n, strm)
Copy a vector .
real(kind=rp) function, public device_glsc2(a_d, b_d, n, strm)
Weighted inner product .
subroutine, public device_cfill(a_d, c, n, strm)
Set all elements to a constant c .
subroutine, public device_opchsign(a1_d, a2_d, a3_d, gdim, n)
Defines a mapping of the degrees of freedom.
Definition dofmap.f90:35
Defines a field.
Definition field.f90:34
subroutine fluid_vol_flow(this, u, v, w, p, u_res, v_res, w_res, p_res, c_xh, gs_xh, ext_bdf, rho, mu, dt, time, bclst_dp, bclst_du, bclst_dv, bclst_dw, bclst_vel_res, ax_vel, ax_prs, ksp_prs, ksp_vel, pc_prs, pc_vel, prs_max_iter, vel_max_iter)
Adjust flow volume.
subroutine fluid_vol_flow_init(this, dm_xh, params)
subroutine fluid_vol_flow_compute(this, u_res, v_res, w_res, p_res, ext_bdf, gs_xh, c_xh, rho, mu, bd, dt, bclst_dp, bclst_du, bclst_dv, bclst_dw, bclst_vel_res, ax_vel, ax_prs, ksp_prs, ksp_vel, pc_prs, pc_vel, prs_max_iter, vel_max_iter)
Compute flow adjustment.
subroutine fluid_vol_flow_free(this)
Gather-scatter.
Utilities for retrieving parameters from the case files.
Implements the base abstract type for Krylov solvers plus helper types.
Definition krylov.f90:34
Logging routines.
Definition log.f90:34
type(log_t), public neko_log
Global log stream.
Definition log.f90:80
integer, parameter, public log_size
Definition log.f90:46
Definition math.f90:60
real(kind=rp) function, public glsc2(a, b, n)
Weighted inner product .
Definition math.f90:1266
subroutine, public add2(a, b, n)
Vector addition .
Definition math.f90:900
real(kind=rp) function, public glmax(a, n)
Max of a vector of length n.
Definition math.f90:650
subroutine, public copy(a, b, n)
Copy a vector .
Definition math.f90:291
real(kind=rp) function, public glmin(a, n)
Min of a vector of length n.
Definition math.f90:688
Collection of vector field operations operating on and . Note that in general the indices and ....
Definition mathops.f90:67
subroutine, public opchsign(a1, a2, a3, gdim, n)
for and .
Definition mathops.f90:78
Build configurations.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
Operators.
Definition operators.f90:34
subroutine, public opgrad(ux, uy, uz, u, coef, es, ee)
Compute the weak gradient of a scalar field, i.e. the gradient multiplied by the mass matrix.
subroutine, public cdtp(dtx, x, dr, ds, dt, coef, es, ee)
Apply D^T to a scalar field, where D is the derivative matrix.
Krylov preconditioner.
Definition precon.f90:34
Defines a registry for storing and requesting temporary objects This can be used when you have a func...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Compound scheme for the advection and diffusion operators in a transport equation.
Module with things related to the simulation time.
Base type for a matrix-vector product providing .
Definition ax.f90:43
A list of allocatable `bc_t`. Follows the standard interface of lists.
Definition bc_list.f90:49
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:62
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:73
Defines a canonical Krylov preconditioner.
Definition precon.f90:40
Implements the logic to compute the time coefficients for the advection and diffusion operators in a ...
A struct that contains all info about the time, expand as needed.