Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
boundary_flux::boundary_flux_t Type Referenceabstract

A simulation component for total vector flux through labelled zones. More...

Inheritance diagram for boundary_flux::boundary_flux_t:
Collaboration diagram for boundary_flux::boundary_flux_t:

Public Member Functions

procedure, pass(thisinit (this, json, case)
 Construct the component from a case-file JSON object.
 
generic init_from_components (this, name, case, order, preprocess_controller, compute_controller, output_controller, zone_indices, field_names, log, output_filename)
 Generic constructor from components.
 
generic init_from_components (this, name, case, order, preprocess_control, preprocess_value, compute_control, compute_value, output_control, output_value, zone_indices, field_names, log, output_filename)
 Generic constructor from components.
 
procedure, pass(thisinit_from_controllers (this, name, case, order, preprocess_controller, compute_controller, output_controller, zone_indices, field_names, log, output_filename)
 Construct from explicit time-based controllers.
 
procedure, pass(thisinit_from_controllers_properties (this, name, case, order, preprocess_control, preprocess_value, compute_control, compute_value, output_control, output_value, zone_indices, field_names, log, output_filename)
 Construct from time-based controller properties.
 
procedure, pass(thisfree (this)
 Free the component.
 
procedure, pass(thiscompute_ (this, time)
 Compute the total boundary flux.
 
procedure, pass(thisinit_base (this, json, case)
 Constructor for the simulation_component_t (base) class.
 
generic init_base_from_components (this, case, order, preprocess_control, preprocess_value, compute_control, compute_value, output_control, output_value)
 Constructor for the simulation_component_t (base) class from components.
 
generic init_base_from_components (this, case, order, preprocess_controller, compute_controller, output_controller)
 Constructor for the simulation_component_t (base) class from components.
 
procedure, pass(thisinit_base_from_controllers (this, case, order, preprocess_controller, compute_controller, output_controller)
 Constructor for the simulation_component_t (base) class from time_based_controllers, essentially directly from all components (we reserve the _from_components name for the generic binding).
 
procedure, pass(thisinit_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 from properties of time_based_controllers, so the latter are constructed instead of assigned.
 
procedure, pass(thisfree_base (this)
 Destructor for the simulation_component_t (base) class.
 
procedure, pass(thisrestart (this, time)
 Wrapper for calling set_counter for the time based controllers. Serves as the public interface.
 
procedure, pass(thispreprocess (this, time)
 Wrapper for calling preprocess_ based on the preprocess_controller. Serves as the public interface.
 
procedure, pass(thiscompute (this, time)
 Wrapper for calling compute_ based on the compute_controller. Serves as the public interface.
 
procedure(simulation_component_init), deferred, pass init (this, json, case)
 The common constructor using a JSON dictionary.
 
procedure(simulation_component_free), deferred, pass free (this)
 Destructor.
 
procedure, pass(thispreprocess_ (this, time)
 The preprocessing function to be executed during the run.
 
procedure, pass(thiscompute_ (this, time)
 The main function to be executed during the run.
 
procedure, pass(thisrestart_ (this, time)
 The restart function to be called upon restarting simulation.
 
procedure, pass(thisparse_json (this, json, case_params, preprocess_control, preprocess_value, compute_control, compute_value, output_control, output_value)
 JSON parameter parser for the time-based controllers.
 

Public Attributes

type(field_t), pointer u => null()
 X component field.
 
type(field_t), pointer v => null()
 Y component field.
 
type(field_t), pointer w => null()
 Z component field.
 
type(coef_t), pointer coef => null()
 Surface coefficients.
 
type(neumann_tbc
 Boundary mask built from the chosen zones.
 
integer, dimension(:), allocatable zone_indices
 Labelled zones to include.
 
character(len=80), dimension(:), allocatable field_names
 Names of the input vector component fields.
 
logical log = .true.
 Whether to write results to the log.
 
logical csv_output_enabled = .false.
 Whether CSV output is enabled.
 
type(file_tcsv_output
 Optional CSV output file.
 
type(vector_tcsv_row
 Reusable row buffer for CSV output.
 
type(vector_tn1
 Area-weighted x normals.
 
type(vector_tn2
 Area-weighted y normals.
 
type(vector_tn3
 Area-weighted z normals.
 
type(vector_tsurface_u
 Reusable gathered x boundary values.
 
type(vector_tsurface_v
 Reusable gathered y boundary values.
 
type(vector_tsurface_w
 Reusable gathered z boundary values.
 
real(kind=rp) flux = 0.0_rp
 Most recently computed total flux.
 
type(case_t), pointer case
 Pointer to the simulation case.
 
type(time_based_controller_tpreprocess_controller
 Controller for when to run preprocess.
 
type(time_based_controller_tcompute_controller
 Controller for when to run compute.
 
type(time_based_controller_toutput_controller
 Controller for when to do output.
 
integer order
 The execution order, lowest excutes first.
 
character(:), allocatable name
 Unique name of the simcomp.
 

Private Member Functions

procedure, pass(this), private init_common (this, name, coef, zone_indices, field_names, log, output_filename)
 Common constructor used by all public constructors.
 

Detailed Description

Note
Fluxes inside the domain are considered positive.

Definition at line 60 of file boundary_flux.f90.

Member Function/Subroutine Documentation

◆ compute()

procedure, pass(this) simulation_component::simulation_component_t::compute ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
inherited
Parameters
timeThe current time.

Definition at line 91 of file simulation_component.f90.

◆ compute_() [1/2]

procedure, pass(this) boundary_flux::boundary_flux_t::compute_ ( class(boundary_flux_t), intent(inout this,
type(time_state_t), intent(in time 
)
Parameters
timeCurrent simulation time state.

Definition at line 115 of file boundary_flux.f90.

◆ compute_() [2/2]

procedure, pass(this) simulation_component::simulation_component_t::compute_ ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
inherited
Parameters
timeThe current time.

Definition at line 99 of file simulation_component.f90.

◆ free() [1/2]

procedure, pass(this) boundary_flux::boundary_flux_t::free ( class(boundary_flux_t), intent(inout this)

Definition at line 113 of file boundary_flux.f90.

◆ free() [2/2]

procedure(simulation_component_free), deferred, pass simulation_component::simulation_component_t::free ( class(simulation_component_t), intent(inout this)
pure virtualinherited

Definition at line 95 of file simulation_component.f90.

◆ free_base()

procedure, pass(this) simulation_component::simulation_component_t::free_base ( class(simulation_component_t), intent(inout this)
inherited

Definition at line 81 of file simulation_component.f90.

◆ init() [1/2]

procedure, pass(this) boundary_flux::boundary_flux_t::init ( class(boundary_flux_t), intent(inout), target  this,
type(json_file), intent(inout json,
class(case_t), intent(inout), target  case 
)
Parameters
jsonJSON object describing the simcomp.
caseSimulation case.

Definition at line 99 of file boundary_flux.f90.

◆ init() [2/2]

procedure(simulation_component_init), deferred, pass simulation_component::simulation_component_t::init ( class(simulation_component_t), intent(inout), target  this,
type(json_file), intent(inout json,
class(case_t), intent(inout), target  case 
)
pure virtualinherited

Definition at line 93 of file simulation_component.f90.

◆ init_base()

procedure, pass(this) simulation_component::simulation_component_t::init_base ( class(simulation_component_t), intent(inout this,
type(json_file), intent(inout json,
class(case_t), intent(inout), target  case 
)
inherited

Definition at line 65 of file simulation_component.f90.

◆ init_base_from_components() [1/2]

generic simulation_component::simulation_component_t::init_base_from_components ( 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 
)
inherited
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 67 of file simulation_component.f90.

◆ init_base_from_components() [2/2]

generic simulation_component::simulation_component_t::init_base_from_components ( 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 
)
inherited
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 67 of file simulation_component.f90.

◆ init_base_from_controllers()

procedure, pass(this) simulation_component::simulation_component_t::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 
)
inherited
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 73 of file simulation_component.f90.

◆ init_base_from_controllers_properties()

procedure, pass(this) simulation_component::simulation_component_t::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 
)
inherited
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 78 of file simulation_component.f90.

◆ init_common()

procedure, pass(this), private boundary_flux::boundary_flux_t::init_common ( class(boundary_flux_t), intent(inout this,
character(len=*), intent(in name,
type(coef_t), intent(inout), target  coef,
integer, dimension(:), intent(in zone_indices,
character(len=*), dimension(:), intent(in field_names,
logical, intent(in log,
character(len=*), intent(in), optional  output_filename 
)
private
Parameters
nameUnique simcomp name.
coefSEM coefficients.
zone_indicesLabelled zones to include.
field_namesNames of the registered vector component fields.
logWhether to emit tabular log output.
output_filenameOptional CSV output filename.

Definition at line 110 of file boundary_flux.f90.

◆ init_from_components() [1/2]

generic boundary_flux::boundary_flux_t::init_from_components ( class(boundary_flux_t), intent(inout this,
character(len=*), intent(in name,
class(case_t), intent(inout), target  case,
integer, intent(in 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,
integer, dimension(:), intent(in zone_indices,
character(len=*), dimension(:), intent(in field_names,
logical, intent(in), optional  log,
character(len=*), intent(in), optional  output_filename 
)
Parameters
nameUnique simcomp name.
caseSimulation case owning the simcomp.
orderExecution priority.
preprocess_controlControl mode for preprocessing.
preprocess_valueControl value for preprocessing.
compute_controlControl mode for computation.
compute_valueControl value for computation.
output_controlControl mode for output.
output_valueControl value for output.
zone_indicesLabelled zones to include.
field_namesNames of the registered vector component fields.
logOptional flag controlling log output.
output_filenameOptional CSV output filename.

Definition at line 101 of file boundary_flux.f90.

◆ init_from_components() [2/2]

generic boundary_flux::boundary_flux_t::init_from_components ( class(boundary_flux_t), intent(inout this,
character(len=*), intent(in name,
class(case_t), intent(inout), target  case,
integer, intent(in 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,
integer, dimension(:), intent(in zone_indices,
character(len=*), dimension(:), intent(in field_names,
logical, intent(in), optional  log,
character(len=*), intent(in), optional  output_filename 
)
Parameters
nameUnique simcomp name.
caseSimulation case owning the simcomp.
orderExecution priority.
preprocess_controllerController for preprocessing.
compute_controllerController for computation.
output_controllerController for output.
zone_indicesLabelled zones to include.
field_namesNames of the registered vector component fields.
logOptional flag controlling log output.
output_filenameOptional CSV output filename.

Definition at line 101 of file boundary_flux.f90.

◆ init_from_controllers()

procedure, pass(this) boundary_flux::boundary_flux_t::init_from_controllers ( class(boundary_flux_t), intent(inout this,
character(len=*), intent(in name,
class(case_t), intent(inout), target  case,
integer, intent(in 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,
integer, dimension(:), intent(in zone_indices,
character(len=*), dimension(:), intent(in field_names,
logical, intent(in), optional  log,
character(len=*), intent(in), optional  output_filename 
)
Parameters
nameUnique simcomp name.
caseSimulation case owning the simcomp.
orderExecution priority.
preprocess_controllerController for preprocessing.
compute_controllerController for computation.
output_controllerController for output.
zone_indicesLabelled zones to include.
field_namesNames of the registered vector component fields.
logOptional flag controlling log output.
output_filenameOptional CSV output filename.

Definition at line 104 of file boundary_flux.f90.

◆ init_from_controllers_properties()

procedure, pass(this) boundary_flux::boundary_flux_t::init_from_controllers_properties ( class(boundary_flux_t), intent(inout this,
character(len=*), intent(in name,
class(case_t), intent(inout), target  case,
integer, intent(in 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,
integer, dimension(:), intent(in zone_indices,
character(len=*), dimension(:), intent(in field_names,
logical, intent(in), optional  log,
character(len=*), intent(in), optional  output_filename 
)
Parameters
nameUnique simcomp name.
caseSimulation case owning the simcomp.
orderExecution priority.
preprocess_controlControl mode for preprocessing.
preprocess_valueControl value for preprocessing.
compute_controlControl mode for computation.
compute_valueControl value for computation.
output_controlControl mode for output.
output_valueControl value for output.
zone_indicesLabelled zones to include.
field_namesNames of the registered vector component fields.
logOptional flag controlling log output.
output_filenameOptional CSV output filename.

Definition at line 107 of file boundary_flux.f90.

◆ parse_json()

procedure, pass(this) simulation_component::simulation_component_t::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 
)
inherited
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 103 of file simulation_component.f90.

◆ preprocess()

procedure, pass(this) simulation_component::simulation_component_t::preprocess ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
inherited
Parameters
timeThe current time.

Definition at line 87 of file simulation_component.f90.

◆ preprocess_()

procedure, pass(this) simulation_component::simulation_component_t::preprocess_ ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
inherited
Parameters
timeThe current time.

Definition at line 97 of file simulation_component.f90.

◆ restart()

procedure, pass(this) simulation_component::simulation_component_t::restart ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
inherited
Parameters
timeThe current time.

Definition at line 84 of file simulation_component.f90.

◆ restart_()

procedure, pass(this) simulation_component::simulation_component_t::restart_ ( class(simulation_component_t), intent(inout this,
type(time_state_t), intent(in time 
)
inherited
Parameters
timeThe current time.

Definition at line 101 of file simulation_component.f90.

Member Data Documentation

◆ bc

type(neumann_t) boundary_flux::boundary_flux_t::bc

Definition at line 70 of file boundary_flux.f90.

◆ case

type(case_t), pointer simulation_component::simulation_component_t::case
inherited

Definition at line 52 of file simulation_component.f90.

◆ coef

type(coef_t), pointer boundary_flux::boundary_flux_t::coef => null()

Definition at line 68 of file boundary_flux.f90.

◆ compute_controller

type(time_based_controller_t) simulation_component::simulation_component_t::compute_controller
inherited

Definition at line 56 of file simulation_component.f90.

◆ csv_output

type(file_t) boundary_flux::boundary_flux_t::csv_output

Definition at line 80 of file boundary_flux.f90.

◆ csv_output_enabled

logical boundary_flux::boundary_flux_t::csv_output_enabled = .false.

Definition at line 78 of file boundary_flux.f90.

◆ csv_row

type(vector_t) boundary_flux::boundary_flux_t::csv_row

Definition at line 82 of file boundary_flux.f90.

◆ field_names

character(len=80), dimension(:), allocatable boundary_flux::boundary_flux_t::field_names

Definition at line 74 of file boundary_flux.f90.

◆ flux

real(kind=rp) boundary_flux::boundary_flux_t::flux = 0.0_rp

Definition at line 96 of file boundary_flux.f90.

◆ log

logical boundary_flux::boundary_flux_t::log = .true.

Definition at line 76 of file boundary_flux.f90.

◆ n1

type(vector_t) boundary_flux::boundary_flux_t::n1

Definition at line 84 of file boundary_flux.f90.

◆ n2

type(vector_t) boundary_flux::boundary_flux_t::n2

Definition at line 86 of file boundary_flux.f90.

◆ n3

type(vector_t) boundary_flux::boundary_flux_t::n3

Definition at line 88 of file boundary_flux.f90.

◆ name

character(:), allocatable simulation_component::simulation_component_t::name
inherited

Definition at line 62 of file simulation_component.f90.

◆ order

integer simulation_component::simulation_component_t::order
inherited

Definition at line 60 of file simulation_component.f90.

◆ output_controller

type(time_based_controller_t) simulation_component::simulation_component_t::output_controller
inherited

Definition at line 58 of file simulation_component.f90.

◆ preprocess_controller

type(time_based_controller_t) simulation_component::simulation_component_t::preprocess_controller
inherited

Definition at line 54 of file simulation_component.f90.

◆ surface_u

type(vector_t) boundary_flux::boundary_flux_t::surface_u

Definition at line 90 of file boundary_flux.f90.

◆ surface_v

type(vector_t) boundary_flux::boundary_flux_t::surface_v

Definition at line 92 of file boundary_flux.f90.

◆ surface_w

type(vector_t) boundary_flux::boundary_flux_t::surface_w

Definition at line 94 of file boundary_flux.f90.

◆ u

type(field_t), pointer boundary_flux::boundary_flux_t::u => null()

Definition at line 62 of file boundary_flux.f90.

◆ v

type(field_t), pointer boundary_flux::boundary_flux_t::v => null()

Definition at line 64 of file boundary_flux.f90.

◆ w

type(field_t), pointer boundary_flux::boundary_flux_t::w => null()

Definition at line 66 of file boundary_flux.f90.

◆ zone_indices

integer, dimension(:), allocatable boundary_flux::boundary_flux_t::zone_indices

Definition at line 72 of file boundary_flux.f90.


The documentation for this type was generated from the following file: