Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
scalar_scheme_template.f90
Go to the documentation of this file.
1
3 use checkpoint, only : chkp_t
4 use coefs, only : coef_t
5 use field, only : field_t
7 use gather_scatter, only : gs_t
8 use json_module, only : json_file
9 use krylov, only : ksp_monitor_t
10 use mesh, only : mesh_t
12 register_scalar_scheme
14 use time_state, only : time_state_t
16 use user_intf, only : user_t
17 use utils, only : neko_error
18 implicit none
19 private
20
22 contains
23 procedure :: init => scalar_scheme_template_init
24 procedure :: free => scalar_scheme_template_free
25 procedure :: step => scalar_scheme_template_step
26 procedure :: restart => scalar_scheme_template_restart
28
30
31contains
32
33 subroutine scalar_scheme_template_init(this, msh, coef, gs, params, &
34 numerics_params, user, chkp, ulag, vlag, wlag, time_scheme, rho)
35 class(scalar_scheme_template_t), target, intent(inout) :: this
36 type(mesh_t), target, intent(in) :: msh
37 type(coef_t), target, intent(in) :: coef
38 type(gs_t), target, intent(inout) :: gs
39 type(json_file), target, intent(inout) :: params, numerics_params
40 type(user_t), target, intent(in) :: user
41 type(chkp_t), target, intent(inout) :: chkp
42 type(field_series_t), target, intent(in) :: ulag, vlag, wlag
43 type(time_scheme_controller_t), target, intent(in) :: time_scheme
44 type(field_t), target, intent(in) :: rho
45
46 ! `scheme_init` sets up common fields, material properties, source terms,
47 ! and the configured Krylov solver/preconditioner.
48 call this%scheme_init(msh, coef, gs, params, 'scalar_scheme_template', &
49 user, rho)
50 ! TODO: Construct this scheme's operators and use numerics_params,
51 ! lagged velocities, time_scheme, and chkp as needed.
52 end subroutine scalar_scheme_template_init
53
55 class(scalar_scheme_template_t), intent(inout) :: this
56 ! TODO: Release operators and state owned by this derived type.
57 call this%scheme_free()
58 end subroutine scalar_scheme_template_free
59
60 subroutine scalar_scheme_template_step(this, time, ext_bdf, dt_controller, &
61 ksp_results)
62 class(scalar_scheme_template_t), intent(inout) :: this
63 type(time_state_t), intent(in) :: time
64 type(time_scheme_controller_t), intent(in) :: ext_bdf
65 type(time_step_controller_t), intent(in) :: dt_controller
66 type(ksp_monitor_t), intent(inout) :: ksp_results
67
68 ! TODO: Assemble and solve one scalar time step.
69 call neko_error('scalar_scheme_template: step is not implemented')
70 end subroutine scalar_scheme_template_step
71
72 subroutine scalar_scheme_template_restart(this, chkp)
73 class(scalar_scheme_template_t), target, intent(inout) :: this
74 type(chkp_t), intent(inout) :: chkp
75 ! TODO: Restore scheme-specific checkpoint state.
77
79 procedure(scalar_scheme_allocate), pointer :: allocator
81 call register_scalar_scheme('scalar_scheme_template', allocator)
83
85 class(scalar_scheme_t), allocatable, intent(inout) :: obj
86 allocate(scalar_scheme_template_t :: obj)
Scalar scheme factory. Both constructs and initializes the object.
Defines a checkpoint.
Coefficients.
Definition coef.f90:34
Contains the field_serties_t type.
Defines a field.
Definition field.f90:34
Gather-scatter.
Implements the base abstract type for Krylov solvers plus helper types.
Definition krylov.f90:34
Defines a mesh.
Definition mesh.f90:34
Template for a user-defined scalar scheme.
subroutine scalar_scheme_template_step(this, time, ext_bdf, dt_controller, ksp_results)
subroutine, public scalar_scheme_template_register_types()
subroutine scalar_scheme_template_free(this)
subroutine scalar_scheme_template_restart(this, chkp)
subroutine scalar_scheme_template_allocate(obj)
subroutine scalar_scheme_template_init(this, msh, coef, gs, params, numerics_params, user, chkp, ulag, vlag, wlag, time_scheme, rho)
Contains the scalar_scheme_t type.
Compound scheme for the advection and diffusion operators in a transport equation.
Module with things related to the simulation time.
Implements type time_step_controller.
Interfaces for user interaction with NEKO.
Definition user_intf.f90:34
Utilities.
Definition utils.f90:35
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:93
Stores a series (sequence) of fields, logically connected to a base field, and arranged according to ...
Gather-scatter kernel.
Type for storing initial and final residuals in a Krylov solver.
Definition krylov.f90:57
Base type for a scalar advection-diffusion solver.
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.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...