52 void write(std::ostream& out) const;
54 void write(const std::filesystem::path& file) const;
60 std::variant<std::vector<Real>, std::vector<Index>, std::vector<std::int32_t>,
61 std::vector<std::uint8_t>>
68 std::vector<Array> cell_arrays_;
69 std::vector<Array> point_arrays_;
VtkWriter(const mesh::Mesh< Dim > &mesh, VtkFormat format=VtkFormat::kBinary)
VtkWriter & cell_scalars(std::string name, std::span< const Real > values)
Index num_points() const noexcept
Number of points written: vertices, plus one edge node per edge for order-2 meshes.
VtkWriter & cell_vectors(std::string name, std::span< const Point< Dim > > values)
VtkWriter & point_scalars(std::string name, std::span< const Real > values)
VtkWriter & point_vectors(std::string name, std::span< const Point< Dim > > values)
void write(std::ostream &out) const
Definition field_export.hpp:21
void write_vtu_facets(const mesh::Mesh< Dim > &mesh, const std::filesystem::path &file, bool boundary_only=true, VtkFormat format=VtkFormat::kBinary)
VtkFormat
Definition vtk.hpp:23
template void write_vtu_facets< 2 >(const mesh::Mesh< 2 > &, const std::filesystem::path &, bool, VtkFormat)
template void write_vtu_facets< 3 >(const mesh::Mesh< 3 > &, const std::filesystem::path &, bool, VtkFormat)
double Real
Definition types.hpp:15
Eigen::Matrix< Real, Dim, 1 > Point
Definition types.hpp:27
Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition types.hpp:22
std::int64_t Index
global indices (DoFs, entities)
Definition types.hpp:17
std::complex< double > Complex
Definition types.hpp:16
One data array of the file; public so that write_vtu_facets can reuse the encoder.
Definition vtk.hpp:57
std::variant< std::vector< Real >, std::vector< Index >, std::vector< std::int32_t >, std::vector< std::uint8_t > > data
Definition vtk.hpp:62
std::string name
Definition vtk.hpp:58