39 use json_module,
only : json_file
75 generic :: init_from_components => &
76 init_from_controllers, init_from_controllers_properties
78 procedure, pass(this) :: init_from_controllers => &
82 procedure, pass(this) :: init_from_controllers_properties => &
96 class(
lambda2_t),
intent(inout),
target :: this
97 type(json_file),
intent(inout) :: json
98 class(
case_t),
intent(inout),
target ::case
99 character(len=:),
allocatable :: name
100 character(len=20) :: fields(1)
101 type(
field_t),
pointer :: u, v, w, lambda2
106 fields(1) =
"lambda2"
107 call json%add(
"fields", fields)
109 call this%init_base(json,
case)
110 call this%writer%init(json,
case)
112 call this%init_common(name)
119 character(len=*),
intent(in) :: name
140 preprocess_controller, compute_controller, output_controller, &
143 character(len=*),
intent(in) :: name
144 class(
case_t),
intent(inout),
target :: case
149 character(len=*),
intent(in),
optional :: filename
150 integer,
intent(in),
optional :: precision
152 character(len=20) :: fields(1)
153 fields(1) =
"lambda2"
155 call this%init_base_from_components(
case, order, preprocess_controller, &
157 call this%writer%init_from_components(
"field_writer",
case, order, &
160 call this%init_common(name)
180 case, order, preprocess_control, preprocess_value, compute_control, &
181 compute_value, output_control, output_value, filename, precision)
183 character(len=*),
intent(in) :: name
184 class(
case_t),
intent(inout),
target :: case
186 character(len=*),
intent(in) :: preprocess_control
187 real(kind=
rp),
intent(in) :: preprocess_value
188 character(len=*),
intent(in) :: compute_control
189 real(kind=
rp),
intent(in) :: compute_value
190 character(len=*),
intent(in) :: output_control
191 real(kind=
rp),
intent(in) :: output_value
192 character(len=*),
intent(in),
optional :: filename
193 integer,
intent(in),
optional :: precision
195 character(len=20) :: fields(1)
196 fields(1) =
"lambda2"
198 call this%init_base_from_components(
case, order, preprocess_control, &
199 preprocess_value, compute_control, compute_value, output_control, &
201 call this%writer%init_from_components(
"field_writer",
case, order, &
202 preprocess_control, preprocess_value, compute_control, compute_value, &
203 output_control, output_value, fields, filename, precision)
204 call this%init_common(name)
211 call this%free_base()
216 nullify(this%lambda2)
225 call lambda2op(this%lambda2, this%u, this%v, this%w, this%case%fluid%c_Xh)
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Defines a simulation case.
Device abstraction, common interface for various accelerators.
Implements the field_writer_t type.
Utilities for retrieving parameters from the case files.
A simulation component that computes lambda2 The values are stored in the field registry under the na...
subroutine lambda2_init_from_controllers(this, name, case, order, preprocess_controller, compute_controller, output_controller, filename, precision)
Constructor from components, passing controllers.
subroutine lambda2_init_common(this, name)
Common part of constructors.
subroutine lambda2_init_from_controllers_properties(this, name, case, order, preprocess_control, preprocess_value, compute_control, compute_value, output_control, output_value, filename, precision)
Constructor from components, passing properties to the time_based_controller` components in the base ...
subroutine lambda2_init_from_json(this, json, case)
Constructor from json.
subroutine lambda2_compute(this, time)
Compute the lambda2 field.
subroutine lambda2_free(this)
Destructor.
integer, parameter, public rp
Global precision used in computations.
subroutine, public lambda2op(lambda2, u, v, w, coef)
Compute the Lambda2 field for a given velocity field.
Implements output_controller_t
Defines a registry for storing solution fields.
type(registry_t), target, public neko_registry
Global field registry.
Simulation components are objects that encapsulate functionality that can be fit to a particular comp...
subroutine compute_(this, time)
Dummy compute function.
Contains the time_based_controller_t type.
Module with things related to the simulation time.
A simulation component that writes a 3d field to a file.
Base abstract class for simulation components.
A utility type for determining whether an action should be executed based on the current time value....
A struct that contains all info about the time, expand as needed.