17 template <
class T>
class gsLegendrePoly;
42 static const int Dim = 1;
45 typedef memory::shared_ptr< gsLegendreBasis >
Ptr;
48 typedef memory::unique_ptr< gsLegendreBasis >
uPtr;
60 m_p(deg), m_start(start), m_end(end)
75 result.setConstant(1, u.cols(), m_p+1);
82 res << m_start , m_end ;
107 std::ostream &
print(std::ostream &os)
const
109 os <<
"Legendre Basis: deg=" << this->
degree()
110 <<
", size="<< this->
size()
111 <<
", interval= [" << m_start <<
"," << m_end <<
"].\n";
131 static inline T _getA(
const index_t j)
134 return math::sqrt((T)(2*j-1)) * math::sqrt((T)(2*j+1)) / (j*math::sqrt((T)3));
137 static inline T _getB(
const index_t j)
142 static inline T _getC(
const index_t j)
145 return _getA(j) / _getA(j-1);
160 #include "gsLegendreBasis.hpp"
Class representing a domain. i.e. a collection of elements (triangles, rectangles, cubes, simplices.
Definition: gsDomain.h:31
short_t size() const
Returns the number of basis functions in the basis.
Definition: gsLegendreBasis.h:116
short_t degree() const
Returns the polynomial degree.
Definition: gsLegendreBasis.h:124
short_t domainDim() const
Returns the dimension d of the parameter space.
Definition: gsLegendreBasis.h:66
static const int Dim
Dimension of the parameter domain.
Definition: gsLegendreBasis.h:42
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
#define short_t
Definition: gsConfig.h:35
Provides structs and classes related to interfaces and boundaries.
gsMatrix< T > support(const index_t &i) const
Returns a bounding box for the basis' domain.
Definition: gsLegendreBasis.h:87
memory::unique_ptr< gsLegendreBasis > uPtr
Unique pointer for gsLegendreBasis.
Definition: gsLegendreBasis.h:48
T Scalar_t
Coefficient type.
Definition: gsLegendreBasis.h:33
Provides declaration of Basis abstract interface.
#define index_t
Definition: gsConfig.h:32
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...
Definition: gsLegendreBasis.hpp:36
Provides combinatorial unitilies.
A univariate Legendre basis.
Definition: gsLegendreBasis.h:16
gsDomain< T > * domain() const
Definition: gsLegendreBasis.h:120
void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the non-zero basis functions at value u.
Definition: gsLegendreBasis.hpp:15
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: gsLegendreBasis.h:73
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
gsLegendreBasis< T > BoundaryBasisType
Associated Boundary basis type.
Definition: gsLegendreBasis.h:39
Provides forward declarations of types and structs.
gsLegendrePoly< T > GeometryType
Associated geometry type.
Definition: gsLegendreBasis.h:36
gsMatrix< T > support() const
Returns a bounding box for the basis' domain.
Definition: gsLegendreBasis.h:79
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsLegendreBasis.h:107
memory::shared_ptr< gsLegendreBasis > Ptr
Shared pointer for gsLegendreBasis.
Definition: gsLegendreBasis.h:45
void active_into(const gsMatrix< T > &u, gsMatrix< index_t > &result) const
Definition: gsLegendreBasis.hpp:8
gsLegendreBasis(const index_t deg, const T &start=1, const T &end=1)
Construct Legendre basis along the parameter pars and Interval [start,end].
Definition: gsLegendreBasis.h:59
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Definition: gsLegendreBasis.hpp:62