GridFormat 0.4.0
I/O-Library for grid-like data structures
Loading...
Searching...
No Matches
GridFormat::GridWriterBase< G > Class Template Reference

Base class for all writer implementations.

#include <writer.hpp>

Inheritance diagram for GridFormat::GridWriterBase< G >:
GridFormat::GridWriter< G > GridFormat::TimeSeriesGridWriter< VTKWriter::Grid > GridFormat::VTK::XMLWriterBase< Grid, PVTIWriter< Grid, Communicator > > GridFormat::VTK::XMLWriterBase< Grid, PVTPWriter< Grid, Communicator > > GridFormat::VTK::XMLWriterBase< Grid, PVTRWriter< Grid, Communicator > > GridFormat::VTK::XMLWriterBase< Grid, PVTSWriter< Grid, Communicator > > GridFormat::VTK::XMLWriterBase< Grid, PVTUWriter< Grid, Communicator > > GridFormat::VTK::XMLWriterBase< Grid, VTIWriter< Grid > > GridFormat::VTK::XMLWriterBase< Grid, VTPWriter< Grid > > GridFormat::VTK::XMLWriterBase< Grid, VTRWriter< Grid > > GridFormat::VTK::XMLWriterBase< Grid, VTSWriter< Grid > > GridFormat::VTK::XMLWriterBase< Grid, VTUWriter< Grid > > GridFormat::VTK::XMLWriterBase< G, Impl > GridFormat::PVDWriter< VTKWriter > GridFormat::VTKXMLTimeSeriesWriter< VTKWriter >

Public Types

using Grid = G
 
using Field = typename FieldStorage::Field
 
using FieldPtr = typename FieldStorage::FieldPtr
 

Public Member Functions

 GridWriterBase (const Grid &grid, std::optional< WriterOptions > opts)
 
template<std::ranges::range R>
void set_meta_data (const std::string &name, R &&range)
 
void set_meta_data (const std::string &name, std::string text)
 
template<Concepts::Scalar T>
void set_meta_data (const std::string &name, T value)
 
template<std::derived_from< Field > F>
void set_meta_data (const std::string &name, F &&field)
 
void set_meta_data (const std::string &name, FieldPtr ptr)
 
FieldPtr remove_meta_data (const std::string &name)
 
template<Concepts::PointFunction< Grid > F, Concepts::Scalar T = GridDetail::PointFunctionScalarType<Grid, F>>
void set_point_field (const std::string &name, F &&point_function, const Precision< T > &prec={})
 
template<std::derived_from< Field > F>
void set_point_field (const std::string &name, F &&field)
 
void set_point_field (const std::string &name, FieldPtr field_ptr)
 
FieldPtr remove_point_field (const std::string &name)
 
template<Concepts::CellFunction< Grid > F, Concepts::Scalar T = GridDetail::CellFunctionScalarType<Grid, F>>
void set_cell_field (const std::string &name, F &&cell_function, const Precision< T > &prec={})
 
template<std::derived_from< Field > F>
void set_cell_field (const std::string &name, F &&field)
 
void set_cell_field (const std::string &name, FieldPtr field_ptr)
 
FieldPtr remove_cell_field (const std::string &name)
 
void clear ()
 
void set_ignore_warnings (bool value)
 
const Grid & grid () const
 
const std::optional< WriterOptions > & writer_options () const
 
template<typename Writer >
void copy_fields (Writer &w) const
 

Protected Member Functions

void _log_warning (std::string_view warning) const
 
template<typename EntityFunction , Concepts::Scalar T>
auto _make_point_field (EntityFunction &&f, const Precision< T > &prec) const
 
template<typename EntityFunction , Concepts::Scalar T>
auto _make_cell_field (EntityFunction &&f, const Precision< T > &prec) const
 
std::ranges::range auto _point_field_names () const
 
std::ranges::range auto _cell_field_names () const
 
const Field & _get_point_field (const std::string &name) const
 
FieldPtr _get_point_field_ptr (const std::string &name) const
 
const Field & _get_cell_field (const std::string &name) const
 
FieldPtr _get_cell_field_ptr (const std::string &name) const
 
std::ranges::range auto _meta_data_field_names () const
 
const Field & _get_meta_data_field (const std::string &name) const
 
FieldPtr _get_meta_data_field_ptr (const std::string &name) const
 

Friends

Concepts::RangeOf< std::pair< std::string, FieldPtr > > auto point_fields_of_rank (unsigned int rank, const GridWriterBase &writer)
 Return a range over the fields with the given rank (0=scalars, 1=vectors, 2=tensors)
 
Concepts::RangeOf< std::pair< std::string, FieldPtr > > auto cell_fields_of_rank (unsigned int rank, const GridWriterBase &writer)
 Return a range over the fields with the given rank (0=scalars, 1=vectors, 2=tensors)
 
Concepts::RangeOf< std::pair< std::string, FieldPtr > > auto point_fields (const GridWriterBase &writer)
 
Concepts::RangeOf< std::pair< std::string, FieldPtr > > auto cell_fields (const GridWriterBase &writer)
 
Concepts::RangeOf< std::pair< std::string, FieldPtr > > auto meta_data_fields (const GridWriterBase &writer)
 

The documentation for this class was generated from the following file: