22 template<
short_t d,
class T>
23 class gsG1AuxiliaryPatch
31 auxPatch(singlePatch), patchIndex(globalPatchIndex){
43 index_t get_n_plus() {
return m_plus; }
44 index_t get_n_minus() {
return m_minus; }
46 void rotateParamAntiClock(){
58 for (
index_t j = 0; j < dimU; j++)
60 for (
index_t i = 0; i < dimV; i++)
62 mpar.row(i + j * dimV) = auxPatch.patch(0).coefs().row((dimU - 1 - j) + dimU * i);
72 newpatch.addPatch(newgeom1);
74 auxPatch.swap(newpatch);
75 auxPatch.computeTopology();
81 void rotateBasisAntiClock(){
83 for(
size_t np = 0; np < G1repBasis.nPatches(); np++)
97 for (
index_t j = 0; j < dimU; j++)
99 for (
index_t i = 0; i < dimV; i++)
101 mpar.row(i + j * dimV) = G1repBasis.patch(np).coefs().row((dimU - 1 - j) + dimU * i);
110 G1repBasis.swap(newpatch);
114 void rotateParamClock(){
125 for (
index_t j = (dimU - 1 ) ; j >= 0; j--)
127 for (
index_t i = 0; i < dimV; i++)
129 mpar.row(i + (dimU - j - 1) * dimV) = auxPatch.patch(0).coefs().row((dimV * dimU -1 - j) - dimU * i);
139 newpatch.addPatch(newgeom1);
141 auxPatch.swap(newpatch);
142 auxPatch.computeTopology();
146 this->checkRotation();
150 void rotateBasisClock(){
152 for(
size_t np = 0; np < G1repBasis.nPatches(); np++)
167 for (
index_t j = (dimU - 1); j >= 0; j--)
169 for (
index_t i = 0; i < dimV; i++)
171 mpar.row(i + (dimU - j - 1) * dimV) =
172 G1repBasis.patch(np).coefs().row((dimV * dimU - 1 - j) - dimU * i);
181 G1repBasis = newpatch;
185 void rotateParamAntiClockTwice(){
196 for (
index_t i = 0; i < ( dimU * dimV ); i++)
198 mpar.row(i) = auxPatch.patch(0).coefs().row((dimU * dimV - 1) - i);
206 newpatch.addPatch(newgeom1);
208 auxPatch.swap(newpatch);
209 auxPatch.computeTopology();
213 this->checkRotation();
217 void rotateBasisAntiClockTwice(){
219 for(
size_t np = 0; np < G1repBasis.nPatches(); np++)
232 for (
index_t i = 0; i < (dimU * dimV); i++)
234 mpar.row(i) = G1repBasis.patch(np).coefs().row((dimU * dimV - 1) - i);
241 G1repBasis = newpatch;
256 for (
index_t j = 0; j < dimU; j++)
258 for (
index_t i = 0; i < dimV; i++)
260 mpar.row(i + j * dimV) = auxPatch.patch(0).coefs().row(j + dimU * i);
270 newpatch.addPatch(newgeom1);
272 auxPatch.swap(newpatch);
279 void swapBasisAxis(){
281 for(
size_t np = 0; np < G1repBasis.nPatches(); np++)
293 for (
index_t j = 0; j < dimU; j++)
295 for (
index_t i = 0; i < dimV; i++)
297 mpar.row(i + j * dimV) = G1repBasis.patch(np).coefs().row(j + dimU * i);
306 G1repBasis.swap(newpatch);
312 G1repBasis = g1Basis;
319 this->rotateBasisAntiClockTwice();
322 this->rotateBasisAntiClock();
325 this->rotateBasisClock();
334 this->swapBasisAxis();
344 void computeTopology(){
349 return auxPatch.patch(0);
352 const index_t getGlobalPatchIndex(){
356 const index_t getNumberOfRotatioin(){
361 return axisOrientation;
366 return G1repBasis.patch(i).coefs();
374 void checkRotation(){
379 void checkOrientation(){
380 axisOrientation = ( axisOrientation == 0 ? 1 : 0 );
395 bool axisOrientation;
index_t addPatch(typename gsGeometry< T >::uPtr g)
Add a patch from a gsGeometry<T>::uPtr.
Definition: gsMultiPatch.hpp:210
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
index_t size() const
Returns the number of elements in the basis.
Definition: gsTensorBasis.h:108
Main header to be included by clients using the G+Smo library.
A tensor product of d B-spline functions, with arbitrary target dimension.
Definition: gsTensorBSpline.h:44
int size(size_t i) const
The number of basis functions in basis i.
Definition: gsMultiBasis.h:232
#define index_t
Definition: gsConfig.h:32
A tensor product B-spline basis.
Definition: gsTensorBSplineBasis.h:36
virtual short_t targetDim() const
Dimension of the target space.
Definition: gsFunctionSet.h:560
A univariate B-spline basis.
Definition: gsBSplineBasis.h:694
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
const KnotVectorType & knots(int i=0) const
Returns the knot vector of the basis.
Definition: gsBSplineBasis.h:369
Provides declaration of the MultiPatch class.
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
const Basis_t & component(short_t dir) const
For a tensor product basis, return the (const) 1-d basis for the i-th parameter component.
Definition: gsTensorBSplineBasis.h:202
bool computeTopology(T tol=1e-4, bool cornersOnly=false, bool tjunctions=false)
Attempt to compute interfaces and boundaries automatically.
Definition: gsMultiPatch.hpp:366