36 use json_module,
only : json_file
47 type(
field_t),
pointer :: reg_coeff => null()
49 character(len=:),
allocatable :: reg_coeff_name
51 type(
coef_t),
pointer :: coef => null()
60 procedure(
reg_init), pass(this),
deferred :: init
62 procedure(
reg_free), pass(this),
deferred :: free
76 type(json_file),
intent(inout) :: json
77 type(
coef_t),
intent(in),
target :: coef
78 type(
dofmap_t),
intent(in),
target :: dof
99 type(
field_t),
intent(inout) :: effective_visc
100 type(
field_t),
intent(in),
optional :: mu
111 module subroutine viscous_regularization_factory(object, type_name, json, &
113 class(viscous_regularization_t),
allocatable,
intent(inout) :: object
114 character(len=*),
intent(in) :: type_name
115 type(json_file),
intent(inout) :: json
116 type(
coef_t),
intent(in),
target :: coef
117 type(
dofmap_t),
intent(in),
target :: dof
118 end subroutine viscous_regularization_factory
121 public :: viscous_regularization_factory
130 subroutine viscous_regularization_init_base(this, json, coef, dof)
131 class(viscous_regularization_t),
intent(inout) :: this
132 type(json_file),
intent(inout) :: json
133 type(
coef_t),
intent(in),
target :: coef
134 type(
dofmap_t),
intent(in),
target :: dof
139 end subroutine viscous_regularization_init_base
143 subroutine viscous_regularization_free_base(this)
144 class(viscous_regularization_t),
intent(inout) :: this
146 nullify(this%reg_coeff)
147 if (
allocated(this%reg_coeff_name))
deallocate(this%reg_coeff_name)
151 end subroutine viscous_regularization_free_base
Free a viscous regularization method.
Initialize a viscous regularization method.
Update an effective viscosity field.
Defines a mapping of the degrees of freedom.
integer, parameter, public rp
Global precision used in computations.
Module with things related to the simulation time.
Defines the base interface for viscous regularization methods.
subroutine viscous_regularization_init_base(this, json, coef, dof)
Allocate and initialize a viscous regularization method.
subroutine viscous_regularization_free_base(this)
Free state shared by all viscous regularization methods.
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.
Base abstract type for viscous regularization methods.