Flow123d  build_with_4.0.3-86a16ad
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
EquationOutput Class Reference

#include <equation_output.hh>

Inheritance diagram for EquationOutput:
Inheritance graph
[legend]
Collaboration diagram for EquationOutput:
Collaboration graph
[legend]

Classes

struct  FieldOutputConfig
 Configuration of output of one field. Pair of OutputTimeSet and DiscreteSpaces. More...
 

Public Member Functions

 DECLARE_EXCEPTION (ExcFieldNotScalar,<< "Field '"<< FieldCommon::EI_Field::qval<< "' is not scalar in spacedim 3.")
 
 EquationOutput ()
 Default constructor. More...
 
 ~EquationOutput ()
 Destructor. More...
 
const Input::Type::Instancemake_output_type (const string &equation_name, const string &aditional_description="")
 
const Input::Type::Instancemake_output_type_from_record (Input::Type::Record &in_rec, const string &equation_name, const string &aditional_description="")
 
void initialize (std::shared_ptr< OutputTime > stream, Mesh *mesh, Input::Record in_rec, const TimeGovernor &tg)
 
bool is_field_output_time (const FieldCommon &field, TimeStep step) const
 
void output (TimeStep step)
 
OutputMeshBase::ErrorControlFieldFunc select_error_control_field ()
 Selects the error control field out of output field set according to input record. More...
 
- Public Member Functions inherited from FieldSet
 TYPEDEF_ERR_INFO (EI_FieldType, std::string)
 
 DECLARE_INPUT_EXCEPTION (ExcUnknownField,<< "Unknown field "<< FieldCommon::EI_Field::qval<< " in the "<< EI_FieldType::val<< ": \n")
 
 DECLARE_INPUT_EXCEPTION (ExcFieldExists,<< "Field "<< FieldCommon::EI_Field::qval<< " exists in equation. You cannot set user field of same name.\n")
 
 FieldSet ()
 Default constructor. More...
 
Input::Type::Record make_field_descriptor_type (const std::string &equation_name) const
 
void set_field (const std::string &dest_field_name, FieldCommon &source)
 
FieldCommonfield (const std::string &field_name) const
 
FieldCommonoperator[] (const std::string &field_name) const
 
void set_components (const std::vector< string > &names)
 
void set_mesh (const Mesh &mesh)
 
void set_input_list (Input::Array input_list, const TimeGovernor &tg)
 
void flags_add (FieldFlag::Flags::Mask mask)
 
bool set_time (const TimeStep &time, LimitSide limit_side)
 
void output_type (OutputTime::DiscreteSpace rt)
 
void mark_input_times (const TimeGovernor &tg)
 
bool changed () const
 
bool is_constant (Region reg) const
 
bool is_jump_time () const
 
void cache_reallocate (const ElementCacheMap &cache_map, FieldSet &used_fieldset)
 
void cache_update (ElementCacheMap &cache_map)
 
void set_dependency (FieldSet &used_fieldset)
 
void add_coords_field ()
 
void set_surface_depth (std::shared_ptr< SurfaceDepth > surface_depth)
 Set surface depth object to "d" field. More...
 
Range< FieldListAccessorfields_range () const
 Returns range of Fields held in field_list. More...
 
const Meshmesh () const
 Returns pointer to mesh. More...
 
std::string print_dependency () const
 Return order of evaluated fields by dependency and region_idx. More...
 
void set_default_fieldset ()
 

Static Public Member Functions

static Input::Type::Recordget_input_type ()
 
- Static Public Member Functions inherited from FieldSet
static const Input::Type::Selectionget_user_field_shape_selection ()
 Input selection of user field shape. More...
 
static const Input::Type::Recordmake_user_field_type (const std::string &equation_name)
 Declare input record type of field defined by user. More...
 

Private Member Functions

const Input::Type::Selectioncreate_output_field_selection (const string &equation_name, const string &additional_description)
 
void read_from_input (Input::Record in_rec, const TimeGovernor &tg)
 
void add_output_times (double begin, double step, double end)
 
void make_output_mesh (bool parallel)
 
void init_field_item (Input::Iterator< Input::Record > it, const TimeGovernor &tg)
 Initialize data of Field given by passed Input::Record. More...
 

Private Attributes

std::shared_ptr< OutputTimestream_
 output stream (may be shared by more equation) More...
 
TimeMark::Type equation_type_
 The time mark type of the equation. More...
 
TimeMark::Type equation_fixed_type_
 The fixed time mark type of the equation. More...
 
OutputTimeSet common_output_times_
 The time set used for the fields without explicit time set. More...
 
std::unordered_map< string, FieldOutputConfigfield_output_times_
 Time sets of individual fields. More...
 
std::unordered_set< string > observe_fields_
 Set of observed fields. The observe points are given within the observe stream. More...
 
std::set< OutputTime::DiscreteSpaceused_interpolations_
 
