45 template<
short_t d,
class T>
54 typedef std::vector<std::pair<index_t,index_t> >::iterator step_iter;
56 typedef typename std::vector<BasisType *>::const_iterator ConstBasisIter;
57 typedef typename std::vector<BasisType *>::iterator BasisIter;
58 typedef typename std::vector<gsMatrix<T> *>::const_iterator ConstMatrixPtrIter;
60 typedef typename std::vector<indexType> IndexContainer;
61 typedef typename std::vector<indexType>::const_iterator ConstIndexIter;
62 typedef typename std::vector<weightType> WeightContainer;
63 typedef typename std::vector<weightType>::const_iterator ConstWeightIter;
65 typedef memory::unique_ptr< gsDomainIterator<T> > domainIter;
68 using gsMappedBasis<d,T>::m_mapper;
69 using gsMappedBasis<d,T>::m_topol;
70 using gsMappedBasis<d,T>::m_bases;
73 typedef memory::shared_ptr< gsMPBESBasis >
Ptr;
76 typedef memory::unique_ptr< gsMPBESBasis >
uPtr;
78 using gsMappedBasis<d,T>::size;
79 using gsMappedBasis<d,T>::degree;
80 using gsMappedBasis<d,T>::nPatches;
111 {
return m_bases[i]; }
143 std::ostringstream os;
149 std::ostream &
print(std::ostream & os)
const
150 { os << m_mapper->asMatrix().toDense() <<
"\n";
return os; }
158 bool isConnected(indexType i,indexType j)
const;
160 virtual bool isLocallyConnected(indexType i,indexType j)
const = 0;
171 unsigned getMinDist()
const
197 bool updateBasis =
true);
207 virtual void refine(
const index_t patch, gsMatrix<T>
const & boxes,
bool updateBasis =
true) = 0;
217 virtual void refineElements(
const index_t patch, std::vector<index_t>
const & boxes,
bool updateBasis =
true) = 0;
229 bool updateBasis =
true) = 0;
241 bool updateBasis =
true) = 0;
263 virtual void repairPatches(std::vector<gsMatrix<T> *> & coefs,
264 index_t startFromPatch = -1) = 0;
285 void smoothCornerEdge(
const patchCorner&pc,
const patchSide& ps,
bool updateBasis =
true);
308 bool setWeight(
const patchSide & ps,
const T weight);
317 void setC0(patchCorner pc);
328 virtual T
findParameter(patchSide
const & ps,patchCorner
const & pc,
unsigned nrBasisFuncs)
const = 0;
345 T parametricDistance1;
347 T parametricDistance2;
357 return (interface==bi) || (interface.getInverse()==bi);
392 #ifndef GISMO_BUILD_LIB
393 #include GISMO_HPP_HEADER(gsMPBESBasis.hpp)
bool isSpecialVertex(const patchCorner &pc) const
gives back true, if the given patchCorner is a special vertex
Definition: gsMPBESBasis.hpp:362
Struct which represents a certain side of a patch.
Definition: gsBoundary.h:231
void setC0(patchCorner pc)
Definition: gsMPBESBasis.hpp:333
T getWeight(const patchSide &ps) const
Definition: gsMPBESBasis.hpp:269
#define short_t
Definition: gsConfig.h:35
std::vector< std::pair< patchSide, T > > m_patchSideWeights
vector storing the weights for interfaces
Definition: gsMPBESBasis.h:379
T getParamDist(const patchCorner &pc, const gsMPBESBasis< d, T > &basis) const
gets the parametric distance from the corner pc
Definition: gsMPBESBasis.hpp:455
virtual T findParameter(patchSide const &ps, patchCorner const &pc, unsigned nrBasisFuncs) const =0
virtual void refine(const index_t patch, gsMatrix< T > const &boxes, bool updateBasis=true)=0
virtual void refineElements(const index_t patch, std::vector< index_t > const &boxes, bool updateBasis=true)=0
short_t m_incrSmoothnessDegree
smoothness degree that is tried to achive over patch interfaces
Definition: gsMPBESBasis.h:375
virtual ~gsMPBESBasis()
constructor, deletes all the bases and the mapper
Definition: gsMPBESBasis.h:90
#define index_t
Definition: gsConfig.h:32
virtual void refine_withCoefs(gsMatrix< T > &localCoefs, const index_t patch, gsMatrix< T > const &boxes, bool updateBasis=true)=0
bool _check() const
Checks the gsMappedBasis for consistency.
Definition: gsMPBESBasis.hpp:31
virtual bool _checkTopologyWithBases() const =0
Checks the gsMappedBasis for consistency.
Struct which represents a certain corner of a patch.
Definition: gsBoundary.h:392
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
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition: gsSparseMatrix.h:140
void uniformRefine_withCoefs(gsMatrix< T > &localCoefs, index_t numKnots=1, index_t mul=1, bool updateBasis=true)
Definition: gsMPBESBasis.hpp:151
Class Representing a triangle mesh with 3D vertices.
Definition: gsMesh.h:31
memory::unique_ptr< gsMPBESBasis > uPtr
Unique pointer for gsMPBESBasis.
Definition: gsMPBESBasis.h:76
Provides declaration of Basis abstract interface.
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
const gsBasis< T > & basis(const index_t k) const
Helper which casts and returns the k-th piece of this function set as a gsBasis.
Definition: gsFunctionSet.hpp:33
memory::shared_ptr< gsMPBESBasis > Ptr
Shared pointer for gsMPBESBasis.
Definition: gsMPBESBasis.h:73
short_t dim() const
Returns the dimension d of the parameter space.
Definition: gsMPBESBasis.h:134
Purely abstract class gsMappedBasis, which gives means of combining basis functions to new...
Definition: gsMPBESBasis.h:46
void smoothCornerEdge(const patchCorner &pc, const patchSide &ps, bool updateBasis=true)
Definition: gsMPBESBasis.hpp:207
Private stract that has the purpose of storing distance information of c^0 parts around special verti...
Definition: gsMPBESBasis.h:341
T getParametricDistanceOfVertex(const patchCorner &pc, const patchSide &ps) const
gives back the parametric c^0 distance of the edge ps starting from corner pc
Definition: gsMPBESBasis.hpp:372
bool isDistancesOfInterface(const boundaryInterface &bi) const
checks if this distances struct ressembles the interface given
Definition: gsMPBESBasis.h:355
Provides declaration of the Mesh class.
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
void degreeIncrease(index_t amount=1, index_t dir=-1, bool updateBasis=true)
Definition: gsMPBESBasis.hpp:189
void smoothEverything()
Definition: gsMPBESBasis.hpp:222
gsMPBESBasis()
Default empty constructor.
Definition: gsMPBESBasis.h:84
void setParamDist(unsigned absoluteVal, const patchCorner &pc, const gsMPBESBasis< d, T > &basis)
Definition: gsMPBESBasis.hpp:426
virtual void refineElements_withCoefs(gsMatrix< T > &localCoefs, const index_t patch, std::vector< index_t > const &boxes, bool updateBasis=true)=0
distances(const boundaryInterface &iface, const patchCorner &pc1, const patchCorner &pc2, const gsMPBESBasis< d, T > &basis)
Definition: gsMPBESBasis.hpp:397
std::ostream & print(std::ostream &os) const
Prints the object to the stream.
Definition: gsMPBESBasis.h:149
void _determineValues(patchSide side, patchSide ls, patchSide rs, index_t dist, unsigned degree, unsigned max, unsigned &left, unsigned &right, const gsMPBESBasis< d, T > &basis) const
determines the right values for the two distances, only used in the constructer
Definition: gsMPBESBasis.hpp:472
void uniformRefine(index_t numKnots=1, index_t mul=1, bool updateBasis=true)
Definition: gsMPBESBasis.hpp:137
virtual unsigned basisFunctionsOnSide(const patchSide &ps) const =0
Returns the amount of basis functions on a given side of a given patch.
bool setWeight(const patchSide &ps, const T weight)
Definition: gsMPBESBasis.hpp:279
Struct which represents an interface between two patches.
Definition: gsBoundary.h:649
std::string detail() const
Clone function. Used to make a copy of a derived basis.
Definition: gsMPBESBasis.h:140
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
virtual void _setMapping()=0
create a new mapping of the local basisfunctions
unsigned m_minDist
minimal C^0 distance from special (extraordinary) vertices, specified in basisfunctions ...
Definition: gsMPBESBasis.h:377
index_t getIncrSmoothnessDegree() const
getter for m_incrSmoothnessDegree
Definition: gsMPBESBasis.h:168
void degreeElevate(index_t amount=1, bool updateBasis=true)
Definition: gsMPBESBasis.hpp:180
BasisType * getBasePointer(index_t i)
getter for m_bases[i]
Definition: gsMPBESBasis.h:110
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
static const short_t Dim
Dimension of the parameter domains.
Definition: gsMPBESBasis.h:50