40 use json_module,
only : json_file
51 type(
field_t),
pointer :: reg_coeff => null()
53 type(
coef_t),
pointer :: coef => null()
57 integer :: les_model_registry_size = 0
64 procedure(
avm_init), pass(this),
deferred :: init
66 procedure(
avm_free), pass(this),
deferred :: free
81 class(
avm_t),
intent(inout) :: this
92 class(
avm_t),
intent(inout) :: this
104 class(
avm_t),
intent(inout) :: this
105 class(
case_t),
intent(inout),
target :: case
106 type(json_file),
intent(inout) :: json
115 class(
avm_t),
intent(inout) :: this
123 module subroutine avm_allocator(object, type_name)
124 class(avm_t),
allocatable,
intent(inout) :: object
125 character(len=*),
intent(in) :: type_name
126 end subroutine avm_allocator
139 subroutine avm_allocate(obj)
141 class(avm_t),
allocatable,
intent(inout) :: obj
142 end subroutine avm_allocate
149 module subroutine register_avm(type_name, allocator)
150 character(len=*),
intent(in) :: type_name
151 procedure(avm_allocate),
pointer,
intent(in) :: allocator
152 end subroutine register_avm
159 character(len=NEKO_TYPENAME_LEN) :: type_name
161 procedure(avm_allocate),
pointer,
nopass :: allocator
162 end type allocator_entry
165 type(allocator_entry),
allocatable :: avm_registry(:)
168 integer :: avm_registry_size = 0
179 module subroutine avm_factory(object, type_name,
case, json)
180 class(avm_t),
allocatable,
intent(inout) :: object
181 character(len=*),
intent(in) :: type_name
183 type(json_file),
intent(inout) :: json
184 end subroutine avm_factory
187 public :: avm_factory, avm_allocator, register_avm, &
197 subroutine avm_init_base(this, dof, coef, reg_coeff_name)
198 class(avm_t),
intent(inout) :: this
199 class(
dofmap_t),
intent(in),
target :: dof
200 class(
coef_t),
intent(in),
target :: coef
201 character(len=*),
intent(in) :: reg_coeff_name
203 call this%free_base()
205 call neko_registry%add_field(dof, trim(reg_coeff_name), .true.)
207 this%reg_coeff =>
neko_registry%get_field(trim(reg_coeff_name))
211 end subroutine avm_init_base
217 subroutine avm_restart(this, time)
218 class(avm_t),
intent(inout) :: this
221 call this%compute(time)
223 end subroutine avm_restart
227 subroutine avm_free_base(this)
228 class(avm_t),
intent(inout) :: this
230 nullify(this%reg_coeff)
234 end subroutine avm_free_base
Perform artificial viscosity related computations after the time step.
Perform artificial viscosity related computations before the time step.
subroutine avm_free_base(this)
Destructor for the avm_t (base) class.
subroutine avm_restart(this, time)
Restore model state after loading a checkpoint. Models with additional history should override this m...
subroutine avm_init_base(this, dof, coef, reg_coeff_name)
Artificial viscosity model factory. Both allocates and initializes the object.
Defines a simulation case.
Defines a mapping of the degrees of freedom.
integer, parameter, public rp
Global precision used in computations.
Defines a registry for storing solution fields.
type(registry_t), target, public neko_registry
Global field registry.
Module with things related to the simulation time.
integer, parameter, public neko_typename_len
Base abstract type for artificial viscosity models.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
A struct that contains all info about the time, expand as needed.