PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Public Member Functions | Protected Attributes | List of all members
pism::fem::Quadrature Class Reference

Numerical integration of finite element functions. More...

#include <Quadrature.hh>

+ Inheritance diagram for pism::fem::Quadrature:

Public Member Functions

const std::vector< QuadPoint > & points () const
 
const std::vector< double > & weights () const
 
QuadPoint point (int k) const
 
double weight (int k) const
 

Protected Attributes

std::vector< QuadPointm_points
 
std::vector< double > m_weights
 

Detailed Description

Numerical integration of finite element functions.

The core of the finite element method is the computation of integrals over elements. For nonlinear problems, or problems with non-constant coefficients (i.e. any real problem) the integration has to be done approximately:

\[ \int_E f(x)\; dx \approx \sum_q f(x_q) w_q \]

for certain quadrature points \(x_q\) and weights \(w_q\). A quadrature is used to evaluate finite element functions at quadrature points, and to compute weights \(w_q\) for a given element.

In this concrete implementation, the reference element \(R\) is the square \([-1,1]\times[-1,1]\). On a given element, nodes (o) and quadrature points (*) are ordered as follows:

3 o------------------o 2
| 3 2 |
| * * |
| |
| |
| * * |
| 0 1 |
0 o------------------o 1

There are four quad points per element, which occur at \(x,y=\pm 1/\sqrt{3}\). This corresponds to the tensor product of Gaussian integration on an interval that is exact for cubic functions on the interval.

Integration on a physical element can be thought of as being done by change of variables. The quadrature weights need to be modified, and the Quadrature takes care of this. Because all elements in an Grid are congruent, the quadrature weights are the same for each element, and are computed upon initialization.

Definition at line 62 of file Quadrature.hh.


The documentation for this class was generated from the following files: