39 use json_module,
only : json_file
50 type(
field_t),
pointer :: reg_coeff => null()
52 type(
coef_t),
pointer :: coef => null()
56 integer :: les_model_registry_size = 0
63 procedure(
avm_init), pass(this),
deferred :: init
65 procedure(
avm_free), pass(this),
deferred :: free
80 class(
avm_t),
intent(inout) :: this
91 class(
avm_t),
intent(inout) :: this
103 class(
avm_t),
intent(inout) :: this
104 class(
case_t),
intent(inout),
target :: case
105 type(json_file),
intent(inout) :: json
114 class(
avm_t),
intent(inout) :: this
122 module subroutine avm_allocator(object, type_name)
123 class(avm_t),
allocatable,
intent(inout) :: object
124 character(len=*),
intent(in) :: type_name
125 end subroutine avm_allocator
138 subroutine avm_allocate(obj)
140 class(avm_t),
allocatable,
intent(inout) :: obj
141 end subroutine avm_allocate
148 module subroutine register_avm(type_name, allocator)
149 character(len=*),
intent(in) :: type_name
150 procedure(avm_allocate),
pointer,
intent(in) :: allocator
151 end subroutine register_avm
158 character(len=20) :: type_name
160 procedure(avm_allocate),
pointer,
nopass :: allocator
161 end type allocator_entry
164 type(allocator_entry),
allocatable :: avm_registry(:)
167 integer :: avm_registry_size = 0
178 module subroutine avm_factory(object, type_name,
case, json)
179 class(avm_t),
allocatable,
intent(inout) :: object
180 character(len=*),
intent(in) :: type_name
182 type(json_file),
intent(inout) :: json
183 end subroutine avm_factory
186 public :: avm_factory, avm_allocator, register_avm, &
196 subroutine avm_init_base(this, dof, coef, reg_coeff_name)
197 class(avm_t),
intent(inout) :: this
198 class(
dofmap_t),
intent(in),
target :: dof
199 class(
coef_t),
intent(in),
target :: coef
200 character(len=*),
intent(in) :: reg_coeff_name
202 call this%free_base()
204 call neko_registry%add_field(dof, trim(reg_coeff_name), .true.)
206 this%reg_coeff =>
neko_registry%get_field(trim(reg_coeff_name))
210 end subroutine avm_init_base
216 subroutine avm_restart(this, time)
217 class(avm_t),
intent(inout) :: this
220 call this%compute(time)
222 end subroutine avm_restart
226 subroutine avm_free_base(this)
227 class(avm_t),
intent(inout) :: this
229 nullify(this%reg_coeff)
233 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.
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.