33 #include <boost/any.hpp>
44 using namespace Input::Type;
47 =
Record(
"OutputStream",
"Parameters of output.")
50 "File path to the connected output file.")
53 "Format of output stream and possible parameters.")
55 "Time interval between outputs.\n"
56 "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"
57 "The start time and the end time are always added. ")
59 "Explicit array of output time points (can be combined with 'time_step'.")
61 "Add all input time points of the equation, mentioned in the 'input_fields' list, also as the output points.");
66 "Format of output stream and possible parameters.");
74 if(fname->compare(fname->size()-4, 4,
".pvd") != 0) {
75 xprintf(
Warn,
"Renaming name of output file from: %s to %s.pvd\n", fname->c_str(), fname->c_str());
76 *fname = *fname +
".pvd";
86 if(fname->compare(fname->size()-4, 4,
".msh") != 0) {
87 xprintf(
Warn,
"Renaming name of output file from: %s to %s.msh\n", fname->c_str(), fname->c_str());
88 *fname = *fname +
".msh";
100 data_vector = &this->node_data;
103 data_vector = &this->corner_data;
106 data_vector = &this->elem_data;
111 for(
auto &data : *data_vector)
112 if (data->field_name == field_name)
return data;
183 xprintf(
Warn,
"Unsupported file format, using default VTK\n");
237 for (
auto it = in_sel.
begin(); it != in_sel.
end(); ++it)
239 output_names.insert(std::pair<std::string, bool>(it->key_,
false));
242 for (
auto it: field_ids)
249 : input_record_(in_rec)
253 ASSERT(ierr == 0,
"Error in MPI_Comm_rank.");
289 base_file =
new ofstream;
292 base_file->open(fname.c_str());
293 INPUT_CHECK( base_file->is_open() ,
"Can not open output file: %s\n", fname.c_str() );
294 xprintf(
MsgLog,
"Writing flow output file: %s ... \n", fname.c_str());
297 base_filename =
new string(fname);
353 for(
auto it = tg.
marks().
begin(input_mark_type); it != tg.
marks().
end(input_mark_type); ++it)
354 mark_times.push_back(it->time());
355 for(
double time : mark_times)
367 ASSERT(ierr == 0,
"Error in MPI_Comm_rank.");
440 #define INSTANCE_register_field(spacedim, value) \
441 template void OutputTime::register_data<spacedim, value> \
442 (const DiscreteSpace ref_type, Field<spacedim, value> &field);
444 #define INSTANCE_register_multifield(spacedim, value) \
445 template void OutputTime::register_data<spacedim, value> \
446 (const DiscreteSpace ref_type, MultiField<spacedim, value> &field);
449 #define INSTANCE_OutputData(spacedim, value) \
450 template class OutputData<value>;
453 #define INSTANCE_DIM_DEP_VALUES( MACRO, dim_from, dim_to) \
454 MACRO(dim_from, FieldValue<dim_to>::VectorFixed ) \
455 MACRO(dim_from, FieldValue<dim_to>::TensorFixed )
457 #define INSTANCE_TO_ALL( MACRO, dim_from) \
458 MACRO(dim_from, FieldValue<0>::Enum ) \
459 MACRO(dim_from, FieldValue<0>::EnumVector) \
460 MACRO(dim_from, FieldValue<0>::Integer) \
461 MACRO(dim_from, FieldValue<0>::Scalar) \
462 MACRO(dim_from, FieldValue<0>::Vector) \
464 INSTANCE_DIM_DEP_VALUES(MACRO, dim_from, 2) \
465 INSTANCE_DIM_DEP_VALUES(MACRO, dim_from, 3) \
467 #define INSTANCE_ALL(MACRO) \
468 INSTANCE_TO_ALL( MACRO, 3) \
469 INSTANCE_TO_ALL( MACRO, 2)