DOLFINx 0.9.0
DOLFINx C++ interface
|
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="/") |
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()) |
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) |
template<std::floating_point T> | |
void | initialize_function_attributes (adios2::IO &io, const typename adios2_writer::U< T > &u) |
template<typename T , std::floating_point U> | |
std::vector< T > | pack_function_data (const fem::Function< T, U > &u) |
template<typename T , std::floating_point U> | |
void | write_data (adios2::IO &io, adios2::Engine &engine, const fem::Function< T, U > &u) |
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. | |
std::stringstream | create_vtk_schema (const std::vector< std::string > &point_data, const std::vector< std::string > &cell_data) |
template<std::floating_point T> | |
std::vector< std::string > | extract_function_names (const typename adios2_writer::U< T > &u) |
Extract name of functions and split into real and imaginary component. | |
template<typename T , std::floating_point X> | |
void | vtx_write_data (adios2::IO &io, adios2::Engine &engine, const fem::Function< T, X > &u) |
template<std::floating_point T> | |
void | vtx_write_mesh (adios2::IO &io, adios2::Engine &engine, const mesh::Mesh< T > &mesh) |
template<std::floating_point T> | |
std::pair< std::vector< std::int64_t >, std::vector< std::uint8_t > > | vtx_write_mesh_from_space (adios2::IO &io, adios2::Engine &engine, const fem::FunctionSpace< T > &V) |
Given a FunctionSpace, create a topology and geometry based on the function space dof coordinates. Writes the topology and geometry using ADIOS2 in VTX format. | |
Variables | |
constexpr std::array | field_ext = {"_real", "_imag"} |
ADIOS2-based output writers.
std::stringstream create_vtk_schema | ( | const std::vector< std::string > & | point_data, |
const std::vector< std::string > & | cell_data ) |
Create VTK xml scheme to be interpreted by the VTX reader https://adios2.readthedocs.io/en/latest/ecosystem/visualization.html#saving-the-vtk-xml-data-model
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.
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.
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
[in] | io | The ADIOS2 IO |
[in] | u | List of functions |
void initialize_mesh_attributes | ( | adios2::IO & | io, |
mesh::CellType | type ) |
Initialize mesh related attributes for the ADIOS2 file used in Fides.
[in] | io | ADIOS2 IO object |
[in] | type | Cell type |
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'.
void vtx_write_data | ( | adios2::IO & | io, |
adios2::Engine & | engine, | ||
const fem::Function< T, X > & | u ) |
Given a Function, write the coefficient to file using ADIOS2.
[in] | io | ADIOS2 io object. |
[in] | engine | ADIOS2 engine object. |
[in] | u | Function to write. |
void vtx_write_mesh | ( | adios2::IO & | io, |
adios2::Engine & | engine, | ||
const mesh::Mesh< T > & | mesh ) |
Write mesh to file using VTX format
[in] | io | The ADIOS2 io object |
[in] | engine | The ADIOS2 engine object |
[in] | mesh | The mesh |
std::pair< std::vector< std::int64_t >, std::vector< std::uint8_t > > vtx_write_mesh_from_space | ( | adios2::IO & | io, |
adios2::Engine & | engine, | ||
const fem::FunctionSpace< T > & | V ) |
Given a FunctionSpace, create a topology and geometry based on the function space dof coordinates. Writes the topology and geometry using ADIOS2 in VTX format.
[in] | io | The ADIOS2 io object |
[in] | engine | The ADIOS2 engine object |
[in] | V | The function space |
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.
[in] | io | The ADIOS2 io object |
[in] | engine | The ADIOS2 engine object |
[in] | u | The function to write |
void write_mesh | ( | adios2::IO & | io, |
adios2::Engine & | engine, | ||
const mesh::Mesh< T > & | mesh ) |
Write mesh geometry and connectivity (topology) for Fides.
[in] | io | The ADIOS2 IO |
[in] | engine | The ADIOS2 engine |
[in] | mesh | The mesh |
|
constexpr |
String suffix for real and complex components of a vector-valued field