Flow123d
release_2.1.0-87-gfbc1563
|
The class for outputting data during time. More...
#include <output_time.hh>
Public Types | |
enum | DiscreteSpace { NODE_DATA = 0, CORNER_DATA = 1, ELEM_DATA = 2 } |
Public Member Functions | |
OutputTime () | |
Default constructor. Only for testing. More... | |
virtual void | init_from_input (const std::string &equation_name, Mesh &mesh, const Input::Record &in_rec) |
Constructor of OutputTime object. It opens base file for writing. More... | |
virtual | ~OutputTime () |
Destructor of OutputTime. It doesn't do anything, because all necessary destructors will be called in destructor of Output. More... | |
Input::Iterator< Input::Array > | get_time_set_array () |
void | make_output_mesh (FieldSet &output_fields) |
template<int spacedim, class Value > | |
void | register_data (const DiscreteSpace type, MultiField< spacedim, Value > &multi_field) |
Generic method for registering output data stored in MultiField. More... | |
template<int spacedim, class Value > | |
void | register_data (const DiscreteSpace ref_type, Field< spacedim, Value > &field) |
Generic method for registering of output data stored in Field. More... | |
void | write_time_frame () |
std::shared_ptr< Observe > | observe () |
void | clear_data (void) |
Clear data for output computed by method compute_field_data . More... | |
TYPEDEF_ERR_INFO (EI_FieldName, std::string) | |
DECLARE_EXCEPTION (ExcOutputVariableVector,<< "Can not output field "<< EI_FieldName::qval<< " returning variable size vectors. Try convert to MultiField.\n") | |
Static Public Member Functions | |
static const Input::Type::Record & | get_input_type () |
The specification of output stream. More... | |
static Input::Type::Abstract & | get_input_format_type () |
The specification of output file format. More... | |
static std::shared_ptr< OutputTime > | create_output_stream (const std::string &equation_name, Mesh &mesh, const Input::Record &in_rec) |
This method delete all object instances of class OutputTime stored in output_streams vector. More... | |
Static Public Attributes | |
static const unsigned int | N_DISCRETE_SPACES = 3 |
Protected Types | |
typedef std::shared_ptr< OutputDataBase > | OutputDataPtr |
typedef std::vector< OutputDataPtr > | OutputDataFieldVec |
typedef unsigned int | DiscreteSpaceFlags |
Protected Member Functions | |
void | compute_discontinuous_output_mesh () |
template<int spacedim, class Value > | |
void | compute_field_data (DiscreteSpace type, Field< spacedim, Value > &field) |
void | fix_main_file_extension (std::string extension) |
virtual int | write_data (void)=0 |
Virtual method for writing data to output file. More... | |
Protected Attributes | |
int | rank |
OutputDataFieldVec | output_data_vec_ [N_DISCRETE_SPACES] |
int | current_step |
double | time |
double | write_time |
Input::Record | input_record_ |
ofstream | _base_file |
FilePath | _base_filename |
std::string | equation_name_ |
Mesh * | _mesh |
std::shared_ptr< OutputMesh > | output_mesh_ |
Output mesh. More... | |
std::shared_ptr< OutputMeshDiscontinuous > | output_mesh_discont_ |
Discontinuous (non-conforming) mesh. Used for CORNER_DATA. More... | |
std::shared_ptr< Observe > | observe_ |
bool | enable_refinement_ |
Auxliary flag for refinement enabling, due to gmsh format. More... | |
The class for outputting data during time.
This class is descendant of Output class. This class is used for outputting data varying in time. Own output to specific file formats is done at other places to. See output_vtk.cc and output_msh.cc.
Definition at line 48 of file output_time.hh.
|
protected |
Maps names of output fields required by user to their indices in output_data_vec_.
Definition at line 219 of file output_time.hh.
|
protected |
Definition at line 192 of file output_time.hh.
|
protected |
Map field name to its OutputData object.
Definition at line 191 of file output_time.hh.
Enumerator | |
---|---|
NODE_DATA | |
CORNER_DATA | |
ELEM_DATA |
Definition at line 90 of file output_time.hh.
OutputTime::OutputTime | ( | ) |
Default constructor. Only for testing.
Definition at line 65 of file output_time.cc.
|
virtual |
Destructor of OutputTime. It doesn't do anything, because all necessary destructors will be called in destructor of Output.
Definition at line 92 of file output_time.cc.
void OutputTime::clear_data | ( | void | ) |
Clear data for output computed by method compute_field_data
.
Definition at line 247 of file output_time.cc.
|
protected |
|
protected |
Interpolate given field
into output discrete space
and store the values into private storage for postponed output.
Definition at line 112 of file output_time.impl.hh.
|
static |
This method delete all object instances of class OutputTime stored in output_streams vector.
This method tries to create new instance of OutputTime according record in configuration file.
Definition at line 191 of file output_time.cc.
OutputTime::DECLARE_EXCEPTION | ( | ExcOutputVariableVector | , |
<< "Can not output field "<< EI_FieldName::qval<< " returning variable size vectors. Try convert to MultiField.\n" | |||
) |
Declaration of exception
|
protected |
Change main filename to have prescribed extension.
Definition at line 157 of file output_time.cc.
|
static |
The specification of output file format.
Definition at line 58 of file output_time.cc.
|
static |
The specification of output stream.
Definition at line 38 of file output_time.cc.
Input::Iterator< Input::Array > OutputTime::get_time_set_array | ( | ) |
Return the input array for the output time set of the output stream.
Definition at line 106 of file output_time.cc.
|
virtual |
Constructor of OutputTime object. It opens base file for writing.
[in] | equation_name | The name of equation, used for forming output file name. |
[in] | in_rec | The reference on the input record |
Reimplemented in OutputVTK.
Definition at line 76 of file output_time.cc.
void OutputTime::make_output_mesh | ( | FieldSet & | output_fields | ) |
Create the output mesh from the given computational mesh. The field set passed in is used to select the field used for adaptivity of the output mesh.
Definition at line 111 of file output_time.cc.
std::shared_ptr< Observe > OutputTime::observe | ( | ) |
Getter of the oubserve object.
Definition at line 234 of file output_time.cc.
void OutputTime::register_data | ( | const DiscreteSpace | type, |
MultiField< spacedim, Value > & | multi_field | ||
) |
Generic method for registering output data stored in MultiField.
ref_type | Type of output (element, node, corner data). |
multi_field | The actual field for output. |
Definition at line 84 of file output_time.impl.hh.
void OutputTime::register_data | ( | const DiscreteSpace | ref_type, |
Field< spacedim, Value > & | field | ||
) |
Generic method for registering of output data stored in Field.
ref_type | Type of output (element, node, corner data). |
field | The actual field for output. |
Definition at line 99 of file output_time.impl.hh.
OutputTime::TYPEDEF_ERR_INFO | ( | EI_FieldName | , |
std::string | |||
) |
Declaration of new exception info used in following exception
|
protectedpure virtual |
void OutputTime::write_time_frame | ( | ) |
Write all data registered as a new time frame.
Definition at line 205 of file output_time.cc.
|
protected |
Base output stream
Definition at line 229 of file output_time.hh.
|
protected |
Name of base output file
Definition at line 234 of file output_time.hh.
|
protected |
Cached pointer at mesh used by this output stream
Definition at line 245 of file output_time.hh.
|
protected |
Current step
Definition at line 203 of file output_time.hh.
|
protected |
Auxliary flag for refinement enabling, due to gmsh format.
Definition at line 255 of file output_time.hh.
|
protected |
Name of the equation owning the output stream. Usually the balance equation. Used for forming default output file name and the name of observe output file.
Definition at line 240 of file output_time.hh.
|
protected |
Record for current output stream
Definition at line 224 of file output_time.hh.
|
static |
Types of reference data
Definition at line 89 of file output_time.hh.
|
protected |
Definition at line 252 of file output_time.hh.
|
protected |
Registered output data. Single map for every value of DiscreteSpace corresponding to nodes, elements and corners.
Definition at line 198 of file output_time.hh.
|
protected |
Output mesh.
Definition at line 248 of file output_time.hh.
|
protected |
Discontinuous (non-conforming) mesh. Used for CORNER_DATA.
Definition at line 250 of file output_time.hh.
|
protected |
Cached MPI rank of process (is tested in methods)
Definition at line 186 of file output_time.hh.
|
protected |
The newest time of registered data
Definition at line 208 of file output_time.hh.
|
protected |
The last time, when data was wrote to this stream
Definition at line 213 of file output_time.hh.