90 typedef memory::unique_ptr<gsPatchRule> uPtr;
113 const bool overintegrate,
131 const bool overintegrate,
133 {
return uPtr(
new gsPatchRule(basis,degree,regularity,overintegrate,fixDir) ); }
157 void mapTo( T startVal, T endVal,
165 index_t dim()
const {
return m_basis->dim(); }
167 gsVector<T> nodes(
const index_t d=0)
const {
return m_nodes.at(d); }
168 gsVector<T> weights(
const index_t d=0)
const {
return m_weights.at(d); }
182 ndof =
static_cast<index_t>(std::ceil(ndof/2.0));
197 std::vector<T> result;
199 return result.size()==0 ?
true :
false;
240 const T tol = 1e-10)
const;
248 std::vector<gsVector<T> > m_nodes;
249 std::vector<gsVector<T> > m_weights;
253 mutable typename gsSparseSolver<T>::QR m_solver;
257 std::vector<std::map<T,T> > m_maps;
263 #ifndef GISMO_BUILD_LIB
264 #include GISMO_HPP_HEADER(gsPatchRule.hpp)
Provides a base class for a quadrature rule.
Knot vector for B-splines.
Class representing a reference quadrature rule.
Definition: gsQuadRule.h:28
void mapToAll(const std::vector< T > &, gsMatrix< T > &, gsVector< T > &) const
Not implemented! See gsQuadRule for documentation.
Definition: gsPatchRule.h:161
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
#define short_t
Definition: gsConfig.h:35
size_t numElements() const
Number of knot intervals inside domain.
Definition: gsKnotVector.h:268
#define index_t
Definition: gsConfig.h:32
~gsPatchRule()
Destructor.
Definition: gsPatchRule.h:139
gsKnotVector< T > _init(const gsBSplineBasis< T > *Bbasis) const
Initializes the knot vector for the patch-rule implementation.
Definition: gsPatchRule.hpp:209
std::pair< gsMatrix< T >, gsVector< T > > _integrate(const gsKnotVector< T > &knots) const
Integrates all basis functions from a knot vector (numerically with Gauss)
Definition: gsPatchRule.hpp:291
A univariate B-spline basis.
Definition: gsBSplineBasis.h:694
std::pair< gsVector< T >, gsVector< T > > _compute(const gsKnotVector< T > &knots, const gsMatrix< T > &greville, const gsVector< T > &integrals, const T tol=1e-10) const
Computes the points and weights for the patch rule using Newton iterations.
Definition: gsPatchRule.hpp:324
Provides declaration of BSplineBasis class.
bool _isSymmetric(const gsKnotVector< T > knots) const
Determines whether the specified knot vector is symmetric.
Definition: gsPatchRule.h:193
void symDifference(const gsKnotVector< T > &other, std::vector< T > &result) const
Computes the symmetric difference between this knot-vector and other.
Definition: gsKnotVector.hpp:172
Class that represents the (tensor) patch quadrature rule.
Definition: gsPatchRule.h:86
void mapTo(const gsVector< T > &lower, const gsVector< T > &upper, gsMatrix< T > &nodes, gsVector< T > &weights) const
Maps the points in the d-dimensional cube with points lower and upper.
Definition: gsPatchRule.hpp:133
gsPatchRule()
Default empty constructor.
Definition: gsPatchRule.h:93
index_t _numQuads(const gsKnotVector< T > knots) const
Computes the number of quadrature points to exactly integrate the space.
Definition: gsPatchRule.h:179
void reverse()
Better directly use affineTransformTo.
Definition: gsKnotVector.hpp:468
Class for representing a knot vector.
Definition: gsKnotVector.h:79
static uPtr make(const gsBasis< T > &basis, const index_t degree, const index_t regularity, const bool overintegrate, const short_t fixDir=-1)
Make function returning a smart pointer.
Definition: gsPatchRule.h:128
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
void copy(T begin, T end, U *result)
Small wrapper for std::copy mimicking std::copy for a raw pointer destination, copies n positions sta...
Definition: gsMemory.h:391