Flow123d  release_2.2.0-23-g01927c6
Public Member Functions | Private Member Functions | Static 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]

Public Member Functions

 DECLARE_EXCEPTION (ExcFieldNotScalar,<< "Field '"<< FieldCommon::EI_Field::qval<< "' is not scalar in spacedim 3.")
 
const Input::Type::Instancemake_output_type (const string &equation_name, const string &aditional_description="")
 
void initialize (std::shared_ptr< OutputTime > stream, Input::Record in_rec, const TimeGovernor &tg)
 
bool is_field_output_time (const FieldCommon &field, TimeStep step) const
 
void output (TimeStep step)
 
void select_error_control_field (std::string error_control_field_name)
 Selects the error control field out of output field set according to input record. More...
 
- Public Member Functions inherited from FieldSet
 DECLARE_EXCEPTION (ExcUnknownField,<< "Field set has no field with name: "<< FieldCommon::EI_Field::qval)
 
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)
 
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
 
FieldCommonadd_field (FieldCommon *field, const string &name, const string &desc, const string &d_val="")
 

Private Member Functions

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 ()
 

Static Private Member Functions

static Input::Type::Recordget_input_type ()
 

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, OutputTimeSetfield_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...
 
Field< 3, FieldValue< 3 >::Scalar > * error_control_field_
 Refinement error control field. More...
 

Additional Inherited Members

- 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 Attributes inherited from FieldSet
std::vector< FieldCommon * > field_list
 List of all fields. 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 27 of file equation_output.hh.

Member Function Documentation

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

Add a time grid to the common_output_times.

Definition at line 177 of file equation_output.cc.

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

Input type of the configuration record.

Definition at line 22 of file equation_output.cc.

Here is the caller graph for this function:

void EquationOutput::initialize ( std::shared_ptr< OutputTime stream,
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 88 of file equation_output.cc.

Here is the caller graph for this function:

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 145 of file equation_output.cc.

Here is the caller graph for this function:

void EquationOutput::make_output_mesh ( )
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 183 of file equation_output.cc.

Here is the caller graph for this function:

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 FeildSet using provided equation name and additional description.

Definition at line 57 of file equation_output.cc.

Here is the caller graph for this function:

void EquationOutput::output ( TimeStep  step)

Performs output of the fields marked for output in the time

Parameters
step.

Definition at line 156 of file equation_output.cc.

Here is the caller graph for this function:

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 98 of file equation_output.cc.

Here is the caller graph for this function:

void EquationOutput::select_error_control_field ( std::string  error_control_field_name)

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

Definition at line 221 of file equation_output.cc.

Here is the caller graph for this function:

Member Data Documentation

OutputTimeSet EquationOutput::common_output_times_
private

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

Definition at line 91 of file equation_output.hh.

TimeMark::Type EquationOutput::equation_fixed_type_
private

The fixed time mark type of the equation.

Definition at line 89 of file equation_output.hh.

TimeMark::Type EquationOutput::equation_type_
private

The time mark type of the equation.

Definition at line 87 of file equation_output.hh.

Field<3, FieldValue<3>::Scalar>* EquationOutput::error_control_field_
private

Refinement error control field.

Definition at line 100 of file equation_output.hh.

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

Time sets of individual fields.

Definition at line 94 of file equation_output.hh.

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

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

Definition at line 97 of file equation_output.hh.

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

output stream (may be shared by more equation)

Definition at line 85 of file equation_output.hh.


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