31 template<
short_t d,
class T>
36 typedef memory::shared_ptr< gsMPBESBSplineBasis >
Ptr;
39 typedef memory::unique_ptr< gsMPBESBSplineBasis >
uPtr;
47 typedef typename std::vector<BasisType *> BasisContainer;
48 typedef typename std::vector<gsBasis<T>* >::const_iterator ConstBasisIter;
49 typedef typename std::vector<gsBasis<T>* >::iterator BasisIter;
50 typedef typename std::vector<gsMatrix<T> *>::const_iterator ConstMatrixPtrIter;
63 using Base::global_coef_to_local_coef;
64 using Base::local_coef_to_global_coef;
65 using Base::exportToPatches;
69 using Base::maxDegree;
71 using Base::_getPatch;
72 using Base::_getPatchIndex;
105 bool consistent =
true;
176 virtual bool isLocallyConnected(indexType i,indexType j)
const;
191 void refine(
const index_t patch,
const std::vector<T>& knots_u,
const std::vector<T>& knots_v,
bool updateBasis =
true);
193 void refine(
const index_t patch, gsMatrix<T>
const & boxes,
bool updateBasis =
true);
195 void refineElements(
const index_t patch, std::vector<index_t>
const & boxes,
bool updateBasis =
true);
197 void refine_withCoefs(gsMatrix<T>& localCoef,
const index_t patch,
const std::vector<T>& knots_u,
const std::vector<T>& knots_v,
198 bool updateBasis =
true);
200 void refine_withCoefs(gsMatrix<T>& coefs,
const index_t patch, gsMatrix<T>
const & boxes,
201 bool updateBasis =
true);
204 bool updateBasis =
true);
211 void _boxesVectorToMatrix(
const std::vector<index_t> & boxes, gsMatrix<T> & mat_boxes);
213 void _boxToRefineKnots(
const index_t patch,gsMatrix<T>
const & boxes,std::vector<std::vector<T> > & refineKnots);
219 unsigned getNrOfSpecialKnots(
const gsKnotVector<T> kv,
const std::vector<T>& new_knots,
bool par,
index_t distance);
224 bool _knotsMatchNeighbours(
index_t patch,std::vector<std::vector<T> >& knotsToInsert,
225 std::vector<index_t>& checkPatches,
233 T
findParameter(patchSide
const & ps,patchCorner
const & pc,
unsigned nrBasisFuncs)
const;
A univariate Lagrange basis.
Definition: gsMPBESBSplineBasis.h:32
Knot vector for B-splines.
bool isSpecialVertex(const patchCorner &pc) const
gives back true, if the given patchCorner is a special vertex
Definition: gsMPBESBasis.hpp:362
Provides declaration of Basis abstract interface.
T distance(gsMatrix< T > const &A, gsMatrix< T > const &B, index_t i=0, index_t j=0, bool cols=false)
compute a distance between the point number in the set and the point number <j> in the set ; by def...
#define short_t
Definition: gsConfig.h:35
memory::shared_ptr< gsMPBESBSplineBasis > Ptr
Shared pointer for gsMPBESBSplineBasis.
Definition: gsMPBESBSplineBasis.h:36
void repairPatches(std::vector< gsMatrix< T > * > &coefs, index_t startFromPatch=-1)
Definition: gsMPBESBSplineBasis.hpp:338
void _setMapping()
create a new mapping of the local basisfunctions
Definition: gsMPBESBSplineBasis.hpp:132
short_t m_incrSmoothnessDegree
smoothness degree that is tried to achive over patch interfaces
Definition: gsMPBESBasis.h:375
#define index_t
Definition: gsConfig.h:32
memory::unique_ptr< gsMPBESBSplineBasis > uPtr
Unique pointer for gsMPBESBSplineBasis.
Definition: gsMPBESBSplineBasis.h:39
A tensor product B-spline basis.
Definition: gsTensorBSplineBasis.h:36
std::vector< std::pair< patchCorner, bool > > m_vertices
vector storing all the inner vertices, with a flag if it is an Extraordinary vertex or an ordinary ve...
Definition: gsMPBESBasis.h:381
void refineElements(const index_t patch, std::vector< index_t > const &boxes, bool updateBasis=true)
Definition: gsMPBESBSplineBasis.hpp:202
T findParameter(patchSide const &ps, patchCorner const &pc, unsigned nrBasisFuncs) const
Definition: gsMPBESBSplineBasis.hpp:436
virtual void repairPatches(std::vector< gsMatrix< T > * > &coefs, index_t startFromPatch=-1)=0
void updateTopol()
updates the mapping of this basis (f.e. after a knot insertion)
Definition: gsMPBESBasis.h:101
static const short_t Dim
Dimension of the parameter domain.
Definition: gsMPBESBSplineBasis.h:42
gsTensorBSplineBasis< d, T > & basis(size_t i)
Clone function. Used to make a copy of a derived basis.
Definition: gsMPBESBSplineBasis.h:168
Purely abstract class gsMappedBasis, which gives means of combining basis functions to new...
Definition: gsMPBESBasis.h:46
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
void numActive_into(const index_t patch, const gsMatrix< T > &u, gsVector< index_t > &result) const
Returns the number of active (nonzero) basis functions at points u in result.
Definition: gsMPBESBSplineBasis.hpp:170
unsigned basisFunctionsOnSide(const patchSide &ps) const
Returns the amount of basis functions on a given side of a given patch.
Definition: gsMPBESBSplineBasis.hpp:142
gsMPBESBSplineBasis()
Default empty constructor.
Definition: gsMPBESBSplineBasis.h:78
bool _checkTopologyWithBases() const
Checks the gsMappedBasis for consistency.
Definition: gsMPBESBSplineBasis.h:102
void refineElements_withCoefs(gsMatrix< T > &coefs, const index_t patch, std::vector< index_t > const &boxes, bool updateBasis=true)
Definition: gsMPBESBSplineBasis.hpp:258
std::vector< distances > m_distances
vector of distances objects, that store C^0 distances from special vertices on the edges ...
Definition: gsMPBESBasis.h:383
void _initVertices()
initializes the m_vertices field
Definition: gsMPBESBasis.hpp:298
Defines a topological arrangement of a collection of "boxes" (e.g., parameter domains that map to phy...
Definition: gsBoxTopology.h:38
unsigned m_minDist
minimal C^0 distance from special (extraordinary) vertices, specified in basisfunctions ...
Definition: gsMPBESBasis.h:377
Provides declaration of Basis abstract interface.
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
void _setDistanceOfAllVertices()
initializes the m_distances field
Definition: gsMPBESBasis.hpp:313