39 use json_module,
only : json_file
76 generic :: init_from_components => &
77 init_from_controllers, init_from_controllers_properties
79 procedure, pass(this) :: init_from_controllers => &
83 procedure, pass(this) :: init_from_controllers_properties => &
97 class(
lambda2_t),
intent(inout),
target :: this
98 type(json_file),
intent(inout) :: json
99 class(
case_t),
intent(inout),
target ::case
100 character(len=:),
allocatable :: name
101 character(len=NEKO_VARNAME_LEN) :: fields(1)
102 type(
field_t),
pointer :: u, v, w, lambda2
107 fields(1) =
"lambda2"
108 call json%add(
"fields", fields)
110 call this%init_base(json,
case)
111 call this%writer%init(json,
case)
113 call this%init_common(name)
120 character(len=*),
intent(in) :: name
141 preprocess_controller, compute_controller, output_controller, &
144 character(len=*),
intent(in) :: name
145 class(
case_t),
intent(inout),
target :: case
150 character(len=*),
intent(in),
optional :: filename
151 integer,
intent(in),
optional :: precision
153 character(len=NEKO_VARNAME_LEN) :: fields(1)
154 fields(1) =
"lambda2"
156 call this%init_base_from_components(
case, order, preprocess_controller, &
158 call this%writer%init_from_components(
"field_writer",
case, order, &
161 call this%init_common(name)
181 case, order, preprocess_control, preprocess_value, compute_control, &
182 compute_value, output_control, output_value, filename, precision)
184 character(len=*),
intent(in) :: name
185 class(
case_t),
intent(inout),
target :: case
187 character(len=*),
intent(in) :: preprocess_control
188 real(kind=
rp),
intent(in) :: preprocess_value
189 character(len=*),
intent(in) :: compute_control
190 real(kind=
rp),
intent(in) :: compute_value
191 character(len=*),
intent(in) :: output_control
192 real(kind=
rp),
intent(in) :: output_value
193 character(len=*),
intent(in),
optional :: filename
194 integer,
intent(in),
optional :: precision
196 character(len=NEKO_VARNAME_LEN) :: fields(1)
197 fields(1) =
"lambda2"
199 call this%init_base_from_components(
case, order, preprocess_control, &
200 preprocess_value, compute_control, compute_value, output_control, &
202 call this%writer%init_from_components(
"field_writer",
case, order, &
203 preprocess_control, preprocess_value, compute_control, compute_value, &
204 output_control, output_value, fields, filename, precision)
205 call this%init_common(name)
212 call this%free_base()
217 nullify(this%lambda2)
226 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.
integer, parameter, public neko_varname_len
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.