Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/df/d34/ADIOS2Writers_8h.html
DOLFINx 0.7.3
DOLFINx C++ interface
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
ADIOS2Writers.h File Reference

ADIOS2-based output writers. More...

Go to the source code of this file.

Classes

class  ADIOS2Writer
 Base class for ADIOS2-based writers. More...
 

Namespaces

namespace  dolfinx
 Top-level namespace.
 
namespace  dolfinx::fem
 Finite element method functionality.
 
namespace  dolfinx::io
 Support for file IO.
 

Functions

template<class T >
adios2::Attribute< T > define_attribute (adios2::IO &io, std::string name, const T &value, std::string var_name="", std::string separator="/")
 Safe definition of an attribute. First check if it has already been defined and return it. If not defined create new attribute.
 
template<class T >
adios2::Variable< T > define_variable (adios2::IO &io, std::string name, const adios2::Dims &shape=adios2::Dims(), const adios2::Dims &start=adios2::Dims(), const adios2::Dims &count=adios2::Dims())
 Safe definition of a variable. First check if it has already been defined and return it. If not defined create new variable.
 
template<std::floating_point T>
std::shared_ptr< const mesh::Mesh< T > > extract_common_mesh (const typename adios2_writer::U< T > &u)
 Extract common mesh from list of Functions.
 
void initialize_mesh_attributes (adios2::IO &io, mesh::CellType type)
 Initialize mesh related attributes for the ADIOS2 file used in Fides.
 
template<std::floating_point T>
void initialize_function_attributes (adios2::IO &io, const typename adios2_writer::U< T > &u)
 Initialize function related attributes for the ADIOS2 file used in Fides.
 
template<typename T , std::floating_point U>
std::vector< T > pack_function_data (const fem::Function< T, U > &u)
 Pack Function data at vertices. The mesh and the function must both be 'P1'.
 
template<typename T , std::floating_point U>
void write_data (adios2::IO &io, adios2::Engine &engine, const fem::Function< T, U > &u)
 Write a first order Lagrange function (real or complex) using ADIOS2 in Fides format. Data is padded to be three dimensional if vector and 9 dimensional if tensor.
 
template<std::floating_point T>
void write_mesh (adios2::IO &io, adios2::Engine &engine, const mesh::Mesh< T > &mesh)
 Write mesh geometry and connectivity (topology) for Fides.
 

Variables

constexpr std::array field_ext = {"_real", "_imag"}
 String suffix for real and complex components of a vector-valued field.
 

Detailed Description

ADIOS2-based output writers.

Function Documentation

◆ initialize_function_attributes()

template<std::floating_point T>
void initialize_function_attributes ( adios2::IO &  io,
const typename adios2_writer::U< T > &  u 
)
protected

Initialize function related attributes for the ADIOS2 file used in Fides.

Parameters
[in]ioThe ADIOS2 IO
[in]uList of functions

◆ initialize_mesh_attributes()

void initialize_mesh_attributes ( adios2::IO &  io,
mesh::CellType  type 
)
protected

Initialize mesh related attributes for the ADIOS2 file used in Fides.

Parameters
[in]ioADIOS2 IO object
[in]typeCell type

◆ write_data()

template<typename T , std::floating_point U>
void write_data ( adios2::IO &  io,
adios2::Engine &  engine,
const fem::Function< T, U > &  u 
)
protected

Write a first order Lagrange function (real or complex) using ADIOS2 in Fides format. Data is padded to be three dimensional if vector and 9 dimensional if tensor.

Parameters
[in]ioThe ADIOS2 io object
[in]engineThe ADIOS2 engine object
[in]uThe function to write

◆ write_mesh()

template<std::floating_point T>
void write_mesh ( adios2::IO &  io,
adios2::Engine &  engine,
const mesh::Mesh< T > &  mesh 
)
protected

Write mesh geometry and connectivity (topology) for Fides.

Parameters
[in]ioThe ADIOS2 IO
[in]engineThe ADIOS2 engine
[in]meshThe mesh