Skip to content

Commit

Permalink
Add a 1-point 2D quadrature on [-1,1]*[-1,1]
Browse files Browse the repository at this point in the history
  • Loading branch information
ckhroulev committed Oct 14, 2020
1 parent d12badd commit 9e802d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/util/fem/Quadrature.cc
Expand Up @@ -65,6 +65,12 @@ Gaussian2::Gaussian2(double D) {
m_weights = {0.5 * D, 0.5 * D};
}

//! One-point quadrature on a rectangle.
Q1Quadrature1::Q1Quadrature1() {
m_points = {{0.0, 0.0, 0.0}};
m_weights = {4.0};
}

//! Two-by-two Gaussian quadrature on a rectangle.
Q1Quadrature4::Q1Quadrature4() {

Expand Down
6 changes: 6 additions & 0 deletions src/util/fem/Quadrature.hh
Expand Up @@ -85,6 +85,12 @@ public:
Gaussian2(double D);
};

//! The 4-point Gaussian quadrature on the square [-1,1]*[-1,1]
class Q1Quadrature1 : public Quadrature {
public:
Q1Quadrature1();
};

//! The 4-point Gaussian quadrature on the square [-1,1]*[-1,1]
class Q1Quadrature4 : public Quadrature {
public:
Expand Down

0 comments on commit 9e802d3

Please sign in to comment.