hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
hpfem::io Namespace Reference

Classes

class  FieldExporter
 
class  VtkWriter
 

Enumerations

enum class  VtkFormat : std::uint8_t { kAscii , kBinary }
 

Functions

template<int Dim>
std::vector< Complex > cell_averages (const fespace::DofMap< Dim > &dofs, const Vector &u_h, int extra_order=0)
 
template<int Dim>
std::vector< assembly::ComplexVector< Dim > > cell_averages (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, int extra_order=0)
 Cell averages of a Nédélec field (physical components).
 
template<int Dim>
std::vector< assembly::ComplexCurl< Dim > > cell_average_curls (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, int extra_order=0)
 Cell averages of the curl of a Nédélec field.
 
template std::vector< Complex > cell_averages< 2 > (const fespace::DofMap< 2 > &, const Vector &, int)
 
template std::vector< Complex > cell_averages< 3 > (const fespace::DofMap< 3 > &, const Vector &, int)
 
template std::vector< assembly::ComplexVector< 2 > > cell_averages< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, int)
 
template std::vector< assembly::ComplexVector< 3 > > cell_averages< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, int)
 
template std::vector< assembly::ComplexCurl< 2 > > cell_average_curls< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, int)
 
template std::vector< assembly::ComplexCurl< 3 > > cell_average_curls< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, int)
 
template<int Dim>
void write_vtu_facets (const mesh::Mesh< Dim > &mesh, const std::filesystem::path &file, bool boundary_only=true, VtkFormat format=VtkFormat::kBinary)
 
template<int Dim>
void write_vtu_facets (const mesh::Mesh< Dim > &mesh, std::ostream &out, bool boundary_only=true, VtkFormat format=VtkFormat::kBinary)
 
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)
 
template void write_vtu_facets< 2 > (const mesh::Mesh< 2 > &, std::ostream &, bool, VtkFormat)
 
template void write_vtu_facets< 3 > (const mesh::Mesh< 3 > &, std::ostream &, bool, VtkFormat)
 

Enumeration Type Documentation

◆ VtkFormat

enum class hpfem::io::VtkFormat : std::uint8_t
strong

Encoding of the data arrays: plain text, or inline base64 ("binary" in VTK terms, uncompressed, roughly 4x smaller than ASCII and exact).

Enumerator
kAscii 
kBinary 

Function Documentation

◆ cell_average_curls()

template<int Dim>
std::vector< assembly::ComplexCurl< Dim > > hpfem::io::cell_average_curls ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
int  extra_order = 0 
)

Cell averages of the curl of a Nédélec field.

◆ cell_average_curls< 2 >()

template std::vector< assembly::ComplexCurl< 2 > > hpfem::io::cell_average_curls< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
int   
)
extern

◆ cell_average_curls< 3 >()

template std::vector< assembly::ComplexCurl< 3 > > hpfem::io::cell_average_curls< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
int   
)
extern

◆ cell_averages() [1/2]

template<int Dim>
std::vector< Complex > hpfem::io::cell_averages ( const fespace::DofMap< Dim > &  dofs,
const Vector &  u_h,
int  extra_order = 0 
)

Cell averages \( |K|^{-1}\int_K u_h \) of a scalar field (quadrature exact for degree \( p_K + \text{extra\_order} \) on affine cells).

◆ cell_averages() [2/2]

template<int Dim>
std::vector< assembly::ComplexVector< Dim > > hpfem::io::cell_averages ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
int  extra_order = 0 
)

Cell averages of a Nédélec field (physical components).

◆ cell_averages< 2 >() [1/2]

template std::vector< Complex > hpfem::io::cell_averages< 2 > ( const fespace::DofMap< 2 > &  ,
const Vector &  ,
int   
)
extern

◆ cell_averages< 2 >() [2/2]

template std::vector< assembly::ComplexVector< 2 > > hpfem::io::cell_averages< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
int   
)
extern

◆ cell_averages< 3 >() [1/2]

template std::vector< Complex > hpfem::io::cell_averages< 3 > ( const fespace::DofMap< 3 > &  ,
const Vector &  ,
int   
)
extern

◆ cell_averages< 3 >() [2/2]

template std::vector< assembly::ComplexVector< 3 > > hpfem::io::cell_averages< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
int   
)
extern

◆ write_vtu_facets() [1/2]

template<int Dim>
void hpfem::io::write_vtu_facets ( const mesh::Mesh< Dim > &  mesh,
const std::filesystem::path &  file,
bool  boundary_only = true,
VtkFormat  format = VtkFormat::kBinary 
)

Writes the facets of a mesh (boundary only, or all) as lines / triangles with the cell data facet_tag (Int32), facet_index (Int64) and is_boundary (UInt8), to inspect boundary conditions and interfaces. Points are the mesh vertices (and edge nodes for order 2), so the file overlays the cell file exactly.

◆ write_vtu_facets() [2/2]

template<int Dim>
void hpfem::io::write_vtu_facets ( const mesh::Mesh< Dim > &  mesh,
std::ostream &  out,
bool  boundary_only = true,
VtkFormat  format = VtkFormat::kBinary 
)

◆ write_vtu_facets< 2 >() [1/2]

template void hpfem::io::write_vtu_facets< 2 > ( const mesh::Mesh< 2 > &  ,
const std::filesystem::path &  ,
bool  ,
VtkFormat   
)
extern

◆ write_vtu_facets< 2 >() [2/2]

template void hpfem::io::write_vtu_facets< 2 > ( const mesh::Mesh< 2 > &  ,
std::ostream &  ,
bool  ,
VtkFormat   
)
extern

◆ write_vtu_facets< 3 >() [1/2]

template void hpfem::io::write_vtu_facets< 3 > ( const mesh::Mesh< 3 > &  ,
const std::filesystem::path &  ,
bool  ,
VtkFormat   
)
extern

◆ write_vtu_facets< 3 >() [2/2]

template void hpfem::io::write_vtu_facets< 3 > ( const mesh::Mesh< 3 > &  ,
std::ostream &  ,
bool  ,
VtkFormat   
)
extern