16 template<
short_t d,
class T>
17 gsMPBESBasis<d,T> * getCompBasisFromMultiPatch(
const gsMultiPatch<T> & mp,
index_t incrSmoothness = -1,
index_t minEVDistance = -1 )
19 gsMPBESBasis<d,T> * compBasis=NULL;
20 bool tensorBSpline=
true;
22 std::vector<gsTensorBSplineBasis<d,T>* >tensorBases;
23 for(
size_t i = 0;i<mp.nPatches();++i)
25 tensorBases.push_back(
dynamic_cast<gsTensorBSplineBasis<d,T> *
>(& mp.basis(i)));
26 tensorBSpline = tensorBSpline && tensorBases[i]!=NULL;
29 compBasis = (
new gsMPBESBSplineBasis<d,T>(tensorBases,mp,incrSmoothness,minEVDistance));
32 std::vector<gsHTensorBasis<d,T>* >hBases;
33 for(
size_t i = 0;i<mp.nPatches();++i)
35 hBases.push_back(
dynamic_cast<gsHTensorBasis<d,T> *
>(& mp.basis(i)));
36 hTensor = hTensor && hBases[i]!=NULL;
39 compBasis = (
new gsMPBESHSplineBasis<d,T>(hBases,mp,incrSmoothness,minEVDistance));
41 GISMO_ASSERT(tensorBSpline||hTensor,
"No suitable basis for gsMappedBasis found.");
45 template<
short_t d,
class T>
46 gsMPBESBasis<d,T> * getCompBasisFromMultiPatch_withCoefs(
const gsMultiPatch<T> & mp, std::vector<gsMatrix<T>* >&coefs,
index_t incrSmoothness = -1,
index_t minEVDistance = -1 )
48 gsMPBESBasis<d,T> * compBasis=NULL;
49 bool tensorBSpline=
true;
51 std::vector<gsTensorBSplineBasis<d,T>* >tensorBases;
52 for(
size_t i = 0;i<mp.nPatches();++i)
54 tensorBases.push_back(
dynamic_cast<gsTensorBSplineBasis<d,T> *
>(& mp.basis(i)));
55 tensorBSpline = tensorBSpline && tensorBases[i]!=NULL;
58 compBasis = (
new gsMPBESBSplineBasis<d,T>(tensorBases,mp,coefs,incrSmoothness,minEVDistance));
61 std::vector<gsHTensorBasis<d,T>* >hBases;
62 for(
size_t i = 0;i<mp.nPatches();++i)
64 hBases.push_back(
dynamic_cast<gsHTensorBasis<d,T> *
>(& mp.basis(i)));
65 hTensor = hTensor && hBases[i]!=NULL;
68 compBasis = (
new gsMPBESHSplineBasis<d,T>(hBases,mp,coefs,incrSmoothness,minEVDistance));
70 GISMO_ASSERT(tensorBSpline||hTensor,
"No suitable basis for gsMappedBasis found.");
Provides definition of HTensorBasis abstract interface.
Provides declaration of Basis abstract interface.
Provides declaration of Basis abstract interface.
Provides declaration of Basis abstract interface.
#define index_t
Definition: gsConfig.h:32
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
Provides declaration of THBSplineBasis class.
Utility class which holds I/O XML data to read/write to/from files.
Utility class which holds I/O XML data to read/write to/from files.