Meshmesh_
 
std::shared_ptr< OutputMeshBaseoutput_mesh_
 Output mesh. More...
 
std::shared_ptr< DOFHandlerMultiDimdh_
 Objects for distribution of dofs. More...
 
std::shared_ptr< DOFHandlerMultiDimdh_node_
 
GenericAssembly< AssemblyOutputElemData > * output_elem_data_assembly_
 general assembly objects, hold assembly objects of appropriate dimension More...
 
GenericAssembly< AssemblyOutputNodeData > * output_node_data_assembly_
 
GenericAssembly< AssemblyOutputNodeData > * output_corner_data_assembly_
 
GenericAssemblyObserve< AssemblyObserveOutput > * observe_output_assembly_
 

Additional Inherited Members

- Public Types inherited from FieldSet
enum  UserFieldShape { scalar , vector , tensor }
 
- Public Types inherited from FieldFlag
typedef FlagArray< FieldFlagFlags
 
typedef Flags::Mask Mask
 
- Static Public Attributes inherited from FieldFlag
static constexpr unsigned int flags_size_ = 3
 Number of bits used by Field itself. More...
 
static constexpr Mask equation_input {1 << 0}
 The field is data parameter of the owning equation. (default on) More...
 
static constexpr Mask declare_input {1 << 1}
 The field can be set from input. The key in input field descriptor is declared. (default on) More...
 
static constexpr Mask allow_output {1 << 2}
 The field can output. Is part of generated output selection. (default on) More...
 
static constexpr Mask input_copy = ~declare_input & equation_input
 
static constexpr Mask in_time_term {1 << 8}
 A field is part of time term of the equation. More...
 
static constexpr Mask in_main_matrix {1 << 9}
 A field is part of main "stiffness matrix" of the equation. More...
 
static constexpr Mask in_rhs {1 << 10}
 A field is part of the right hand side of the equation. More...
 
static constexpr Mask equation_result = allow_output & ~declare_input & ~equation_input
 Match result fields. These are never given by input or copy of input. More...
 
static constexpr Mask equation_external_output = allow_output & input_copy
 Match an output field, that can be also copy of other field. More...
 
- Protected Member Functions inherited from FieldSet
void topological_sort (const FieldCommon *f, unsigned int i_reg, std::unordered_set< const FieldCommon * > &used_fields)
 Helper method sort used fields by dependency. More...
 
- Protected Attributes inherited from FieldSet
std::vector< FieldCommon * > field_list
 List of all fields. More...
 
const Meshmesh_
 Pointer to the mesh. More...
 
std::map< unsigned int, std::vector< const FieldCommon * > > region_field_update_order_
 
FieldCoords X_
 Field holds coordinates for computing of FieldFormulas. More...
 
FieldDepth depth_
 Field holds surface depth for computing of FieldFormulas. More...
 

Detailed Description

A class responsible for check for output times of individual fields and store their values into the connected output stream.

Definition at line 46 of file equation_output.hh.

Constructor & Destructor Documentation

◆ EquationOutput()

EquationOutput::EquationOutput ( )

Default constructor.

Definition at line 82 of file equation_output.cc.

◆ ~EquationOutput()

EquationOutput::~EquationOutput ( )

Destructor.

Definition at line 88 of file equation_output.cc.

Member Function Documentation

◆ add_output_times()

void EquationOutput::add_output_times ( double  begin,
double  step,
double  end 
)
private

Add a time grid to the common_output_times.

Definition at line 355 of file equation_output.cc.

◆ create_output_field_selection()

const IT::Selection & EquationOutput::create_output_field_selection ( const string &  equation_name,
const string &  additional_description 
)
private

Creates output selection from the field set.

Definition at line 97 of file equation_output.cc.

Here is the caller graph for this function:

◆ DECLARE_EXCEPTION()

EquationOutput::DECLARE_EXCEPTION ( ExcFieldNotScalar  ,
<< "Field '"<< FieldCommon::EI_Field::qval<< "' is not scalar in spacedim 3."   
)

◆ get_input_type()

IT::Record & EquationOutput::get_input_type ( )
static

Input type of the configuration record.

Definition at line 28 of file equation_output.cc.

Here is the caller graph for this function:

◆ init_field_item()

void EquationOutput::init_field_item ( Input::Iterator< Input::Record it,
const TimeGovernor tg 
)
private

Initialize data of Field given by passed Input::Record.

Definition at line 208 of file equation_output.cc.

Here is the caller graph for this function:

◆ initialize()

void EquationOutput::initialize ( std::shared_ptr< OutputTime stream,
Mesh mesh,
Input::Record  in_rec,
const TimeGovernor tg 
)

Setup the object. Set output stream for field and observe output, input record for configuration of the object and TimeGovernor. The time governor is used to get the equation time mark type, the initial and the end time of the equation.

Definition at line 140 of file equation_output.cc.

Here is the caller graph for this function:

