G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsLobattoRule.h
Go to the documentation of this file.
1
14#pragma once
15
16namespace gismo
17{
18
25template<class T>
26class gsLobattoRule GISMO_FINAL : public gsQuadRule<T>
27{
28public:
29
30 typedef memory::unique_ptr<gsLobattoRule> uPtr;
31
34
37 const unsigned digits = 0 )
38 {
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
55public:
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
62private:
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:27
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
gsLobattoRule(index_t numNodes, const unsigned digits=0)
Initialize a 1D Lobatto quadrature rule with numNodes.
Definition gsLobattoRule.h:48
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
static uPtr make(gsVector< index_t > const &numNodes, const unsigned digits=0)
Make function returning a smart pointer.
Definition gsLobattoRule.h:43
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
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
Class representing a reference quadrature rule.
Definition gsQuadRule.h:29
index_t numNodes() const
Number of nodes in the currently kept rule.
Definition gsQuadRule.h:106
gsQuadRule()
Default empty constructor.
Definition gsQuadRule.h:35
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
#define index_t
Definition gsConfig.h:32
The G+Smo namespace, containing all definitions for the library.