16template<
class T>
class gsLegendreBasis;
17template <
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"
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Class representing a domain. i.e. a collection of elements (triangles, rectangles,...
Definition gsDomain.h:32
A univariate Legendre basis.
Definition gsLegendreBasis.h:28
void deriv2_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Definition gsLegendreBasis.hpp:62
memory::unique_ptr< gsLegendreBasis > uPtr
Unique pointer for gsLegendreBasis.
Definition gsLegendreBasis.h:48
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
memory::shared_ptr< gsLegendreBasis > Ptr
Shared pointer for gsLegendreBasis.
Definition gsLegendreBasis.h:45
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
T Scalar_t
Coefficient type.
Definition gsLegendreBasis.h:33
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 active_into(const gsMatrix< T > &u, gsMatrix< index_t > &result) const
Definition gsLegendreBasis.hpp:8
gsLegendrePoly< T > GeometryType
Associated geometry type.
Definition gsLegendreBasis.h:36
short_t domainDim() const
Returns the dimension d of the parameter space.
Definition gsLegendreBasis.h:66
gsMatrix< T > support(const index_t &i) const
Returns a bounding box for the basis' domain.
Definition gsLegendreBasis.h:87
short_t size() const
Returns the number of basis functions in the basis.
Definition gsLegendreBasis.h:116
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
gsMatrix< T > support() const
Returns a bounding box for the basis' domain.
Definition gsLegendreBasis.h:79
gsDomain< T > * domain() const
Definition gsLegendreBasis.h:120
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition gsLegendreBasis.h:107
static const int Dim
Dimension of the parameter domain.
Definition gsLegendreBasis.h:42
short_t degree() const
Returns the polynomial degree.
Definition gsLegendreBasis.h:124
gsLegendreBasis< T > BoundaryBasisType
Associated Boundary basis type.
Definition gsLegendreBasis.h:39
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
Provides declaration of Basis abstract interface.
Provides structs and classes related to interfaces and boundaries.
Provides combinatorial unitilies.
#define short_t
Definition gsConfig.h:35
#define index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
Provides forward declarations of types and structs.
The G+Smo namespace, containing all definitions for the library.