G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsLobattoRule.h
Go to the documentation of this file.
1 
14 #pragma once
15 
16 namespace gismo
17 {
18 
25 template<class T>
26 class gsLobattoRule GISMO_FINAL : public gsQuadRule<T>
27 {
28 public:
29 
30  typedef memory::unique_ptr<gsLobattoRule> uPtr;
31 
34 
37  const unsigned digits = 0 )
38  {
39  gsLobattoRule::setNodes(numNodes, digits);
40  }
41 
43  static uPtr make(gsVector<index_t> const & numNodes,
44  const unsigned digits = 0 )
45  { return uPtr( new gsLobattoRule(numNodes,digits) ); }
46 
48  gsLobattoRule(index_t numNodes, const unsigned digits = 0 )
49  {
50  this->setNodes(numNodes, digits);
51  }
52 
53  ~gsLobattoRule() { }
54 
55 public:
56  // see gsQuadRule.h for documentation
57  void setNodes( gsVector<index_t> const & numNodes,
58  unsigned digits = 0 );
59 
60  using gsQuadRule<T>::setNodes;// unhide base
61 
62 private:
63 
69  static void computeReference(index_t n, gsVector<T> & x, gsVector<T> & w,
70  unsigned digits = 0 );
71 
79  static bool lookupReference (index_t n, gsVector<T> & x, gsVector<T> & w);
80 
81 }; // class gsLobattoRule
82 
83 
84 } // namespace gismo
85 
86 
87 #ifndef GISMO_BUILD_LIB
88 #include GISMO_HPP_HEADER(gsLobattoRule.hpp)
89 #endif
Class that represents the (tensor) Gauss-Lobatto quadrature rule.
Definition: gsLobattoRule.h:26
Class representing a reference quadrature rule.
Definition: gsQuadRule.h:28
gsLobattoRule(index_t numNodes, const unsigned digits=0)
Initialize a 1D Lobatto quadrature rule with numNodes.
Definition: gsLobattoRule.h:48
#define index_t
Definition: gsConfig.h:32
static bool lookupReference(index_t n, gsVector< T > &x, gsVector< T > &w)
Look up function for the Lobatto quadrature rule in the interval [-1,1].
Definition: gsLobattoRule.hpp:123
gsLobattoRule()
Default empty constructor.
Definition: gsLobattoRule.h:33
static uPtr make(gsVector< index_t > const &numNodes, const unsigned digits=0)
Make function returning a smart pointer.
Definition: gsLobattoRule.h:43
gsLobattoRule(gsVector< index_t > const &numNodes, const unsigned digits=0)
Initialize a tensor-product Lobatto quadrature rule with numNodes (direction-wise) ...
Definition: gsLobattoRule.h:36
index_t numNodes() const
Number of nodes in the currently kept rule.
Definition: gsQuadRule.h:106
void setNodes(gsVector< index_t > const &numNodes, unsigned digits=0)
Initialize quadrature rule with numNodes number of quadrature points per integration variable...
Definition: gsLobattoRule.hpp:23
static void computeReference(index_t n, gsVector< T > &x, gsVector< T > &w, unsigned digits=0)
Computes the Lobatto quadrature rule with n nodes in the interval [-1,1].
Definition: gsLobattoRule.hpp:59