14 template <
class T>
class gsMvLegendrePoly;
39 static const int Dim = 1;
42 typedef memory::shared_ptr< gsMvLegendreBasis >
Ptr;
45 typedef memory::unique_ptr< gsMvLegendreBasis >
uPtr;
47 static Ptr Make (
const gsVector<T> & vec,
const T & start,
const T & end)
53 m_ubasis(deg,start, m_end)
68 result.setConstant(1, u.cols(), m_p+1);
75 res << m_start , m_end ;
97 GISMO_MAKE_GEOMETRY_NEW
100 std::ostream &
print(std::ostream &os)
const
102 os <<
"MvLegendre Basis: deg=" << this->
degree()
103 <<
", size="<< this->
size()
104 <<
", interval= [" << m_start <<
"," << m_end <<
"].\n";
109 int size()
const {
return m_p+1; }
124 inline T _getA(
const index_t j)
127 return math::sqrt((T)(2*j-1)) * math::sqrt((T)(2*j+1)) / (j*math::sqrt((T)3));
130 inline T _getB(
const index_t j)
135 inline T _getC(
const index_t j)
138 return _getA(j) / _getA(j-1);
142 gsLegendreBasis<T> m_ubasis;
Class representing a domain. i.e. a collection of elements (triangles, rectangles, cubes, simplices.
Definition: gsDomain.h:31
int size() const
Returns the number of basis functions in the basis.
Definition: gsMvLegandreBasis.h:109
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
GISMO_MAKE_GEOMETRY_NEW std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsMvLegandreBasis.h:100
void active_into(const gsMatrix< T > &u, gsMatrix< index_t > &result) const
#define short_t
Definition: gsConfig.h:35
memory::shared_ptr< gsMvLegendreBasis > Ptr
Shared pointer for gsMvLegendreBasis.
Definition: gsMvLegandreBasis.h:42
void numActive_into(const gsMatrix< T > &u, gsVector< index_t > &result) const
Returns the number of active (nonzero) basis functions at points u in result.
Definition: gsMvLegandreBasis.h:66
#define index_t
Definition: gsConfig.h:32
Provides combinatorial unitilies.
gsMvLegendreBasis< T > BoundaryBasisType
Associated Boundary basis type.
Definition: gsMvLegandreBasis.h:36
static const int Dim
Dimension of the parameter domain.
Definition: gsMvLegandreBasis.h:39
gsMvLegendrePoly< T > GeometryType
Associated geometry type.
Definition: gsMvLegandreBasis.h:33
A multivariate Legendre basis.
Definition: gsMvLegandreBasis.h:13
memory::shared_ptr< gsBasis > Ptr
Shared pointer for gsBasis.
Definition: gsBasis.h:86
int dim() const
Returns the dimension d of the parameter space.
Definition: gsMvLegandreBasis.h:59
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
Provides forward declarations of types and structs.
gsDomain< T > * domain() const
Definition: gsMvLegandreBasis.h:113
gsMvLegendreBasis(const index_t deg, const T &start=1, const T &end=1)
Construct MvLegendre basis along the parameter pars and Interval [start,end].
Definition: gsMvLegandreBasis.h:52
T Scalar_t
Coefficient type.
Definition: gsMvLegandreBasis.h:30
void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the non-zero basis functions at value u.
short_t degree() const
Returns the polynomial degree.
Definition: gsMvLegandreBasis.h:117
void deriv_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the (partial) derivatives of non-zero basis functions at (the columns of) u...
gsMatrix< T > support() const
Returns a bounding box for the basis' domain.
Definition: gsMvLegandreBasis.h:72
gsMatrix< T > support(const index_t &i) const
Returns a bounding box for the basis' domain.
Definition: gsMvLegandreBasis.h:80
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
memory::unique_ptr< gsMvLegendreBasis > uPtr
Unique pointer for gsMvLegendreBasis.
Definition: gsMvLegandreBasis.h:45