18 #ifndef OUTPUT_TIME_HH_
19 #define OUTPUT_TIME_HH_
67 const std::shared_ptr<TimeUnitConversion>& time_unit_conv);
126 return dsf[0] | dsf[1] | dsf[2] | dsf[3];
163 const std::shared_ptr<TimeUnitConversion>& time_unit_conv);
224 template <
typename T>
226 std::string fe_type =
"",
unsigned int n_dofs_per_element = 1);
355 std::shared_ptr<ElementDataCache<double>>
nodes_;
359 std::shared_ptr<ElementDataCache<unsigned int>>
offsets_;
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
Dedicated class for storing path to input and output files.
Base class for Output mesh.
Class represents output mesh with discontinuous elements.
Class represents output mesh with continuous elements.
The class for outputting data during time.
std::array< bool, 4 > DiscreteSpaceFlags
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< OutputMeshBase > get_output_mesh_ptr()
void set_stream_precision(std::ofstream &stream)
static Input::Type::Abstract & get_input_format_type()
The specification of output file format.
std::shared_ptr< ElementDataCacheBase > OutputDataPtr
std::string equation_name_
bool enable_refinement_
Auxiliary flag for refinement enabling, due to gmsh format.
static const unsigned int N_DISCRETE_SPACES
static const Input::Type::Record & get_input_type()
The specification of output stream.
void fix_main_file_extension(std::string extension)
OutputTime()
Default constructor. Only for testing.
Input::Iterator< Input::Array > get_time_set_array()
Input::Iterator< Input::Record > get_output_mesh_record()
static DiscreteSpaceFlags empty_discrete_flags()
Check if at least one of discrete space flag is set to true.
virtual int write_data(void)=0
Virtual method for writing data to output file.
bool parallel_
Parallel or serial version of file format (parallel has effect only for VTK)
std::map< DiscreteSpace, std::vector< FieldInterpolationData > > InterpolationMap
std::shared_ptr< TimeUnitConversion > time_unit_converter
Time unit conversion object from the equation time governor.
static void set_discrete_flag(DiscreteSpaceFlags &dsf, DiscreteSpace d_space)
std::pair< std::string, unsigned int > FieldInterpolationData
pair of field name and shape (= Scalar 1, Vector 3, Tensor 9)
static std::shared_ptr< OutputTime > create_output_stream(const std::string &equation_name, const Input::Record &in_rec, const std::shared_ptr< TimeUnitConversion > &time_unit_conv)
This method delete all object instances of class OutputTime stored in output_streams vector.
bool is_output_data_caches_init()
std::shared_ptr< ElementDataCache< unsigned int > > connectivity_
Vector maps the nodes to their coordinates in vector nodes_.
double registered_time() const
Getter to registered time.
std::shared_ptr< Observe > observe(Mesh *mesh)
OutputDataPtr prepare_compute_data(std::string field_name, DiscreteSpace space_type, unsigned int n_rows, unsigned int n_cols, std::string fe_type="", unsigned int n_dofs_per_element=1)
std::shared_ptr< Observe > observe_
std::shared_ptr< OutputMeshBase > output_mesh_
Output mesh.
virtual ~OutputTime()
Destructor of OutputTime. It doesn't do anything, because all necessary destructors will be called in...
void update_time(double field_time)
void clear_data(void)
Clear data for output computed by method compute_field_data.
std::vector< OutputDataPtr > OutputDataFieldVec
OutputDataFieldVec output_data_vec_[N_DISCRETE_SPACES]
int get_parallel_current_step()
Return unique value current step for parallel or serial output.
bool enable_refinement()
Return auxiliary flag enable_refinement_.
std::shared_ptr< ElementDataCache< double > > nodes_
Vector of node coordinates. [spacedim x n_nodes].
void gather_output_data(void)
Collect data of individual processes to serial data on master (0th) process.
static bool discrete_flags_defined(DiscreteSpaceFlags &dsf)
Check if at least one of discrete space flag is set to true.
virtual void set_output_data_caches(std::shared_ptr< OutputMeshBase > mesh_ptr)
virtual void init_from_input(const std::string &equation_name, const Input::Record &in_rec, const std::shared_ptr< TimeUnitConversion > &time_unit_conv)
Constructor of OutputTime object. It opens base file for writing.
Input::Record input_record_
Helper class storing unit conversion coefficient and functionality for conversion of units.