HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BoundaryConditions Class Reference

The BoundaryConditions class provides definition of boundary conditions. More...

#include <BoundaryConditions.hpp>

Public Member Functions

 BoundaryConditions (const std::string bc_id, Mesh &mesh)
 Initialise data.
 
const std::string type (const Edge &edge) const
 Test the boundary condition of an edge.
 
const std::string type (const Vertex &vertex) const
 Test the boundary condition of a vertex.
 
const size_t n_dir_edges () const
 Returns the number of Dirichlet edges.
 
const size_t n_dir_vertices () const
 Returns the number of Dirichlet vertices.
 
const std::string name () const
 Returns the complete name of the boundary condition.
 
void reorder_edges (const std::string pos="end")
 Re-order edges of the mesh to put the Dirichlet edges at the position "pos" (=end or start)
 
void reorder_vertices (const std::string pos="end")
 Re-order vertices of the mesh to put the Dirichlet vertices at the position "pos" (=end or start)
 

Detailed Description

The BoundaryConditions class provides definition of boundary conditions.

 \addtogroup BoundaryConditions

Constructor & Destructor Documentation

◆ BoundaryConditions()

BoundaryConditions::BoundaryConditions ( const std::string  bc_id,
Mesh &  mesh 
)

Initialise data.

Parameters
bc_idThe identifier for the boundary condition (D, N or Mx)
meshreference to the mesh

Member Function Documentation

◆ n_dir_edges()

const size_t BoundaryConditions::n_dir_edges ( ) const
inline

Returns the number of Dirichlet edges.

◆ n_dir_vertices()

const size_t BoundaryConditions::n_dir_vertices ( ) const
inline

Returns the number of Dirichlet vertices.

◆ name()

const std::string BoundaryConditions::name ( ) const
inline

Returns the complete name of the boundary condition.

◆ reorder_edges()

void BoundaryConditions::reorder_edges ( const std::string  pos = "end")

Re-order edges of the mesh to put the Dirichlet edges at the position "pos" (=end or start)

◆ reorder_vertices()

void BoundaryConditions::reorder_vertices ( const std::string  pos = "end")

Re-order vertices of the mesh to put the Dirichlet vertices at the position "pos" (=end or start)

◆ type() [1/2]

const std::string BoundaryConditions::type ( const Edge &  edge) const

Test the boundary condition of an edge.

Returns
"dir" or "neu" depending if the edge is a Dirichlet or Neumann boundary condition, as determined by m_bc_id below. For an internal edge, returns "int". m_bc_id = "D": all edges are Dirichlet m_bc_id = "N": all edges are Neumann m_bc_id = "Mx" (x=0,1,...): various types of mixed boundary conditions, some edges will be Dirichlet and some will be Neumman.
Parameters
edgeEdge on which to check the boundary condition

◆ type() [2/2]

const std::string BoundaryConditions::type ( const Vertex &  vertex) const

Test the boundary condition of a vertex.

Parameters
vertexVertex on which to check the boundary condition

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