G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
boundaryInterface Struct Reference

Detailed Description

Struct which represents an interface between two patches.

+ Collaboration diagram for boundaryInterface:

Public Member Functions

 boundaryInterface (patchSide const &_ps1, patchSide const &_ps2, short_t dim, const std::string &l="")
 
void cornerMap (gsVector< index_t > &cmap) const
 Returns a vector which describes the mapping between the corners of ps1 and the corners of ps2. In particular, the i-th corner of ps1 (in lex-order) is mapped to the corner cmap[i] (in lex-order) of ps2.
 
gsVector< index_tdirMap (const patchSide &ps) const
 Accessor for boundaryInterface::directionMap.
 
gsVector< bool > dirOrientation (const patchSide &ps) const
 Accessor for boundaryInterface::directionOrientation.
 
patchSidefirst ()
 first, returns the first patchSide of this interface
 
const std::string & label () const
 Return the label.
 
patchSideother (const patchSide &ps)
 Returns the second side if ps is the first side, otherwise returns the second side.
 
patchSidesecond ()
 second, returns the second patchSide of this interface
 

Private Attributes

gsVector< index_tdirectionMap
 store the combinatorial data about the interface
 
gsVector< bool > directionOrientation
 
std::string m_label
 The label of the interface.
 
patchSide ps1
 The first patch side.
 
patchSide ps2
 The second patch side.
 

Constructor & Destructor Documentation

◆ boundaryInterface()

boundaryInterface ( patchSide const &  _ps1,
patchSide const &  _ps2,
short_t  dim,
const std::string &  l = "" 
)
inline

TODO: discuss and define default orientation

Member Data Documentation

◆ directionMap

gsVector<index_t> directionMap
private

store the combinatorial data about the interface

Accessed by dirMap()

we describe the permutation and orientation of the coordinate directions through an affine map that puts ps1.patch next to ps2.patch in such a way that ps1 coincide to ps2.

boundaryInterface::directionMap stores the permutation of the coordinate directions, i.e. the rotation of the map.
boundaryInterface::directionOrientation stores the corresponding orientation.

Example 1:

\[ \mathrm{patch~0}~ \begin{array}{|cc|cc|} \hline \uparrow x & & \uparrow x & &\\ & \rightarrow y & & \rightarrow y &\\\hline \end{array} ~\mathrm{patch~1} \]

In Example 1, the image of the x-axis of patch 0 is oriented such that it corresponds to the image of the x-axis of patch 1. Hence, the coordinate direction "0" is mapped to coordinate direction "0", and direction "1" is mapped to direction "1". In this case, directionMap is stored as the vector [0,1].

The orientations of both coordinate directions is the same, so boundaryInterface::directionOrientation is [ 1, 1 ]

Example 2:

\[ \mathrm{patch~0}~ \begin{array}{|cc|cc|cc|} \hline \uparrow x & & & \rightarrow x \\ & \rightarrow y & \downarrow y & \\\hline \end{array} ~\mathrm{patch~1} \]

In Example 2, the image of the x-axis of patch 0 is oriented such that it corresponds to the image of the y-asis of patch 1. This means that the coordinate direction "0" is mapped to coordinate direction "1". Also, direction "1" is mapped to direction "0". In this case, directionMap is [1,0].

The orientations of the x-axis of patch 0 and its corresponding counterpart (i.e., the y-axis of patch 1) are reversed. The orientation of the y-axis and its counterpart are the same. Hence, boundaryInterface::directionOrientation is [ 0, 1 ]

◆ directionOrientation

gsVector<bool> directionOrientation
private

For each coordinate direction we save if the original coordinate and the destination one have the same orientation

Accessed by dirOrientation()

See boundaryInterface::directionMap for documentation.