LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
make_quad_rule_nodal.cc
1
9#include "make_quad_rule_nodal.h"
10
11#include <boost/core/ref.hpp>
12
13namespace lf::quad {
15 double ref_el_vol = 1.0;
16 if (ref_el == base::RefEl::kTria()) {
17 ref_el_vol = 0.5;
18 }
19 return QuadRule(ref_el, ref_el.NodeCoords(),
20 Eigen::VectorXd::Constant(ref_el.NumNodes(),
21 ref_el_vol / ref_el.NumNodes()),
22 1);
23}
24} // namespace lf::quad
Represents a reference element with all its properties.
Definition ref_el.h:109
const Eigen::MatrixXd & NodeCoords() const
Get the coordinates of the nodes of this reference element.
Definition ref_el.h:241
static constexpr RefEl kTria()
Returns the reference triangle.
Definition ref_el.h:161
constexpr size_type NumNodes() const
The number of nodes of this reference element.
Definition ref_el.h:213
Represents a Quadrature Rule over one of the Reference Elements.
Definition quad_rule.h:58
Rules for numerical quadrature on reference entity shapes.
QuadRule make_QuadRuleNodal(base::RefEl ref_el)
Create a quadrature rule that evaluates the quadrand only at the nodes of the reference element.