G+Smo
24.08.0
Geometry + Simulation Modules
|
Constructs the D-Patch, from which the transformation matrix can be called.
d | parametric dimension |
Public Types | |
typedef memory::shared_ptr < gsSmoothInterfaces > | Ptr |
Shared pointer for gsSmoothInterfaces. | |
typedef memory::unique_ptr < gsSmoothInterfaces > | uPtr |
Unique pointer for gsSmoothInterfaces. | |
Public Member Functions | |
virtual void | compute () |
Computes the construction. | |
virtual void | cornerInfo () const |
Returns information for all the corners in the topology. More... | |
virtual void | defaultOptions () |
Sets the default options. | |
virtual gsGeometry< T > * | exportPatch (index_t patch, bool computeCoefs=true) |
Exports a single modified patch with index patch. More... | |
virtual gsMultiPatch< T > | exportToPatches (const gsMultiPatch< T > &patches) |
Exports the modified geometry to a gsMultiPatch object. More... | |
virtual const gsMultiPatch< T > & | getGeometry () const |
Returns the multipatch that is used for the D-Patch. | |
virtual void | globalBasis_into (gsMappedBasis< d, T > &mbasis) const |
Returns the basis that is used for the D-Patch. Could be THB refined. | |
virtual void | globalGeometry_into (const gsMultiPatch< T > &patches, gsMappedSpline< d, T > &mspline) |
Returns the multipatch that is used for the D-Patch. | |
gsSmoothInterfaces () | |
Empty constructor. | |
gsSmoothInterfaces (gsMultiPatch< T > const &mp) | |
Default constructor. More... | |
virtual const gsMultiBasis< T > & | localBasis () const |
Returns the basis that is used for the D-Patch. Could be THB refined. | |
virtual void | localGeometry_into (gsMultiPatch< T > &localGeometry) |
Returns the modified geometry corresponding to the local basis. | |
virtual void | mapperInfo () const |
Returns for each basis function if it is free or eliminated. More... | |
virtual const gsSparseMatrix< T > & | matrix () const |
Returns the smoothing matrix. More... | |
virtual const void | matrix_into (gsSparseMatrix< T > &matrix) const |
Returns the smoothing matrix into matrix. More... | |
virtual void | sideInfo (patchSide side) const |
Returns information about a vertex. More... | |
virtual void | sideInfo () const |
Returns information for all the sides in the topology. More... | |
virtual void | vertexInfo (patchCorner corner) const |
Returns information about a vertex. More... | |
Protected Member Functions | |
void | _computeEVs () override |
Corrects the EVs. | |
virtual void | _computeMapper () |
Calculates the mapper. More... | |
virtual void | _computeSmoothMatrix () |
Calculates the smooth matrix. | |
void | _countDoFs () override |
Initializes the matrix, the basis and the mappers. | |
virtual void | _getLowestCorners (std::vector< patchCorner > &pcorners, index_t n=3) const |
From a list of patchCorners pcorners, get the lowest n corners. More... | |
virtual void | _getLowestIndices (std::vector< std::pair< index_t, index_t >> &indices, index_t n=3) const |
From a list of tuples (patch,index), get the lowest n tuples. More... | |
virtual const index_t | _getValence (patchCorner corner) const |
Gets the valence. More... | |
virtual void | _handleBoundary (patchSide side) |
Handles a boundary in the global matrix. More... | |
virtual void | _handleInterface (boundaryInterface iface) |
Handles an interface in the global matrix. More... | |
virtual void | _handleInterior () |
Handles the interior in the global matrix. More... | |
virtual void | _handleRegularCorner (patchCorner pcorner) |
Handles a regular corner. More... | |
virtual void | _handleVertex (patchCorner pcorner) |
Handles a vertex in the global matrix. More... | |
virtual const index_t | _indexFromSides (index_t index1, const patchSide side1, index_t index2, const patchSide side2) |
Computes the index of a basis function using sides as reference. More... | |
virtual const index_t | _indexFromVert (const index_t index, const patchCorner corner, const patchSide side, const index_t offsets=0) const |
Computes the index of a basis function taking one corner and one side as reference. More... | |
void | _initBasis () override |
Initializes the basis. | |
virtual void | _initChecks () |
Prepares the THB basis if needed. More... | |
virtual void | _initialize () |
Initializes the class:
| |
virtual void | _initMappers () |
Initializes the matrix, the basis and the mappers. | |
virtual void | _initMatrix () |
Initializes the matrix. | |
void | _initTHB () override |
Initializes the matrix, the basis and the mappers. | |
virtual const bool | _isInteriorVertex (patchCorner corner) const |
Determines whether the specified corner is interior vertex. More... | |
void | _makeTHB () override |
Prints which DoFs have been handled and which have been eliminated. More... | |
virtual void | _performChecks (bool basis) |
Performs checks on sides, vertices and bases. | |
gsMatrix< T > | _preCoefficients (const gsMultiPatch< T > &patches) override |
Computes the C1 coefficients for pre-multiplication to make the multipatch. More... | |
virtual void | _removeLowestCorners (std::vector< patchCorner > &pcorners, index_t n=3) const |
From a list of patchCorners pcorners, remove all but the lowest n corners. More... | |
virtual void | _removeLowestIndices (std::vector< std::pair< index_t, index_t >> &indices, index_t n=3) const |
From a list of tuples (patch,index), remove all but the lowest n tuples. More... | |
virtual void | _resetChecks (bool basis) |
Resets checks on sides, vertices and bases. | |
virtual const index_t | _sideIndex (index_t patch, boxSide bside) const |
Computes global index of the side. More... | |
virtual const index_t | _sideIndex (patchSide pside) const |
Computes global index of the side. More... | |
virtual const std::pair < index_t, bool > | _vertexData (const patchCorner corner) const |
Returns the valence and whether a corner is interior or boundary. More... | |
virtual const index_t | _vertIndex (index_t patch, boxCorner corner) const |
Computes global index of the corner. More... | |
virtual const index_t | _vertIndex (patchCorner pcorner) const |
Computes global index of the corner. More... | |
virtual void | _whichHandled () |
Prints which DoFs have been handled and which have been eliminated. | |
virtual std::vector< bool > | getSharpCorners (T tol=1e-2) const |
Checks if corners are sharp or not. More... | |
gsSmoothInterfaces | ( | gsMultiPatch< T > const & | mp | ) |
Default constructor.
mp | Multipatch of the geometry |
|
protectedvirtualinherited |
Calculates the mapper.
NOT PARALLEL YET
|
protectedvirtualinherited |
From a list of patchCorners pcorners, get the lowest n corners.
pcorners | The pcorners | |
[in] | n | The number of corners |
|
protectedvirtualinherited |
From a list of tuples (patch,index), get the lowest n tuples.
pcorners | The pcorners | |
[in] | n | The number of corners |
|
inlineprotectedvirtualinherited |
Gets the valence.
[in] | corner | The corner |
|
protectedvirtualinherited |
Handles a boundary in the global matrix.
Handles all DoFs on the boundary with unit-weight, except the ones in the 0 and 1 rings around the vertices.
[in] | side | The boundary side |
|
protectedvirtualinherited |
Handles an interface in the global matrix.
Gives all the DoFs that have offset 1 (orthogonal) from the interface weight 1.0 w.r.t itself. All the DoFs ON the interface (on both patches) will have weight 0.5 to the DoF with offset 1. This interface handling excludes the indices that are in the 0 and 1 ring around vertices.
[in] | iface | The interface |
|
protectedvirtualinherited |
Handles the interior in the global matrix.
Gives all left-over DoFs, which are in the interior, weight 1 w.r.t. itself
|
protectedvirtualinherited |
Handles a regular corner.
[in] | pcorner | The pcorner |
|
protectedvirtualinherited |
Handles a vertex in the global matrix.
We use the following notation convention (per patch!): b00 is the basis function at the vertex b10 is the basis function next to the vertex along the first interface that connects to the vertex b20 is the basis function next to b10 along the first interface that connects to the vertex etc.
b01 is the basis function next to the vertex along the second interface that connects to the vertex b02 is the basis function next to b01 along the second interface that connects to the vertex etc.
b11 is the basis function with offset 1 from both interfaces and from the vertex itself b22 is the basis function with offset 2 from both interfaces and from the vertex itself etc.
There are different options. a) Boundary vertices i) Valence 1: b00, b10, b01 and b00 all get weight 1.0 w.r.t the same basis function in the local basis ii) Valence 2: This case contains an interface between two patches. We use index k to denote the row basis functions along the interface. So k=0 corresponds to the basis functions on the boundary and k=1 corresponds to the basis functions with offset 1 from the boundaries. Using this convention, the functions bk1 in the local basis, are coupled to bk1 in the global basis with weight 1. The functions bk0 in the local basis (on the considered patch) are coupled to bk1 in the global basis with weight 0.5. The functions bk0 in the local basis (on the other patch) are coupled to bk1 (on the considered patch) in the global basis with weight 0.5. iii)Valence 3: In this case, the matched vertices on all the adjacent patches are treated in one go! Note that all the basis functions corresponding to the vertex (b00) on all patches are matched! We couple the b00 functions of all patches (in the local basis) with weight 1/4 to the b00 of the adjacent patch with the lowest number in the global basis. Then, the b11 on the considered patch is coupled with weight 1 to itself and with weight 0.25 to the b00s of the other patches. Then, we will handle the vertices where an interface and a boundary meet (there are two of these). For the patch corners that are on an interface, we find the b11 and b10 vertices (orthogonal to the interface) and we give all b10s weight 0.5 w.r.t. the b11s in the global basis (on both patches). Lastly, we add weight 0.5 for the b10s along the boundaries (so only for two patches) to the (matched) b00 basis function (all b00s refer to the same dof in the global basis). b) Interior vertices (all valences): i) b11 gets weight 1.0 w.r.t the same basis function in the local basis ii) all associated b00s in the local basis get weight 1/valence w.r.t. b11 in the global basis iii)the b10 and b01 in the local basis get weight 1/2 w.r.t. b11 in the global basis
[in] | pcorner | The patchcorner |
|
protectedvirtualinherited |
Computes the index of a basis function using sides as reference.
[in] | index1 | The index of the basis function parallel to the first side |
[in] | side1 | The first side |
[in] | index2 | The index of the basis function parallel to the second side |
[in] | side2 | The second side |
|
protectedvirtualinherited |
Computes the index of a basis function taking one corner and one side as reference.
[in] | bases | (optional) Multibasis to evaluate the index on |
[in] | index | Offset of the basis function parallel to the side side, measured from corner |
[in] | corner | The corner to be measured from |
[in] | side | The side which contains corner |
[in] | offset | The offset from the side (orthogonal to the side) |
|
protectedvirtualinherited |
Prepares the THB basis if needed.
This function constructs THB refinements on the places where they are needed, i.e. around EVs. It also constructs the transfer matrix (m_tMatrix) forms the transformation between the original B-spline basis and the THB-Spline basis. Computes D-Patch smoothing
Given a basis with THB refinement around the EVs, this function computes the D-Patch smoothing Makes the Pi matrix
This matrix is used to transform the coefficients of the D-Patch smoothing matrix
[in] | valence | The valence |
|
inlineprotectedvirtualinherited |
Determines whether the specified corner is interior vertex.
[in] | corner | The corner |
|
overrideprotectedvirtual |
Prints which DoFs have been handled and which have been eliminated.
Makes a THB basis.
Implements gsDPatchBase< d, T >.
|
overrideprotectedvirtual |
Computes the C1 coefficients for pre-multiplication to make the multipatch.
Takes the coefficients which are tagged as "free" in the modified DoFMapper (m_mapModified) and when a boundary vertex with valence=3 is present, this one is shifted.
Implements gsDPatchBase< d, T >.
|
protectedvirtualinherited |
From a list of patchCorners pcorners, remove all but the lowest n corners.
pcorners | The pcorners | |
[in] | n | The number of corners |
|
protectedvirtualinherited |
From a list of tuples (patch,index), remove all but the lowest n tuples.
pcorners | The pcorners | |
[in] | n | The number of corners |
|
inlineprotectedvirtualinherited |
Computes global index of the side.
[in] | patch | The patch number |
[in] | bside | The boxSide |
Computes global index of the side.
[in] | pside | The patchSide |
|
protectedvirtualinherited |
Returns the valence and whether a corner is interior or boundary.
[in] | corner | The patchCorner |
|
inlineprotectedvirtualinherited |
Computes global index of the corner.
[in] | patch | The patch number |
[in] | corner | The boxCorner |
|
inlineprotectedvirtualinherited |
Computes global index of the corner.
[in] | pcorner | The patchCorner |
|
virtualinherited |
Returns information for all the corners in the topology.
Returns for all the patches and for all corners (1 to 4) the valence and if it is an interior vertex or a boundary vertex.
|
virtualinherited |
Exports a single modified patch with index patch.
The patch is obtained by transforming the coefficients of the D-Patch to the original basis, such that the original basis functions can be used to plot the geometry (and the patch structure will remain intact). To construct the geometry, the coefficients for the C1 basis are multiplied with the transpose of the transformation matrix. The C1 coefficients are obtained with _preCoefficients().
|
inlinevirtualinherited |
Exports the modified geometry to a gsMultiPatch object.
|
protectedvirtualinherited |
Checks if corners are sharp or not.
[in] | tol | The tolerance |
|
virtualinherited |
Returns for each basis function if it is free or eliminated.
Returns for each basis function if it is free or eliminated and checks if the internal mapper is defined correctly
|
inlinevirtualinherited |
Returns the smoothing matrix.
The number of columns of the matrix corresponds to the number of basis functions in the local basis; this is the sum of all the basis functions over all the patches. The number of rows of the matrix corresponds to the number of global basis functions, i.e. the number of basis functions corresponding to the D-Patch. Multiplying the basis with the local basis function values gives the values of the basis functions in the global basis.
|
inlinevirtualinherited |
Returns the smoothing matrix into matrix.
matrix | The matrix |
|
virtualinherited |
Returns information about a vertex.
[in] | patch | The patchSide |
|
virtualinherited |
Returns information for all the sides in the topology.
Returns for all the patches and for all sides (1 to 4) if it is a boundary or an interface.
|
virtualinherited |
Returns information about a vertex.
[in] | corner | The patchCorner |