PISM, A Parallel Ice Sheet Model
stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
|
Numerical integration of finite element functions. More...
#include <Quadrature.hh>
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< QuadPoint > | m_points |
std::vector< double > | m_weights |
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:
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.