Opm::FaceQuadrature Class Reference

#include <FaceQuadrature.hpp>

Public Member Functions

 FaceQuadrature (const UnstructuredGrid &grid, const int face, const int degree)
 
int numQuadPts () const
 
void quadPtCoord (const int index, double *coord) const
 
double quadPtWeight (const int index) const
 

Detailed Description

A class providing numerical quadrature for faces. In general: {face} g(x) dx = {i=0}^{n-1} w_i g(x_i). Note that this class does multiply weights by face area, so weights always sum to face area.

Degree 1 method: Midpoint (centroid) method. n = 1, w_0 = face area, x_0 = face centroid

Degree 2 method for 2d: Simpson's method (actually this is degree 3).

Degree 2 method for 3d: Based on subdivision of the face into triangles, with the centroid as a common vertex, and the triangle edge midpoint rule. Triangle i consists of the centroid C, nodes N_i and N_{i+1}. Its area is A_i. n = 2 * nn (nn = num nodes in face) For i = 0..(nn-1): w_i = 1/3 A_i. w_{nn+i} = 1/3 A_{i-1} + 1/3 A_i x_i = (N_i + N_{i+1})/2 x_{nn+i} = (C + N_i)/2 All N and A indices are interpreted cyclic, modulus nn.

Constructor & Destructor Documentation

Opm::FaceQuadrature::FaceQuadrature ( const UnstructuredGrid grid,
const int  face,
const int  degree 
)
inline

Member Function Documentation

int Opm::FaceQuadrature::numQuadPts ( ) const
inline
void Opm::FaceQuadrature::quadPtCoord ( const int  index,
double *  coord 
) const
inline

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