hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hpfem::io::FieldExporter< Dim > Class Template Reference

#include <field_export.hpp>

Public Member Functions

 FieldExporter (const mesh::Mesh< Dim > &mesh, int subdivisions, VtkFormat format=VtkFormat::kBinary)
 
 FieldExporter (const FieldExporter &)=delete
 
FieldExporter & operator= (const FieldExporter &)=delete
 
 FieldExporter (FieldExporter &&)=delete
 
FieldExporter & operator= (FieldExporter &&)=delete
 
 ~FieldExporter ()=default
 
FieldExporter & h1 (const std::string &name, const fespace::DofMap< Dim > &dofs, const Vector &u_h)
 
FieldExporter & hcurl (const std::string &name, const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h)
 
FieldExporter & cell_scalars (std::string name, std::span< const Real > values)
 Parent-cell data (one value per cell of the original mesh) broadcast to the sub-cells.
 
FieldExporter & cell_scalars (std::string name, std::span< const Complex > values)
 
void write (std::ostream &out) const
 
void write (const std::filesystem::path &file) const
 
const mesh::Subdivided< Dim > & subdivision () const noexcept
 

Detailed Description

template<int Dim>
class hpfem::io::FieldExporter< Dim >

Writes fields on the n-fold subdivided mesh as point data. The sub-mesh duplicates its points per parent cell, so discontinuities are preserved; parent cell data can be broadcast to the sub-cells. Choose subdivisions of the order of the polynomial degree to resolve the fields.

Constructor & Destructor Documentation

◆ FieldExporter() [1/3]

template<int Dim>
hpfem::io::FieldExporter< Dim >::FieldExporter ( const mesh::Mesh< Dim > &  mesh,
int  subdivisions,
VtkFormat  format = VtkFormat::kBinary 
)
Exceptions
InvalidArgumentif subdivisions < 1.

◆ FieldExporter() [2/3]

template<int Dim>
hpfem::io::FieldExporter< Dim >::FieldExporter ( const FieldExporter< Dim > &  )
delete

◆ FieldExporter() [3/3]

template<int Dim>
hpfem::io::FieldExporter< Dim >::FieldExporter ( FieldExporter< Dim > &&  )
delete

◆ ~FieldExporter()

template<int Dim>
hpfem::io::FieldExporter< Dim >::~FieldExporter ( )
default

Member Function Documentation

◆ cell_scalars() [1/2]

template<int Dim>
FieldExporter & hpfem::io::FieldExporter< Dim >::cell_scalars ( std::string  name,
std::span< const Complex >  values 
)

◆ cell_scalars() [2/2]

template<int Dim>
FieldExporter & hpfem::io::FieldExporter< Dim >::cell_scalars ( std::string  name,
std::span< const Real >  values 
)

Parent-cell data (one value per cell of the original mesh) broadcast to the sub-cells.

◆ h1()

template<int Dim>
FieldExporter & hpfem::io::FieldExporter< Dim >::h1 ( const std::string &  name,
const fespace::DofMap< Dim > &  dofs,
const Vector &  u_h 
)

Scalar field u_h as point scalars <name>_re / <name>_im.

Exceptions
InvalidArgumentif the DoF map belongs to another mesh.

◆ hcurl()

template<int Dim>
FieldExporter & hpfem::io::FieldExporter< Dim >::hcurl ( const std::string &  name,
const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h 
)

Nédélec field as point vectors <name>_re / <name>_im and its curl as curl_<name>_re / curl_<name>_im (scalars in 2D, vectors in 3D).

Exceptions
InvalidArgumentif the DoF map belongs to another mesh.

◆ operator=() [1/2]

template<int Dim>
FieldExporter & hpfem::io::FieldExporter< Dim >::operator= ( const FieldExporter< Dim > &  )
delete

◆ operator=() [2/2]

template<int Dim>
FieldExporter & hpfem::io::FieldExporter< Dim >::operator= ( FieldExporter< Dim > &&  )
delete

◆ subdivision()

template<int Dim>
const mesh::Subdivided< Dim > & hpfem::io::FieldExporter< Dim >::subdivision ( ) const
inlinenoexcept

◆ write() [1/2]

template<int Dim>
void hpfem::io::FieldExporter< Dim >::write ( const std::filesystem::path &  file) const
Exceptions
InvalidArgumentif the file cannot be created.

◆ write() [2/2]

template<int Dim>
void hpfem::io::FieldExporter< Dim >::write ( std::ostream &  out) const

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