65 character(len=23) :: SIMCOMPS_KNOWN_TYPES(24) = [character(len=23) :: &
66 "boundary_operation", &
68 "lagrangian_particles", &
88 "wall_shear_stress", &
89 "boundary_data_writer"]
97 module subroutine simulation_component_factory(object, json,
case)
98 class(simulation_component_t),
allocatable,
intent(inout) :: object
99 type(json_file),
intent(inout) :: json
100 class(case_t),
intent(inout),
target :: case
101 character(len=:),
allocatable :: type_name
102 character(len=:),
allocatable :: type_string
106 call json_get_or_default(json,
"is_user", is_user, .false.)
110 call json_get(json,
"type", type_name)
113 call simulation_component_allocator(object, type_name)
116 call object%init(json,
case)
118 end subroutine simulation_component_factory
123 module subroutine simulation_component_allocator(object, type_name)
124 class(simulation_component_t),
allocatable,
intent(inout) :: object
125 character(len=*),
intent(in):: type_name
128 if (
allocated(object))
then
133 select case (trim(type_name))
134 case (
"boundary_operation")
136 case (
"boundary_flux")
138 case (
"lagrangian_particles")
146 case (
"field_writer")
148 case (
"weak_gradient")
158 case (
"force_torque")
160 case (
"spatial_average")
164 case (
"fluid_sgs_stats")
166 case (
"scalar_stats")
168 case (
"scalar_sgs_stats")
172 case (
"spectral_error")
174 case (
"data_streamer")
176 case (
"field_subsampler")
178 case (
"wall_shear_stress")
180 case (
"boundary_data_writer")
183 do i = 1, simcomp_registry_size
184 if (trim(type_name) == &
185 trim(simcomp_registry(i)%type_name))
then
186 call simcomp_registry(i)%allocator(object)
191 simcomps_known_types)
194 end subroutine simulation_component_allocator
201 module subroutine register_simulation_component(type_name, allocator)
202 character(len=*),
intent(in) :: type_name
203 procedure(simulation_component_allocate),
pointer,
intent(in) :: allocator
204 type(allocator_entry),
allocatable :: temp(:)
207 do i = 1,
size(simcomps_known_types)
208 if (trim(type_name) .eq. trim(simcomps_known_types(i)))
then
214 do i = 1, simcomp_registry_size
215 if (trim(type_name) .eq. &
216 trim(simcomp_registry(i)%type_name))
then
223 if (simcomp_registry_size == 0)
then
224 allocate(simcomp_registry(1))
226 allocate(temp(simcomp_registry_size + 1))
227 temp(1:simcomp_registry_size) = simcomp_registry
228 call move_alloc(temp, simcomp_registry)
231 simcomp_registry_size = simcomp_registry_size + 1
232 simcomp_registry(simcomp_registry_size)%type_name = type_name
233 simcomp_registry(simcomp_registry_size)%allocator => allocator
234 end subroutine register_simulation_component
236end submodule simulation_component_fctry
Implements the boundary_data_writer_t type.
Implements boundary_flux_t.
Implements boundary_operation_t.
Defines a simulation case.
Implements the curl_t type.
A simulation component that streams data using ADIOS2.
Implements the derivative_t type.
Implements the divergence_t type.
Implements type field_subsampler_t.
Implements the field_writer_t type.
Implements the fluid_sgs_stats_simcomp_t type.
Implements the fluid_stats_simcomp_t type.
Implements the force_torque_t type.
Implements the gradient_t type.
A simulation component that computes lambda2 The values are stored in the field registry under the na...
Implements the les_simcomp_t type.
Simulation-component handler for Lagrangian particle tracking.
Implements the scalar_sgs_stats_simcomp_t type.
Implements the scalar_stats_simcomp_t type.
Simulation components are objects that encapsulate functionality that can be fit to a particular comp...
Implements the spatial_average_t type.
Implements type spectral_error_t.
Implements the user_stats_t type.
character(:) function, allocatable, public concat_string_array(array, sep, prepend)
Concatenate an array of strings into one string with array items separated by spaces.
subroutine, public neko_type_registration_error(base_type, wrong_type, known)
subroutine, public neko_type_error(base_type, wrong_type, known_types)
Reports an error allocating a type for a particular base pointer class.
Implements the wall_shear_stress_t type.
Implements the weak_gradient_t type.
A simulation component that writes registry fields sampled on labelled boundary zones....
A simulation component for total vector flux through labelled zones.
A simulation component for boundary reductions on labelled zones.
A simulation component that computes the curl of a vector field. Added to the field registry as curl_...
A simulation component that computes a derivative of a field. Wraps the duxyz operator.
A simulation component that computes the divergence of a vector field. Added to the field registry as...
Implements the field_subsampler_t simulation components, which allows for masking regions of the doma...
A simulation component that writes a 3d field to a file.
A simulation component that computes the subgrid-scale contributions to the Reynolds stresses in LES.
A simulation component that computes the velocity and pressure statistics up to 4th order....
A simulation component that computes the force and torque on a given boundary zone.
A simulation component that computes the gradient of a field. Wraps the gradient operator.
A simulation component that drives the computation of the SGS viscosity.
A simulation component that drives passive Lagrangian particle tracking.
A simulation component that computes the subgrid-scale contributions to the Reynolds stresses in LES.
A simulation component that computes the scalar statistics for the skewness, kurtosis,...
A simulation component that writes spatial averages of registry fields.
Provides tools to calculate the spectral error indicator.
A simulation component that computes the averages of fields in the registry.
A simulation component that computes the wall shear stress on one or more labelled boundary zones and...
A simulation component that computes the weak gradient of a field. Wraps the opgradient operator.