40 use json_module,
only : json_file
89 type(json_file),
intent(inout) :: json
90 class(
case_t),
intent(inout),
target :: case
109 real(kind=
rp),
intent(in) :: t
110 integer,
intent(in) :: tstep
118 type(json_file),
intent(inout) :: json
119 class(
case_t),
intent(inout),
target :: case
120 character(len=:),
allocatable :: compute_control, output_control
121 real(kind=
rp) :: compute_value, output_value
136 if (output_control ==
"global")
then
137 call json_get(this%case%params,
'case.fluid.output_control', &
139 call json_get(this%case%params,
'case.fluid.output_value', &
146 call this%compute_controller%init(
case%end_time, compute_control, &
148 call this%output_controller%init(
case%end_time, output_control, &
166 real(kind=
rp),
intent(in) :: t
167 integer,
intent(in) :: tstep
169 if (this%compute_controller%check(t, tstep))
then
170 call this%compute_(t, tstep)
171 call this%compute_controller%register_execution()
180 real(kind=
rp),
intent(in) :: t
182 call this%compute_controller%set_counter(t)
183 call this%output_controller%set_counter(t)
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
The main function to be executed during the run.
The common constructor using a JSON dictionary.
Defines a simulation case.
Utilities for retrieving parameters from the case files.
integer, parameter, public rp
Global precision used in computations.
Simulation components are objects that encapsulate functionality that can be fit to a particular comp...
subroutine simulation_component_free_base(this)
Destructor for the simulation_component_t (base) class.
subroutine simulation_component_restart_wrapper(this, t)
Wrapper for calling set_counter_ based for the controllers. Serves as the public interface.
subroutine simulation_component_init_base(this, json, case)
Constructor for the simulation_component_t (base) class.
subroutine simulation_component_compute_wrapper(this, t, tstep)
Wrapper for calling compute_ based on the compute_controller. Serves as the public interface.
Contains the time_based_controller_t type.
Base abstract class for simulation components.
A helper type that is needed to have an array of polymorphic objects.
A utility type for determening whether an action should be executed based on the current time value....