25 #define TO_BSPLINE(x) static_cast<const gsTensorBSplineBasis<d,T> *>(x)
38 template<
short_t d,
class T>
47 Base(incrSmoothnessDegree,topol,basis)
53 using Base::m_incrSmoothnessDegree;
58 using Base::_setTensorMappingOfPatch;
59 using Base::_getPatch;
60 using Base::_getPatchIndex;
61 using Base::_getLocalIndex;
68 bool _checkMapping()
const
70 bool consistent =
true;
99 void _finalize()
const
102 mat.conservativeResize(mat.rows(),m_global);
104 m_mapper=
new gsWeightMapper<T>(mat);
105 m_mapper->optimize(gsWeightMapper<T>::optTargetToSource);
108 void _setMappingOfPatch(
index_t const patch)
const
110 _setTensorMappingOfPatch(patch);
115 std::vector<T> endpoints;
116 T parametricDistance = m_basis->getParametricDistanceOfVertex(pc,ps);
119 if(math::almostEqual<T>(parametricDistance,0.0))
128 for(
size_t i = deg+1;i<knots.
size();i++)
129 endpoints.push_back(knots.
at(i));
130 std::sort(endpoints.begin(),endpoints.end());
132 for(;nr<(
index_t)(endpoints.size());nr++)
133 if(math::almostEqual<T>(endpoints[nr],parametricDistance)||endpoints[nr]>=parametricDistance)
146 return TO_BSPLINE(&(m_basis->getBase(patch)))->knots(par);
151 return TO_BSPLINE(&(m_basis->getBase(patch)))->size(par)-1;
161 localIndex=_getLocalIndex(patch,u,v);
167 return _getLocalIndex(patch,_getPatchIndex(patch,u,v));
172 index_t u_amount=_getParMax(patch,0);
173 index_t v_amount=_getParMax(patch,1);
176 return _getPatchIndex(patch,flag?u_amount:0,v_amount);
178 return _getPatchIndex(patch,flag?u_amount:0,0);
181 return _getPatchIndex(patch,u_amount,flag?v_amount:0);
183 return _getPatchIndex(patch,0,flag?v_amount:0);
190 return TO_BSPLINE(&(m_basis->getBase(patch)))->index(vec);
195 return _getPar(_getPatch(localIndex),_getPatchIndex(localIndex),par);
Knot vector for B-splines.
void parameters_into(index_t dim, gsVector< bool > ¶m) const
returns a vector of parameters describing the position of the corner
Definition: gsBoundary.h:322
Provides declaration of Basis abstract interface.
Struct which represents a certain side of a patch.
Definition: gsBoundary.h:231
Provides declaration of the BoxTopology class.
bool parameter() const
Returns the parameter value (false=0=start, true=1=end) that corresponds to this side.
Definition: gsBoundary.h:128
A univariate Lagrange basis.
Definition: gsMPBESMapTensor.h:32
Provides declaration of Basis abstract interface.
size_t size() const
Number of knots (including repetitions).
Definition: gsKnotVector.h:242
#define index_t
Definition: gsConfig.h:32
Struct which represents a certain corner of a patch.
Definition: gsBoundary.h:392
A univariate Lagrange basis.
Definition: gsMPBESMapB2D.h:39
Provides declaration of Basis abstract interface.
Purely abstract class gsMappedBasis, which gives means of combining basis functions to new...
Definition: gsMPBESBasis.h:46
Struct which represents a certain side of a box.
Definition: gsBoundary.h:84
T at(const size_t &i) const
Returns the value of the i - th knot (counted with repetitions).
Definition: gsKnotVector.h:865
void reverse()
Better directly use affineTransformTo.
Definition: gsKnotVector.hpp:468
Class for representing a knot vector.
Definition: gsKnotVector.h:79
Defines a topological arrangement of a collection of "boxes" (e.g., parameter domains that map to phy...
Definition: gsBoxTopology.h:38
index_t patch
The index of the patch.
Definition: gsBoundary.h:234
short_t direction() const
Returns the parametric direction orthogonal to this side.
Definition: gsBoundary.h:113
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78