32 using namespace
Input::Type;
35 return Record(
"OutputStream",
"Parameters of output.")
37 .
declare_key(
"file", FileName::output(), Default::obligatory(),
38 "File path to the connected output file.")
41 "Format of output stream and possible parameters.")
43 "Time interval between outputs.\n" 44 "Regular grid of output time points starts at the initial time of the equation and ends at the end time which must be specified.\n" 45 "The start time and the end time are always added. ")
47 Default::read_time(
"List containing the initial time of the equation. \n You can prescribe an empty list to override this behavior."),
48 "Explicit array of output time points (can be combined with 'time_step'.")
50 "Add all input time points of the equation, mentioned in the 'input_fields' list, also as the output points.")
56 return Abstract(
"OutputTime",
"Format of output stream and possible parameters.")
105 if(this->
_base_filename.compare(this->_base_filename.size()-extension.size(), extension.size(), extension) != 0) {
136 std::shared_ptr<OutputTime> output_time;
142 output_time->format_record_ = *format;
156 for (
auto field_full_enum: field_ids) {
192 mark_times.push_back(
it->time());
193 for(
double time : mark_times)
205 if (this->
rank == 0) {
209 xprintf(
MsgLog,
"Write output to output stream: %s for time: %f\n",
230 #define INSTANCE_register_field(spacedim, value) \ 231 template void OutputTime::register_data<spacedim, value> \ 232 (const DiscreteSpace ref_type, Field<spacedim, value> &field); 234 #define INSTANCE_register_multifield(spacedim, value) \ 235 template void OutputTime::register_data<spacedim, value> \ 236 (const DiscreteSpace ref_type, MultiField<spacedim, value> &field); 239 #define INSTANCE_OutputData(spacedim, value) \ 240 template class OutputData<value>; 243 #define INSTANCE_DIM_DEP_VALUES( MACRO, dim_from, dim_to) \ 244 MACRO(dim_from, FieldValue<dim_to>::VectorFixed ) \ 245 MACRO(dim_from, FieldValue<dim_to>::TensorFixed ) 247 #define INSTANCE_TO_ALL( MACRO, dim_from) \ 248 MACRO(dim_from, FieldValue<0>::Enum ) \ 249 MACRO(dim_from, FieldValue<0>::EnumVector) \ 250 MACRO(dim_from, FieldValue<0>::Integer) \ 251 MACRO(dim_from, FieldValue<0>::Scalar) \ 252 MACRO(dim_from, FieldValue<0>::Vector) \ 253 INSTANCE_DIM_DEP_VALUES(MACRO, dim_from, 2) \ 254 INSTANCE_DIM_DEP_VALUES(MACRO, dim_from, 3) \ 256 #define INSTANCE_ALL(MACRO) \ 257 INSTANCE_TO_ALL( MACRO, 3) \ 258 INSTANCE_TO_ALL( MACRO, 2)
Input::Record input_record_
#define INSTANCE_register_multifield(spacedim, value)
static Input::Type::Abstract & get_input_format_type()
The specification of output file format.
void fix_main_file_extension(std::string extension)
TimeMarks::iterator begin(TimeMark::Type mask=TimeMark::every_type) const
Iterator for the begin mimics container-like of TimeMarks.
void add_admissible_field_names(const Input::Array &in_array)
Registers names of output fields that can be written using this stream.
#define INSTANCE_ALL(MACRO)
TimeMark::Type type_output()
OutputTime()
Default constructor. Only for testing.
Basic time management functionality for unsteady (and steady) solvers (class Equation).
static TimeMarks & marks()
std::map< std::string, DiscreteSpaceFlags > output_names
unsigned int DiscreteSpaceFlags
void add(const TimeMark &mark)
void add_time_marks_grid(double step, TimeMark::Type mark_type=TimeMark::none_type) const
TimeMark::Type equation_fixed_mark_type() const
TimeMark::Type equation_mark_type() const
#define START_TIMER(tag)
Starts a timer with specified tag.
virtual ~OutputTime()
Destructor of OutputTime. It doesn't do anything, because all necessary destructors will be called in...
void clear_data(void)
Clear data for output computed by method compute_field_data.
The class for outputting data during time.
void mark_output_times(const TimeGovernor &tg)
static std::shared_ptr< OutputTime > create_output_stream(const Input::Record &in_rec)
This method delete all object instances of class OutputTime stored in output_streams vector...
Dedicated class for storing path to input and output files.
TimeMark::Type type_input()
virtual int write_data(void)=0
Virtual method for writing data to output file.
#define INSTANCE_register_field(spacedim, value)
OutputDataFieldVec output_data_vec_[N_DISCRETE_SPACES]
Class used for marking specified times at which some events occur.
TimeMarks::iterator end(TimeMark::Type mask=TimeMark::every_type) const
Iterator for the end mimics container-like of TimeMarks.
#define FLOW123D_FORCE_LINK_IN_PARENT(x)