Neko 1.99.1
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
simulation_component Module Reference

Simulation components are objects that encapsulate functionality that can be fit to a particular compute pattern. More...

Data Types

type  allocator_entry
 Called in user modules to add an allocator for custom types. More...
 
interface  simulation_component_allocate
 Simulation component factory. Both constructs and initializes the object. More...
 
interface  simulation_component_free
 Destructor. More...
 
interface  simulation_component_init
 The common constructor using a JSON dictionary. More...
 
type  simulation_component_t
 Base abstract class for simulation components. More...
 
type  simulation_component_wrapper_t
 A helper type that is needed to have an array of polymorphic objects. More...
 

Functions/Subroutines

subroutine simulation_component_init_base (this, json, case)
 Constructor for the simulation_component_t (base) class.
 
subroutine simulation_component_init_base_from_controllers_properties (this, case, order, preprocess_control, preprocess_value, compute_control, compute_value, output_control, output_value)
 Constructor for the simulation_component_t (base) class via the properties of the time_based_controller components.
 
subroutine simulation_component_init_base_from_controllers (this, case, order, preprocess_controller, compute_controller, output_controller)
 Constructor for the simulation_component_t (base) class from components.
 
subroutine simulation_component_parse_json (this, json, case_params, preprocess_control, preprocess_value, compute_control, compute_value, output_control, output_value)
 Parse JSON to determine the properties of the time_based_controllers.
 
subroutine simulation_component_free_base (this)
 Destructor for the simulation_component_t (base) class.
 
subroutine simulation_component_preprocess_wrapper (this, time)
 Wrapper for calling preprocess_ based on the preprocess_controller. Serves as the public interface.
 
subroutine simulation_component_compute_wrapper (this, time)
 Wrapper for calling compute_ based on the compute_controller. Serves as the public interface.
 
subroutine simulation_component_restart_wrapper (this, time)
 Wrapper for calling set_counter_ based for the controllers.
 
subroutine restart_ (this, time)
 Dummy restart function.
 
subroutine preprocess_ (this, time)
 Dummy preprocessing function.
 
subroutine compute_ (this, time)
 Dummy compute function.
 

Variables

type(allocator_entry), dimension(:), allocatable simcomp_registry
 Registry of allocators for user-defined types.
 
integer simcomp_registry_size = 0
 The size of the simulation_component_registry
 

Detailed Description

Note
The canonical way to abbreviate simulation_component is simcomp.

Function/Subroutine Documentation

◆ compute_()

subroutine simulation_component::compute_ ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
private
Parameters
timeThe current time.

Definition at line 390 of file simulation_component.f90.

◆ preprocess_()

subroutine simulation_component::preprocess_ ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
private
Parameters
timeThe current time.

Definition at line 381 of file simulation_component.f90.

◆ restart_()

subroutine simulation_component::restart_ ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
private
Parameters
timeThe current time.

Definition at line 372 of file simulation_component.f90.

◆ simulation_component_compute_wrapper()

subroutine simulation_component::simulation_component_compute_wrapper ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
private
Parameters
timeThe current time.

Definition at line 348 of file simulation_component.f90.

◆ simulation_component_free_base()

subroutine simulation_component::simulation_component_free_base ( class(simulation_component_t), intent(inout this)
private

Definition at line 326 of file simulation_component.f90.

◆ simulation_component_init_base()

subroutine simulation_component::simulation_component_init_base ( class(simulation_component_t), intent(inout this,
type(json_file), intent(inout json,
class(case_t), intent(inout), target  case 
)
private

Definition at line 194 of file simulation_component.f90.

◆ simulation_component_init_base_from_controllers()

subroutine simulation_component::simulation_component_init_base_from_controllers ( class(simulation_component_t), intent(inout this,
class(case_t), intent(inout), target  case,
integer  order,
type(time_based_controller_t), intent(in preprocess_controller,
type(time_based_controller_t), intent(in compute_controller,
type(time_based_controller_t), intent(in output_controller 
)
private
Parameters
caseThe simulation case object.
orderThe execution oder priority of the simcomp.
preprocess_controllerThe controller for running preprocessing.
compute_controllerThe controller for running compute.
output_controllerThe controller for producing output.

Definition at line 256 of file simulation_component.f90.

◆ simulation_component_init_base_from_controllers_properties()

subroutine simulation_component::simulation_component_init_base_from_controllers_properties ( class(simulation_component_t), intent(inout this,
class(case_t), intent(inout), target  case,
integer  order,
character(len=*), intent(in preprocess_control,
real(kind=rp), intent(in preprocess_value,
character(len=*), intent(in compute_control,
real(kind=rp), intent(in compute_value,
character(len=*), intent(in output_control,
real(kind=rp), intent(in output_value 
)
private
Parameters
caseThe simulation case object.
orderThe execution oder priority of the simcomp.
preprocess_controllerControl mode for preprocessing.
preprocess_valueValue parameter for preprocessing.
compute_controllerControl mode for computing.
compute_valueValue parameter for computing.
output_controllerControl mode for output.
output_valueValue parameter for output.

Definition at line 225 of file simulation_component.f90.

◆ simulation_component_parse_json()

subroutine simulation_component::simulation_component_parse_json ( class(simulation_component_t), intent(inout this,
type(json_file), intent(inout json,
type(json_file), intent(inout case_params,
character(len=:), intent(inout), allocatable  preprocess_control,
real(kind=rp), intent(out preprocess_value,
character(len=:), intent(inout), allocatable  compute_control,
real(kind=rp), intent(out compute_value,
character(len=:), intent(inout), allocatable  output_control,
real(kind=rp), intent(out output_value 
)
private
Parameters
jsonThe JSON dictionary of the simcomp.
case_paramsThe entire case configuration JSON.
preprocess_valueControl mode for preprocessing.
preprocess_controllerValue parameter for preprocessing.
compute_controllerControl mode for computing.
compute_controllerValue parameter for computing.
output_controllerControl mode for output.
output_controllerValue parameter for output.

Definition at line 281 of file simulation_component.f90.

◆ simulation_component_preprocess_wrapper()

subroutine simulation_component::simulation_component_preprocess_wrapper ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
private
Parameters
timeThe current time.

Definition at line 335 of file simulation_component.f90.

◆ simulation_component_restart_wrapper()

subroutine simulation_component::simulation_component_restart_wrapper ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
private
Parameters
timeThe current time.

Definition at line 360 of file simulation_component.f90.

Variable Documentation

◆ simcomp_registry

type(allocator_entry), dimension(:), allocatable simulation_component::simcomp_registry

Definition at line 183 of file simulation_component.f90.

◆ simcomp_registry_size

integer simulation_component::simcomp_registry_size = 0
private

Definition at line 186 of file simulation_component.f90.