18 #ifndef OUTPUT_TIME_HH_ 19 #define OUTPUT_TIME_HH_ 65 virtual void init_from_input(
const std::string &equation_name,
67 const std::shared_ptr<TimeUnitConversion>& time_unit_conv);
72 void set_stream_precision(std::ofstream &stream);
107 static const unsigned int N_DISCRETE_SPACES = 4;
143 static std::shared_ptr<OutputTime> create_output_stream(
const std::string &equation_name,
145 const std::shared_ptr<TimeUnitConversion>& time_unit_conv);
150 void write_time_frame();
155 std::shared_ptr<Observe> observe(
Mesh *mesh);
160 void clear_data(
void);
166 return (
bool)(nodes_);
171 return enable_refinement_;
179 virtual void set_output_data_caches(std::shared_ptr<OutputMeshBase> mesh_ptr);
184 std::shared_ptr<OutputMeshBase> get_output_mesh_ptr();
189 void update_time(
double field_time);
204 template <
typename T>
205 OutputDataPtr prepare_compute_data(std::string field_name,
DiscreteSpace space_type,
unsigned int n_rows,
unsigned int n_cols);
211 return this->parallel_;
225 return this->n_proc_;
230 return registered_time_;
239 void fix_main_file_extension(std::string extension);
249 int get_parallel_current_step();
255 virtual int write_data(
void) = 0;
260 void gather_output_data(
void);
276 OutputDataFieldVec output_data_vec_[N_DISCRETE_SPACES];
334 std::shared_ptr<ElementDataCache<double>>
nodes_;
338 std::shared_ptr<ElementDataCache<unsigned int>>
offsets_;
Class represents output mesh with continuous elements.
Input::Record input_record_
Base class for Output mesh.
std::shared_ptr< ElementDataCache< unsigned int > > connectivity_
Vector maps the nodes to their coordinates in vector nodes_.
std::shared_ptr< OutputMeshBase > output_mesh_
Output mesh.
std::shared_ptr< ElementDataCache< unsigned int > > offsets_
Vector of offsets of node indices of elements. Maps elements to their nodes in connectivity_.
std::shared_ptr< Observe > observe_
std::shared_ptr< ElementDataCacheBase > OutputDataPtr
std::map< DiscreteSpace, std::vector< FieldInterpolationData > > InterpolationMap
std::shared_ptr< ElementDataCache< double > > nodes_
Vector of node coordinates. [spacedim x n_nodes].
bool is_output_data_caches_init()
Helper class storing unit conversion coefficient and functionality for conversion of units...
unsigned int DiscreteSpaceFlags
bool parallel_
Parallel or serial version of file format (parallel has effect only for VTK)
Class represents output mesh with discontinuous elements.
bool enable_refinement()
Return auxiliary flag enable_refinement_.
std::pair< std::string, unsigned int > FieldInterpolationData
pair of field name and shape (= Scalar 1, Vector 3, Tensor 9)
The class for outputting data during time.
std::shared_ptr< TimeUnitConversion > time_unit_converter
Time unit conversion object from the equation time governor.
double registered_time() const
Getter to registered time.
Dedicated class for storing path to input and output files.
bool enable_refinement_
Auxiliary flag for refinement enabling, due to gmsh format.
std::vector< OutputDataPtr > OutputDataFieldVec
std::string equation_name_