Neko 1.99.1
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
spectral_error::spectral_error_t Type Referenceabstract

Provides tools to calculate the spectral error indicator. More...

Inheritance diagram for spectral_error::spectral_error_t:
Collaboration diagram for spectral_error::spectral_error_t:

Public Member Functions

procedure, pass(thisinit (this, json, case)
 Constructor.
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thiscompute_ (this, time)
 Compute the indicator (called according to the simcomp controller).
 
procedure, pass(thisget_indicators (this, coef)
 Calculate the indicator.
 
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()
 Pointers to main fields.
 
type(field_t), pointer v => null()
 
type(field_t), pointer w => null()
 
type(field_t), pointer u_hat => null()
 Transformed fields.
 
type(field_t), pointer v_hat => null()
 
type(field_t), pointer w_hat => null()
 
type(field_twk
 Working field - Consider making this a simple array.
 
real(kind=rp) seri_small = 1.e-14
 Configuration of spectral error calculation.
 
real(kind=rp) seri_smallr = 1.e-10
 used for ratios
 
real(kind=rp) seri_smallg = 1.e-5
 used for gradients
 
real(kind=rp) seri_smalls = 0.2
 used for sigma and rtmp in error calculations
 
integer seri_np = 4
 number of points in fitting
 
integer seri_np_max = 4
 
integer seri_elr = 0
 last modes skipped
 
real(kind=rp), dimension(:), allocatable eind_u
 spectral error indicator per element
 
real(kind=rp), dimension(:), allocatable eind_v
 
real(kind=rp), dimension(:), allocatable eind_w
 
real(kind=rp), dimension(:), allocatable sig_u
 fit coeficients per element
 
real(kind=rp), dimension(:), allocatable sig_v
 
real(kind=rp), dimension(:), allocatable sig_w
 
type(field_list_tsperi_l
 List to write the spectral error indicator as a field.
 
type(file_tmf_speri
 File to write.
 
type(field_writer_twriter
 Field writer controller for the output.
 
type(case_t), pointer case
 Pointer to the simulation case.
 
type(time_based_controller_t) preprocess_controller
 Controller for when to run preprocess.
 
type(time_based_controller_t) compute_controller
 Controller for when to run compute.
 
type(time_based_controller_t) output_controller
 Controller for when to do output.
 
integer order
 The execution order, lowest excutes first.
 

Detailed Description

This is a posteriori error measure, based on the local properties of the spectral solution, which was developed by Mavriplis. This method formally only gives an indication of the error.

Definition at line 66 of file spectral_error.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 88 of file simulation_component.f90.

◆ compute_() [1/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 96 of file simulation_component.f90.

◆ compute_() [2/2]

procedure, pass(this) spectral_error::spectral_error_t::compute_ ( class(spectral_error_t), intent(inout this,
type(time_state_t), intent(in time 
)

Definition at line 106 of file spectral_error.f90.

◆ free() [1/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 92 of file simulation_component.f90.

◆ free() [2/2]

procedure, pass(this) spectral_error::spectral_error_t::free ( class(spectral_error_t), intent(inout this)

Definition at line 104 of file spectral_error.f90.

◆ free_base()

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

Definition at line 78 of file simulation_component.f90.

◆ get_indicators()

procedure, pass(this) spectral_error::spectral_error_t::get_indicators ( class(spectral_error_t), intent(inout this,
type(coef_t), intent(inout coef 
)
Parameters
coeftype coef for mesh parameters and space

Definition at line 108 of file spectral_error.f90.

◆ init() [1/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 90 of file simulation_component.f90.

◆ init() [2/2]

procedure, pass(this) spectral_error::spectral_error_t::init ( class(spectral_error_t), intent(inout), target  this,
type(json_file), intent(inout json,
class(case_t), intent(inout), target  case 
)

Definition at line 102 of file spectral_error.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 62 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 64 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 64 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 70 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 75 of file simulation_component.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 100 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 84 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 94 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 81 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 98 of file simulation_component.f90.

Member Data Documentation

◆ case

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

Definition at line 51 of file simulation_component.f90.

◆ compute_controller

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

Definition at line 55 of file simulation_component.f90.

◆ eind_u

real(kind=rp), dimension(:), allocatable spectral_error::spectral_error_t::eind_u

Definition at line 91 of file spectral_error.f90.

◆ eind_v

real(kind=rp), dimension(:), allocatable spectral_error::spectral_error_t::eind_v

Definition at line 91 of file spectral_error.f90.

◆ eind_w

real(kind=rp), dimension(:), allocatable spectral_error::spectral_error_t::eind_w

Definition at line 91 of file spectral_error.f90.

◆ mf_speri

type(file_t) spectral_error::spectral_error_t::mf_speri

Definition at line 97 of file spectral_error.f90.

◆ order

integer simulation_component::simulation_component_t::order
inherited

Definition at line 59 of file simulation_component.f90.

◆ output_controller

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

Definition at line 57 of file simulation_component.f90.

◆ preprocess_controller

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

Definition at line 53 of file simulation_component.f90.

◆ seri_elr

integer spectral_error::spectral_error_t::seri_elr = 0

Definition at line 89 of file spectral_error.f90.

◆ seri_np

integer spectral_error::spectral_error_t::seri_np = 4

Definition at line 86 of file spectral_error.f90.

◆ seri_np_max

integer spectral_error::spectral_error_t::seri_np_max = 4

Definition at line 87 of file spectral_error.f90.

◆ seri_small

real(kind=rp) spectral_error::spectral_error_t::seri_small = 1.e-14

Definition at line 78 of file spectral_error.f90.

◆ seri_smallg

real(kind=rp) spectral_error::spectral_error_t::seri_smallg = 1.e-5

Definition at line 82 of file spectral_error.f90.

◆ seri_smallr

real(kind=rp) spectral_error::spectral_error_t::seri_smallr = 1.e-10

Definition at line 80 of file spectral_error.f90.

◆ seri_smalls

real(kind=rp) spectral_error::spectral_error_t::seri_smalls = 0.2

Definition at line 84 of file spectral_error.f90.

◆ sig_u

real(kind=rp), dimension(:), allocatable spectral_error::spectral_error_t::sig_u

Definition at line 93 of file spectral_error.f90.

◆ sig_v

real(kind=rp), dimension(:), allocatable spectral_error::spectral_error_t::sig_v

Definition at line 93 of file spectral_error.f90.

◆ sig_w

real(kind=rp), dimension(:), allocatable spectral_error::spectral_error_t::sig_w

Definition at line 93 of file spectral_error.f90.

◆ speri_l

type(field_list_t) spectral_error::spectral_error_t::speri_l

Definition at line 95 of file spectral_error.f90.

◆ u

type(field_t), pointer spectral_error::spectral_error_t::u => null()

Definition at line 68 of file spectral_error.f90.

◆ u_hat

type(field_t), pointer spectral_error::spectral_error_t::u_hat => null()

Definition at line 72 of file spectral_error.f90.

◆ v

type(field_t), pointer spectral_error::spectral_error_t::v => null()

Definition at line 69 of file spectral_error.f90.

◆ v_hat

type(field_t), pointer spectral_error::spectral_error_t::v_hat => null()

Definition at line 73 of file spectral_error.f90.

◆ w

type(field_t), pointer spectral_error::spectral_error_t::w => null()

Definition at line 70 of file spectral_error.f90.

◆ w_hat

type(field_t), pointer spectral_error::spectral_error_t::w_hat => null()

Definition at line 74 of file spectral_error.f90.

◆ wk

type(field_t) spectral_error::spectral_error_t::wk

Definition at line 76 of file spectral_error.f90.

◆ writer

type(field_writer_t) spectral_error::spectral_error_t::writer

Definition at line 99 of file spectral_error.f90.


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