◆ is_field_output_time()

bool EquationOutput::is_field_output_time ( const FieldCommon field,
TimeStep  step 
) const

Returns true if

Parameters
fieldis marked for output in the given time
step.

Definition at line 248 of file equation_output.cc.

Here is the caller graph for this function:

◆ make_output_mesh()

void EquationOutput::make_output_mesh ( bool  parallel)
private

Create the output mesh of stream_ OutputTime object. The field set passed in is used to select the field used for adaptivity of the output mesh.

Definition at line 361 of file equation_output.cc.

Here is the caller graph for this function:

◆ make_output_type()

const IT::Instance & EquationOutput::make_output_type ( const string &  equation_name,
const string &  aditional_description = "" 
)

Make Input::Type for the output record. Particular selection of output fields is created from the contents of *this FieldSet using provided equation name and additional description.

Definition at line 123 of file equation_output.cc.

Here is the caller graph for this function:

◆ make_output_type_from_record()

const IT::Instance & EquationOutput::make_output_type_from_record ( Input::Type::Record in_rec,
const string &  equation_name,
const string &  aditional_description = "" 
)

Make Input::Type for the output record. This function enables creating output record for a field set record with additional keys provided in in_rec.

Definition at line 128 of file equation_output.cc.

Here is the caller graph for this function:

◆ output()

void EquationOutput::output ( TimeStep  step)

Performs output of the fields marked for output in the time

Parameters
step.

Definition at line 261 of file equation_output.cc.

Here is the caller graph for this function:

◆ read_from_input()

void EquationOutput::read_from_input ( Input::Record  in_rec,
const TimeGovernor tg 
)
private

Read from the input, set output times and time marks. Must be called after set_stream. TODO: add output_stream times. Optional or always?

Definition at line 170 of file equation_output.cc.

Here is the caller graph for this function:

◆ select_error_control_field()

OutputMeshBase::ErrorControlFieldFunc EquationOutput::select_error_control_field ( )

Selects the error control field out of output field set according to input record.

Definition at line 410 of file equation_output.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ common_output_times_

OutputTimeSet EquationOutput::common_output_times_
private

The time set used for the fields without explicit time set.

Definition at line 136 of file equation_output.hh.

◆ dh_

std::shared_ptr<DOFHandlerMultiDim> EquationOutput::dh_
private

Objects for distribution of dofs.

Definition at line 160 of file equation_output.hh.

◆ dh_node_

std::shared_ptr<DOFHandlerMultiDim> EquationOutput::dh_node_
private

Definition at line 161 of file equation_output.hh.

◆ equation_fixed_type_

TimeMark::Type EquationOutput::equation_fixed_type_
private

The fixed time mark type of the equation.

Definition at line 134 of file equation_output.hh.

◆ equation_type_

TimeMark::Type EquationOutput::equation_type_
private

The time mark type of the equation.

Definition at line 132 of file equation_output.hh.

◆ field_output_times_

std::unordered_map<string, FieldOutputConfig> EquationOutput::field_output_times_
private

Time sets of individual fields.

Definition at line 139 of file equation_output.hh.

◆ mesh_

Mesh* EquationOutput::mesh_
private

Cached pointer at computational mesh.

Definition at line 154 of file equation_output.hh.

◆ observe_fields_

std::unordered_set<string> EquationOutput::observe_fields_
private

Set of observed fields. The observe points are given within the observe stream.

Definition at line 142 of file equation_output.hh.

◆ observe_output_assembly_

GenericAssemblyObserve< AssemblyObserveOutput >* EquationOutput::observe_output_assembly_
private

Definition at line 167 of file equation_output.hh.

◆ output_corner_data_assembly_

GenericAssembly< AssemblyOutputNodeData >* EquationOutput::output_corner_data_assembly_
private

Definition at line 166 of file equation_output.hh.

◆ output_elem_data_assembly_

GenericAssembly< AssemblyOutputElemData >* EquationOutput::output_elem_data_assembly_
private

general assembly objects, hold assembly objects of appropriate dimension

Definition at line 164 of file equation_output.hh.

◆ output_mesh_

std::shared_ptr<OutputMeshBase> EquationOutput::output_mesh_
private

Output mesh.

Definition at line 157 of file equation_output.hh.

◆ output_node_data_assembly_

GenericAssembly< AssemblyOutputNodeData >* EquationOutput::output_node_data_assembly_
private

Definition at line 165 of file equation_output.hh.

◆ stream_

std::shared_ptr<OutputTime> EquationOutput::stream_
private

output stream (may be shared by more equation)

Definition at line 130 of file equation_output.hh.

◆ used_interpolations_

std::set<OutputTime::DiscreteSpace> EquationOutput::used_interpolations_
private

Set of interpolations which are used in performed fields.

Allow determine type of output mesh.

Definition at line 149 of file equation_output.hh.


The documentation for this class was generated from the following files: