quadrature.hh

Go to the documentation of this file.
1 
6 #ifndef quadrature_hh
7 #define quadrature_hh
8 
9 #include <map>
10 
11 #include "basics/typedefs.hh"
12 #include "basics/outputOperator.hh"
13 
14 namespace concepts {
15 
16  // ************************************************************ Quadrature **
17 
96  template<int type>
97  class Quadrature : public virtual OutputOperator {
98  public:
103  Quadrature(uint n);
105  const Real* abscissas() const { return abscissas_; }
107  const Real* weights() const { return weights_; }
109  uint n() const { return n_; }
114  static std::string storedPoints();
115  protected:
116  virtual std::ostream& info(std::ostream& os) const;
117 
122  private:
127  static std::map<uint, Real*> abscissas_H;
128 
133  static std::map<uint, Real*> weights_H;
134 
136  uint n_;
137 
138  bool find_();
139  };
140 
141 } // namespace concepts
142 
143 #endif // quadrature_hh
static std::map< uint, Real * > weights_H
Hash of the already computed values of the weights of this rule.
Definition: quadrature.hh:133
Quadrature(uint n)
Constructor.
uint n() const
Returns the number of quadrature points.
Definition: quadrature.hh:109
static std::map< uint, Real * > abscissas_H
Hash of the already computed values of the abscissas of this rule.
Definition: quadrature.hh:127
Real * weights_
Weights.
Definition: quadrature.hh:121
static std::string storedPoints()
Lists the integration orders (points) which have been computed so far.
uint n_
Number of quadrature points.
Definition: quadrature.hh:136
const Real * weights() const
Returns a pointer into the array of the weights.
Definition: quadrature.hh:107
Real * abscissas_
Abscissas.
Definition: quadrature.hh:119
const Real * abscissas() const
Returns a pointer into the array of the abscissas.
Definition: quadrature.hh:105
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Basic class for numerical integration.
Definition: quadrature.hh:97
Class providing an output operator.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich