Defines a quadrature rule.
More...
#include <QuadratureRule.hpp>
|
using | const_shared_ptr = std::shared_ptr<const QuadratureRule> |
| Alias to shared_ptr to constant object.
|
|
using | const_unique_ptr = std::unique_ptr<const QuadratureRule> |
| Alias to unique_ptr to constant object.
|
|
using | vector_const_shared_ptr = std::vector<const_shared_ptr> |
| Alias to a vector of const_shared_ptr.
|
|
Defines a quadrature rule.
◆ QuadratureRule() [1/5]
Constructor.
- Parameters
-
[in] | topology_id | Topology identifier. |
[in] | degree_of_exactness | Degree of exactness of the rule. Choose NumericNS::UninitiazedIndex() for rules for which it is pointless. |
- Todo
- This should be handled more properly with inheritance, so that rules for which it is pointless do not even have such an attribute, but convention above will do for the time being.
- Parameters
-
[in] | name | Name of the quadrature rule. |
[in] | point_list | List of quadrature points. |
◆ QuadratureRule() [2/5]
Constructor.
In this overload, quadrature points aren't yet defined and must be added afterwards through AddQuadraturePoint() method.
- Parameters
-
[in] | topology_id | Topology identifier. |
[in] | degree_of_exactness | Degree of exactness of the rule. Choose NumericNS::UninitiazedIndex() for rules for which it is pointless. |
- Todo
- This should be handled more properly with inheritance, so that rules for which it is pointless do not even have such an attribute, but convention above will do for the time being.
- Parameters
-
[in] | name | Name of the quadrature rule. |
◆ QuadratureRule() [3/5]
MoReFEM::QuadratureRule::QuadratureRule |
( |
TopologyNS::Type | topology_id, |
|
|
std::size_t | degree_of_exactness ) |
|
explicit |
Dummy constructor with only degree of exactness defined.
Should be used solely to ease definition of sorting functions.
- Parameters
-
[in] | topology_id | Topology identifier. |
[in] | degree_of_exactness | Degree of exactness of the rule. Choose NumericNS::UninitiazedIndex() for rules for which it is pointless. |
- Todo
- This should be handled more properly with inheritance, so that rules for which it is pointless do not even have such an attribute, but convention above will do for the time being.
auto sorting_rule = [](const GetQuadratureRule& rule1, const GetQuadratureRule& rule2)
{
return rule1.DegreeOfExactness() < rule2.DegreeOfExactness();
};
std::vector<QuadratureRule> list;
... defines your list ...
std::lower_bound(list.cbegin(), list.cend(), GetQuadratureRule(5), sorting_rule);
◆ QuadratureRule() [4/5]
The copy constructor.
- Parameters
-
[in] | rhs | The object from which the construction occurs. |
◆ QuadratureRule() [5/5]
The move constructor.
- Parameters
-
[in] | rhs | The object from which the construction occurs. |
◆ operator=() [1/2]
The (copy) operator=.
- Parameters
-
[in] | rhs | The object from which the affectation occurs. |
- Returns
- Reference to the object (to enable chained affectation).
◆ operator=() [2/2]
The (move) operator=.
- Parameters
-
[in] | rhs | The object from which the affectation occurs. |
- Returns
- Reference to the object (to enable chained affectation).
◆ AddQuadraturePoint()
void MoReFEM::QuadratureRule::AddQuadraturePoint |
( |
LocalCoords && | local_coords, |
|
|
double | weight ) |
Add a new quadrature point.
The quadrature point is created inside the function from local_coords and weight.
- Parameters
-
[in] | local_coords | Local coordinates of the quadrature point to create. |
[in] | weight | Weight of the quadrature point to create. |
◆ Point()
const QuadraturePoint & MoReFEM::QuadratureRule::Point |
( |
std::size_t | index | ) |
const |
|
noexcept |
Access to one quadrature point.
- Parameters
-
◆ degree_of_exactness_
const std::size_t MoReFEM::QuadratureRule::degree_of_exactness_ |
|
private |
Degree of exactness.
Equal to NumericNS::UninitiazedIndex() for rules for which it is pointless.
- Todo
- This should be handled more properly with inheritance, so that rules for which it is pointless do not even have such an attribute, but convention above will do for the time being.
The documentation for this class was generated from the following file:
- /builds/2mk6rsew/0/MoReFEM/CoreLibrary/MoReFEM/Sources/FiniteElement/QuadratureRules/QuadratureRule.hpp