52 const Real quA = options.getReal(
"quA");
53 const index_t quB = options.getInt (
"quB");
55 return get<T>(qu, nnodes);
60 static typename gsQuadRule<T>::uPtr
65 const Real quA = options.
getReal(
"quA");
67 const bool over = options.
askSwitch (
"overInt",
false);
80 GISMO_ERROR(
"Invalid Quadrature rule request ("<<qu<<
")");
89 const Real quAb = options.
askReal(
"quAb",quA+1);
95 std::vector<gsQuadRule<T> > quInterior(nnodesI.size());
96 std::vector<gsQuadRule<T> > quBoundary(nnodesB.size());
98 for (
index_t d = 0; d != nnodesI.size(); d++)
100 quInterior[d] = getUnivariate<T>(qu,nnodesI[d]);
101 quBoundary[d] = getUnivariate<T>(qu,nnodesB[d]);
115 GISMO_ERROR(
"Quadrature with index "<<qu<<
" unknown.");
130 GISMO_ERROR(
"Invalid Quadrature rule request ("<<qu<<
")");
145 GISMO_ERROR(
"Invalid Quadrature rule request ("<<qu<<
")");
156 GISMO_ASSERT( fixDir < d && fixDir>-2,
"Invalid input fixDir = "<<fixDir);
165 for(i=0; i!=fixDir; ++i )
167 nnodes[i] = cast<Real,index_t>(quA * basis.
degree(i) + quB + 0.5);
169 nnodes[i] = cast<Real,index_t>(quA * basis.
degree(i) + quB + 0.5);
#define GISMO_COEFF_TYPE
Definition: gsConfig.h:26
Class that represents the (tensor) Gauss-Lobatto quadrature rule.
Definition: gsLobattoRule.h:26
static uPtr make(const gsBasis< T > &basis, const std::vector< gsQuadRule< T > > &quadInterior, const std::vector< gsQuadRule< T > > &quadBoundary)
Construct a smart-pointer to the rule.
Definition: gsOverIntegrateRule.h:75
Provides the Gauss-Legendre quadrature rule.
Class representing a reference quadrature rule.
Definition: gsQuadRule.h:28
Over-integrates a Gauss-Legendre or Gauss-Lobatto rule.
Provides the Gauss-Lobatto quadrature rule.
#define short_t
Definition: gsConfig.h:35
virtual short_t degree(short_t i) const
Degree with respect to the i-th variable. If the basis is a tensor product of (piecewise) polynomial ...
Definition: gsBasis.hpp:650
Helper class for obtaining a quadrature rule.
Definition: gsQuadrature.h:27
static gsQuadRule< T > getUnivariate(index_t qu, index_t numNodes, unsigned digits=0)
Constructs a quadrature rule based on input options.
Definition: gsQuadrature.h:136
#define index_t
Definition: gsConfig.h:32
static gsQuadRule< T >::uPtr getPtr(const gsBasis< T > &basis, const gsOptionList &options, short_t fixDir=-1)
Constructs a quadrature rule based on input options.
Definition: gsQuadrature.h:61
const index_t & getInt(const std::string &label) const
Reads value for option label from options.
Definition: gsOptionList.cpp:37
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
Provides a list of labeled parameters/options that can be set and accessed easily.
Gauss-Legendre quadrature.
Definition: gsQuadrature.h:34
Patch-wise quadrature rule (Johannessen 2017)
Definition: gsQuadrature.h:36
static gsVector< index_t > numNodes(const gsBasis< T > &basis, const Real quA, const index_t quB, short_t fixDir=-1)
Definition: gsQuadrature.h:152
Gauss-Lobatto quadrature.
Definition: gsQuadrature.h:35
static uPtr make(gsVector< index_t > const &numNodes, const unsigned digits=0)
Make function returning a smart pointer.
Definition: gsLobattoRule.h:43
Real askReal(const std::string &label, const Real &value=0) const
Reads value for option label from options.
Definition: gsOptionList.cpp:139
rule
Quadrature rule types.
Definition: gsQuadrature.h:32
Provides patch-wise quadrature rule.
index_t askInt(const std::string &label, const index_t &value=0) const
Reads value for option label from options.
Definition: gsOptionList.cpp:117
#define GISMO_ERROR(message)
Definition: gsDebug.h:118
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
bool askSwitch(const std::string &label, const bool &value=false) const
Reads value for option label from options.
Definition: gsOptionList.cpp:128
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
Class that represents the (tensor) Gauss-Legendre quadrature rule.
Definition: gsGaussRule.h:27
Provides the Newton-Cotes quadrature rule.
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
Real getReal(const std::string &label) const
Reads value for option label from options.
Definition: gsOptionList.cpp:44
static uPtr make(gsVector< index_t > const &numNodes, const unsigned digits=0)
Make function returning a smart pointer.
Definition: gsGaussRule.h:44