KASKADE 7 development version
Public Types | Public Member Functions | Static Public Attributes | List of all members
Kaskade::BoundaryEdge< Index, Vector > Class Template Reference

A class storing a boundary edge consisting of two vertex indices and associated boundary curve tangents. More...

#include <boundaryInterpolation.hh>

Detailed Description

template<class Index, class Vector>
class Kaskade::BoundaryEdge< Index, Vector >

A class storing a boundary edge consisting of two vertex indices and associated boundary curve tangents.

In case the boundary of the computational domain is smooth, but the grid is a plain cell complex, boundary edges are curves in space that are not well represented by the straight grid edge between the vertices. This class serves as a representation of smooth boundary edges in terms of Hermite type interpolation between the vertices, and therefore stores the two vertices (as global index in the grid) and a boundary edge tangent at each vertex.

The class invariant is that the first vertex index is less than the second one and that the tangent vectors are normalized.

Definition at line 58 of file boundaryInterpolation.hh.

Public Types

using ctype = typename Vector::value_type
 

Public Member Functions

 BoundaryEdge (Index v1, Index v2, Vector const &t1, Vector const &t2)
 Constructor taking vertex indices and tangent vectors. More...
 
 BoundaryEdge (Index v1, Index v2)
 Constructor taking only the vertex indices. More...
 
 BoundaryEdge ()
 Default constructor. More...
 
bool operator< (BoundaryEdge const &e) const
 Comparison by lexicographic order of the vertex indices. More...
 
bool operator== (BoundaryEdge const &e) const
 Comparison by vertex indices. More...
 
std::array< Index, 2 > vertices () const
 
Index vertex (int i) const
 
Vector tangent (int i) const
 
std::array< Vector, 2 > const & tangents () const
 
bool incident (Index v) const
 Checks whether the edge is incident to the given vertex. More...
 
void displace (Dune::FieldMatrix< ctype, dim, dim > const &du0, Dune::FieldMatrix< ctype, dim, dim > const &du1)
 Applies displacement to the tangent vectors. More...
 

Static Public Attributes

static constexpr int dim = Vector::dimension
 

Member Typedef Documentation

◆ ctype

template<class Index , class Vector >
using Kaskade::BoundaryEdge< Index, Vector >::ctype = typename Vector::value_type

Definition at line 61 of file boundaryInterpolation.hh.

Constructor & Destructor Documentation

◆ BoundaryEdge() [1/3]

template<class Index , class Vector >
Kaskade::BoundaryEdge< Index, Vector >::BoundaryEdge ( Index  v1,
Index  v2,
Vector const &  t1,
Vector const &  t2 
)
inline

Constructor taking vertex indices and tangent vectors.

Conceptually, the tangent vectors point towards the opposing vertex, i.e. into the "interior" of the edge. Geometrically, if \( x_1 \) and \( x_2 \) are the vertices, it must hold that \( (x_2-x_1)^T t_1 > 0 \) and \( (x_1-x_2)^T t_2 > 0 \).

Definition at line 71 of file boundaryInterpolation.hh.

◆ BoundaryEdge() [2/3]

template<class Index , class Vector >
Kaskade::BoundaryEdge< Index, Vector >::BoundaryEdge ( Index  v1,
Index  v2 
)
inline

Constructor taking only the vertex indices.

The tangent vectors are undefined.

Definition at line 86 of file boundaryInterpolation.hh.

◆ BoundaryEdge() [3/3]

template<class Index , class Vector >
Kaskade::BoundaryEdge< Index, Vector >::BoundaryEdge ( )
inline

Default constructor.

This leaves the boundary edge in an useless state, suitable only to be assigned to.

Definition at line 97 of file boundaryInterpolation.hh.

Member Function Documentation

◆ displace()

template<class Index , class Vector >
void Kaskade::BoundaryEdge< Index, Vector >::displace ( Dune::FieldMatrix< ctype, dim, dim > const &  du0,
Dune::FieldMatrix< ctype, dim, dim > const &  du1 
)
inline

Applies displacement to the tangent vectors.

A deformation \( \varphi(x) = x+u(x) \) modifies the edge tangent vector \( t \) to \( \varphi_x t = t + u_x t \).

Definition at line 158 of file boundaryInterpolation.hh.

◆ incident()

template<class Index , class Vector >
bool Kaskade::BoundaryEdge< Index, Vector >::incident ( Index  v) const
inline

Checks whether the edge is incident to the given vertex.

Definition at line 147 of file boundaryInterpolation.hh.

◆ operator<()

template<class Index , class Vector >
bool Kaskade::BoundaryEdge< Index, Vector >::operator< ( BoundaryEdge< Index, Vector > const &  e) const
inline

Comparison by lexicographic order of the vertex indices.

Tangents are not considered for comparison.

Definition at line 107 of file boundaryInterpolation.hh.

◆ operator==()

template<class Index , class Vector >
bool Kaskade::BoundaryEdge< Index, Vector >::operator== ( BoundaryEdge< Index, Vector > const &  e) const
inline

Comparison by vertex indices.

Tangents are not considered for comparison.

Definition at line 117 of file boundaryInterpolation.hh.

◆ tangent()

template<class Index , class Vector >
Vector Kaskade::BoundaryEdge< Index, Vector >::tangent ( int  i) const
inline

Definition at line 133 of file boundaryInterpolation.hh.

◆ tangents()

template<class Index , class Vector >
std::array< Vector, 2 > const & Kaskade::BoundaryEdge< Index, Vector >::tangents ( ) const
inline

Definition at line 139 of file boundaryInterpolation.hh.

◆ vertex()

template<class Index , class Vector >
Index Kaskade::BoundaryEdge< Index, Vector >::vertex ( int  i) const
inline

Definition at line 127 of file boundaryInterpolation.hh.

◆ vertices()

template<class Index , class Vector >
std::array< Index, 2 > Kaskade::BoundaryEdge< Index, Vector >::vertices ( ) const
inline

Definition at line 122 of file boundaryInterpolation.hh.

Member Data Documentation

◆ dim

template<class Index , class Vector >
constexpr int Kaskade::BoundaryEdge< Index, Vector >::dim = Vector::dimension
staticconstexpr

Definition at line 62 of file boundaryInterpolation.hh.


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