G+Smo
24.08.0
Geometry + Simulation Modules
|
Struct which represents an interface between two patches.
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_t > | dirMap (const patchSide &ps) const |
Accessor for boundaryInterface::directionMap. | |
gsVector< bool > | dirOrientation (const patchSide &ps) const |
Accessor for boundaryInterface::directionOrientation. | |
patchSide & | first () |
first, returns the first patchSide of this interface | |
const std::string & | label () const |
Return the label. | |
patchSide & | other (const patchSide &ps) |
Returns the second side if ps is the first side, otherwise returns the second side. | |
patchSide & | second () |
second, returns the second patchSide of this interface | |
Private Attributes | |
gsVector< index_t > | directionMap |
store the combinatorial data about the interface More... | |
gsVector< bool > | directionOrientation |
std::string | m_label |
The label of the interface. | |
patchSide | ps1 |
The first patch side. | |
patchSide | ps2 |
The second patch side. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const boundaryInterface &i) |
Print (as string) an interface. More... | |
|
inline |
TODO: discuss and define default orientation
|
friend |
Print (as string) an interface.
TODO: the information could be stored in a single vector of signed integers: the sign gives the orientation the problem is that it is necessary to shift the indices as there is no -0
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 ]
|
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.