37template<
short_t d,
class T>
51 typedef memory::shared_ptr< gsGenericTensorBasis >
Ptr;
54 typedef memory::unique_ptr< gsGenericTensorBasis >
uPtr;
57 typedef gsGenericGeometry<d,T> GeometryType;
63 typedef typename Base::const_iterator const_iterator;
71 gsGenericTensorBasis(
const Basis_t & x,
const Basis_t & y) :
74 gsGenericTensorBasis( Basis_t* x, Basis_t* y, Basis_t* z ) :
Base(x,y,z) { }
76 gsGenericTensorBasis(
const Basis_t & x,
const Basis_t & y,
const Basis_t & z ) :
79 gsGenericTensorBasis( std::vector<Basis_t*> & bb ) :
Base(bb.data())
81 GISMO_ENSURE( d == bb.size(),
"Wrong d in the constructor of gsTensorBSplineBasis." );
88 GISMO_MAKE_GEOMETRY_NEW
90 std::ostream &
print(std::ostream &os)
const
92 os <<
"GenericTensorNurbsBasis<" << this->dim()<<
">, size "<< this->
size() <<
".";
93 for (
unsigned i = 0; i!=d; ++i )
94 os <<
"\n Direction "<< i <<
": "<< this->
component(i) <<
" ";
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
Class for a quasi-tensor B-spline basis.
Definition gsGenericTensorBasis.h:39
GISMO_MAKE_GEOMETRY_NEW std::ostream & print(std::ostream &os) const
Prints the object as a string, pure virtual function of gsTensorBasis.
Definition gsGenericTensorBasis.h:90
memory::unique_ptr< gsGenericTensorBasis > uPtr
Unique pointer for gsGenericTensorBasis.
Definition gsGenericTensorBasis.h:54
T Scalar_t
Coefficient type.
Definition gsGenericTensorBasis.h:46
memory::shared_ptr< gsGenericTensorBasis > Ptr
Shared pointer for gsGenericTensorBasis.
Definition gsGenericTensorBasis.h:51
gsTensorBasis< d, T > Base
Base type.
Definition gsGenericTensorBasis.h:43
Abstract base class for tensor product bases.
Definition gsTensorBasis.h:34
index_t size() const
Returns the number of elements in the basis.
Definition gsTensorBasis.h:108
Basis_t & component(short_t dir)
For a tensor product basis, return the 1-d basis for the i-th parameter component.
Definition gsTensorBasis.h:596
#define GISMO_ENSURE(cond, message)
Definition gsDebug.h:102
Provides declaration of TensorBasis class.
std::vector< T * > release(std::vector< unique_ptr< T > > &cont)
Takes a vector of smart pointers, releases them and returns the corresponding raw pointers.
Definition gsMemory.h:228
The G+Smo namespace, containing all definitions for the library.