Flow123d
jenkins-Flow123d-windows32-release-multijob-51
|
The class for outputing data during time. More...
#include <output_time.hh>
Public Types | |
enum | DiscreteSpace { NODE_DATA = 0, CORNER_DATA = 1, ELEM_DATA = 3 } |
Public Member Functions | |
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") | |
OutputTime (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... | |
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 () |
void | add_admissible_field_names (const Input::Array &in_array, const Input::Type::Selection &in_sel) |
Registers names of output fields that can be written using this stream. More... | |
void | clear_data (void) |
Clear data for output computed by method compute_field_data . More... | |
void | mark_output_times (const TimeGovernor &tg) |
template<int spacedim, class Value > | |
void | register_data (const Input::Record &in_rec, const RefType type, MultiField< spacedim, Value > &multi_field) |
template<int spacedim, class Value > | |
void | register_data (const Input::Record &in_rec, const RefType ref_type, Field< spacedim, Value > &field_ref) |
Static Public Member Functions | |
static void | destroy_all (void) |
Try to find output stream from a key in record. More... | |
static OutputTime * | create_output_stream (const Input::Record &in_rec) |
This method write all registered data to output streams. More... | |
Static Public Attributes | |
static Input::Type::Record | input_type |
The specification of output stream. More... | |
static Input::Type::AbstractRecord | input_format_type |
The specification of output file format. More... | |
Protected Types | |
enum | OutFileFormat { NONE = 0, GMSH = 1, VTK = 2 } |
typedef enum OutputTime::OutFileFormat | OutFileFormat |
Protected Member Functions | |
template<int spacedim, class Value > | |
void | compute_field_data (DiscreteSpace space, Field< spacedim, Value > &field) |
OutputDataBase * | output_data_by_field_name (const string &field_name, DiscreteSpace ref_type) |
This method returns pointer at existing data, when corresponding output data exists or it creates new one. More... | |
void | set_data_time (void *data, double time) |
This method set current time for registered data array/vector. More... | |
virtual int | write_data (void)=0 |
virtual int | write_head (void)=0 |
virtual int | write_tail (void)=0 |
string * | base_filename () |
ofstream & | get_base_file (void) |
ofstream & | get_data_file (void) |
string & | get_data_filename (void) |
Mesh * | get_mesh (void) |
unsigned int | get_corner_count (void) |
void | set_data_file (ofstream *_data_file) |
void | set_mesh (Mesh *_mesh) |
void | set_base_file (ofstream *_base_file) |
Protected Attributes | |
int | rank |
MPI rank of process (is tested in methods) More... | |
OutFileFormat | file_format |
vector< OutputDataBase * > | node_data |
vector< OutputDataBase * > | corner_data |
vector< OutputDataBase * > | elem_data |
int | current_step |
Current step. More... | |
double | time |
The newest time of registered data. More... | |
double | write_time |
The last time, when data was wrote to this stream. More... | |
map< string, bool > | output_names |
Map of names of output fields. True means that field will be saved. More... | |
Input::Record | input_record_ |
Static Protected Attributes | |
static std::vector< OutputTime * > | output_streams |
Vector of pointers at OutputTime. More... | |
Private Attributes | |
ofstream * | base_file |
Base output stream. More... | |
string * | _base_filename |
Name of base output file. More... | |
string * | data_filename |
Name of data output file. More... | |
ofstream * | data_file |
Data output stream (could be same as base_file) More... | |
Mesh * | mesh |
The class for outputing data during time.
This class is descendant of Output class. This class is used for outputing 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 37 of file output_time.hh.
|
protected |
Enumeration of file formats supported by Flow123d
Types of reference data
Enumerator | |
---|---|
NODE_DATA | |
CORNER_DATA | |
ELEM_DATA |
Definition at line 46 of file output_time.hh.
|
protected |
Enumeration of file formats supported by Flow123d
Enumerator | |
---|---|
NONE | |
GMSH | |
VTK |
Definition at line 182 of file output_time.hh.
OutputTime::OutputTime | ( | const Input::Record & | in_rec | ) |
Constructor of OutputTime object. It opens base file for writing.
Declaration of exceptions
[in] | in_rec | The reference on the input record |
|
virtual |
Destructor of OutputTime. It doesn't do anything, because all necessary destructors will be called in destructor of Output.
void OutputTime::add_admissible_field_names | ( | const Input::Array & | in_array, |
const Input::Type::Selection & | in_sel | ||
) |
|
inlineprotected |
void OutputTime::clear_data | ( | void | ) |
|
protected |
|
static |
OutputTime::DECLARE_EXCEPTION | ( | ExcOutputVariableVector | , |
<< "Can not output field "<< EI_FieldName::qval<< " returning variable size vectors. Try convert to MultiField.\n" | |||
) |
|
static |
Try to find output stream from a key in record.
Try to find output stream with this name Does OutputStream with same name and filename exist?
When this record is already created, then it returns pointer at corresponding OutputTime. When this record doesn't exist, then it create new OutputTime object and it puts this object to the array of OutputTime pointers
[in] | in_rec | The reference at the input record This method delete all object instances of class OutputTime stored in output_streams vector |
|
inlineprotected |
Definition at line 225 of file output_time.hh.
|
inlineprotected |
Definition at line 233 of file output_time.hh.
|
inlineprotected |
Definition at line 227 of file output_time.hh.
|
inlineprotected |
Definition at line 229 of file output_time.hh.
|
inlineprotected |
void OutputTime::mark_output_times | ( | const TimeGovernor & | tg | ) |
Add time marks matching given tgoutput_mark_type
as well as general output type TimeMarks::type_output(). The time marks denotes times when output should be performed according to the input record of the output stream, namely keys: time_step, time_list, and include_input_times.
Definition at line 331 of file output.cc.
|
protected |
void OutputTime::register_data | ( | const Input::Record & | in_rec, |
const RefType | type, | ||
MultiField< spacedim, Value > & | multi_field | ||
) |
Definition at line 8 of file output_impl.hh.
void OutputTime::register_data | ( | const Input::Record & | in_rec, |
const RefType | ref_type, | ||
Field< spacedim, Value > & | field_ref | ||
) |
Definition at line 19 of file output_impl.hh.
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 243 of file output.h.
void OutputTime::register_data | ( | const DiscreteSpace | ref_type, |
Field< spacedim, Value > & | field | ||
) |
|
inlineprotected |
|
inlineprotected |
Definition at line 243 of file output_time.hh.
|
protected |
This method set current time for registered data array/vector.
|
inlineprotected |
OutputTime::TYPEDEF_ERR_INFO | ( | EI_FieldName | , |
std::string | |||
) |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
void OutputTime::write_time_frame | ( | ) |
|
private |
Name of base output file.
Definition at line 171 of file output_time.hh.
|
private |
Base output stream.
Definition at line 170 of file output_time.hh.
|
protected |
Definition at line 268 of file output_time.hh.
|
protected |
Current step.
Definition at line 272 of file output_time.hh.
|
private |
Data output stream (could be same as base_file)
Definition at line 173 of file output_time.hh.
|
private |
Name of data output file.
Definition at line 172 of file output_time.hh.
|
protected |
Definition at line 269 of file output_time.hh.
|
protected |
Definition at line 263 of file output_time.hh.
|
static |
The specification of output file format.
Definition at line 62 of file output_time.hh.
|
protected |
Definition at line 280 of file output_time.hh.
|
static |
The specification of output stream.
Definition at line 57 of file output_time.hh.
|
private |
Definition at line 174 of file output_time.hh.
|
protected |
Definition at line 267 of file output_time.hh.
|
protected |
Map of names of output fields. True means that field will be saved.
Definition at line 278 of file output_time.hh.
|
staticprotected |
Vector of pointers at OutputTime.
Definition at line 250 of file output_time.hh.
|
protected |
MPI rank of process (is tested in methods)
Definition at line 261 of file output_time.hh.
|
protected |
The newest time of registered data.
Definition at line 274 of file output_time.hh.
|
protected |
The last time, when data was wrote to this stream.
Definition at line 276 of file output_time.hh.