hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
hpfem::mesh::AdaptiveMesh< Dim > Class Template Reference

#include <adaptive_mesh.hpp>

Public Types

using CellVertices = typename Mesh< Dim >::CellVertices
 

Public Member Functions

 AdaptiveMesh (Mesh< Dim > root)
 
const Mesh< Dim > & root () const noexcept
 
const Mesh< Dim > & mesh () const noexcept
 Current leaf mesh (hanging entities registered).
 
int level (Index c) const
 Refinement level of leaf cell c (0 for root cells).
 
int max_level () const noexcept
 
Index root_cell (Index c) const
 
Point< Dim > root_reference (Index c, const Point< Dim > &xi) const
 
RefinementStep refine (std::span< const Index > marked)
 
RefinementStep refine_all ()
 Refines every leaf cell (the result equals refine_uniform of the leaf mesh).
 
void set_periodic (std::vector< PeriodicFace< Dim > > faces)
 
const std::vector< PeriodicFace< Dim > > & periodic () const noexcept
 

Static Public Attributes

static constexpr Index kChildren = detail::RedRefinement<Dim>::kChildren
 

Member Typedef Documentation

◆ CellVertices

template<int Dim>
using hpfem::mesh::AdaptiveMesh< Dim >::CellVertices = typename Mesh<Dim>::CellVertices

Constructor & Destructor Documentation

◆ AdaptiveMesh()

template<int Dim>
hpfem::mesh::AdaptiveMesh< Dim >::AdaptiveMesh ( Mesh< Dim >  root)
explicit

Member Function Documentation

◆ level()

template<int Dim>
int hpfem::mesh::AdaptiveMesh< Dim >::level ( Index  c) const
inline

Refinement level of leaf cell c (0 for root cells).

◆ max_level()

template<int Dim>
int hpfem::mesh::AdaptiveMesh< Dim >::max_level ( ) const
inlinenoexcept

◆ mesh()

template<int Dim>
const Mesh< Dim > & hpfem::mesh::AdaptiveMesh< Dim >::mesh ( ) const
inlinenoexcept

Current leaf mesh (hanging entities registered).

◆ periodic()

template<int Dim>
const std::vector< PeriodicFace< Dim > > & hpfem::mesh::AdaptiveMesh< Dim >::periodic ( ) const
inlinenoexcept

◆ refine()

template<int Dim>
RefinementStep hpfem::mesh::AdaptiveMesh< Dim >::refine ( std::span< const Index >  marked)

Refines the leaf cells marked (ids of mesh()), closes the one-irregular rule and rebuilds the leaf mesh.

Exceptions
InvalidArgumentfor an id out of range.

◆ refine_all()

template<int Dim>
RefinementStep hpfem::mesh::AdaptiveMesh< Dim >::refine_all ( )

Refines every leaf cell (the result equals refine_uniform of the leaf mesh).

◆ root()

template<int Dim>
const Mesh< Dim > & hpfem::mesh::AdaptiveMesh< Dim >::root ( ) const
inlinenoexcept

◆ root_cell()

template<int Dim>
Index hpfem::mesh::AdaptiveMesh< Dim >::root_cell ( Index  c) const
inline

Root cell containing leaf cell c, and the reference coordinates in that root cell of the reference point ΞΎ of c.

◆ root_reference()

template<int Dim>
Point< Dim > hpfem::mesh::AdaptiveMesh< Dim >::root_reference ( Index  c,
const Point< Dim > &  xi 
) const

◆ set_periodic()

template<int Dim>
void hpfem::mesh::AdaptiveMesh< Dim >::set_periodic ( std::vector< PeriodicFace< Dim > >  faces)

Declares periodic face pairs. Every refinement (the marked cells and the closure) is then mirrored onto the partner face until the leaf facets on both faces of a pair are identical up to the shift, which assembly::bloch_constraints requires; the mirrored cells count as refined by the closure (children inherit the order in hp_refine).

Exceptions
InvalidArgumentif a tag has no facets on the root mesh.

Member Data Documentation

◆ kChildren

template<int Dim>
constexpr Index hpfem::mesh::AdaptiveMesh< Dim >::kChildren = detail::RedRefinement<Dim>::kChildren
staticconstexpr

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