Defines a subset of the domain (an "element"). More...
#include <element.h>
Public Member Functions | |
| Element (const int material_id, const int source_id) | |
| Construct a new Element object. | |
| virtual | ~Element ()=default |
| Destroy the Element object. Virtual because Element is used polymorphically through std::unique_ptr<Element> (see Mesh::elements_). | |
| virtual std::vector< Node > | CreateInteriorNodes (const std::vector< Node > &existing_nodes, const GaussLobattoLegendre &gll_quadrature)=0 |
| Create nodes by mapping the Gauss-Lobatto-Legendre quadrature set from the reference to the real domain. | |
| std::vector< size_t > | node_ids () const |
| Get node IDs. | |
| int | material_id () const |
| Get Material ID. | |
| int | source_id () const |
| Get Source ID. | |
| void | SetMaterialID (const int material_id) |
| Set the Material ID, e.g. once it has been resolved from a raw gmsh tag to a MaterialBank-assigned ID (see Mesh::ResolveIDs). | |
| void | SetSourceID (const int source_id) |
| Set the Source ID, e.g. once it has been resolved from a raw gmsh tag to a SourceBank-assigned ID (see Mesh::ResolveIDs). | |
| void | SetNewNodeID (const size_t prev_id, const size_t new_id) |
| Set the new Node ID. | |
| void | SetNodeIDs (std::vector< size_t > node_ids) |
| Replace all node IDs at once, e.g. when renumbering. Unlike SetNewNodeID, this does not search by value, so it is safe to use when remapped IDs could otherwise collide with not-yet-remapped IDs. | |
| void | SetNodeSourceFluxes (Mesh &mesh, const MaterialBank &material_bank, const SourceBank &source_bank, const QuadratureBase< Ordinate > &angular_quadrature) |
| Compute and set the source flux values on this element's nodes using this element's material and source IDs. | |
| virtual arma::Col< double > | LocalForcingVector (const GaussLobattoLegendre &gll_quad, const Mesh &mesh, const MaterialBank &material_bank, const Ordinate &ordinate, const size_t ordinate_index)=0 |
| Construct the local forcing vector for this element at a given ordinate. | |
| virtual arma::Mat< double > | LocalStiffnessMatrix (const GaussLobattoLegendre &gll_quad, const MaterialBank &material_bank, const Ordinate &ordinate)=0 |
| Construct the local stiffness matrix for this element at a given ordinate. | |
| virtual arma::SpMat< double > | LocalMassMatrix (const GaussLobattoLegendre &gll_quad, const MaterialBank &material_bank)=0 |
| Construct the local mass matrix for this element. | |
| virtual unsigned int | dimension () const =0 |
| Get the spatial dimension of this element type (e.g. 1 for a line segment). | |
Protected Attributes | |
| int | material_id_ = -1 |
| Material ID to access Material Bank. Auto initialized to -1. Value must be set to a positive value (including 0) to map into the MaterialBank. | |
| int | source_id_ = 0 |
| Source ID to access Source Bank. ID of 0 is always NONE, meaning the element has no external source. | |
| std::vector< size_t > | node_ids_ |
| IDs of nodes defining the element. | |
| hummingbird::Element::Element | ( | const int | material_id, |
| const int | source_id ) |
Construct a new Element object.
| material_id | Material ID |
| source_id | Source ID |
Definition at line 9 of file element.cc.
|
virtualdefault |
Destroy the Element object. Virtual because Element is used polymorphically through std::unique_ptr<Element> (see Mesh::elements_).
|
pure virtual |
Create nodes by mapping the Gauss-Lobatto-Legendre quadrature set from the reference to the real domain.
| existing_nodes | Vector of nodes that already exist in the mesh. Starting ID for new nodes will be equal to the number of nodes that already exist to ensure no duplicates |
| gll_quadrature | GaussLobattoLegendre quadrature set |
Implemented in hummingbird::Segment.
|
pure virtual |
Get the spatial dimension of this element type (e.g. 1 for a line segment).
Implemented in hummingbird::Segment.
|
pure virtual |
Construct the local forcing vector for this element at a given ordinate.
| gll_quad | GaussLobattoLegendre quadrature set |
| mesh | Mesh |
| material_bank | Material bank |
| ordinate | Ordinate (direction) |
| ordinate_index | Index of the ordinate in the angular quadrature |
Implemented in hummingbird::Segment.
|
pure virtual |
Construct the local mass matrix for this element.
| gll_quad | GaussLobattoLegendre quadrature set |
| material_bank | Material bank |
Implemented in hummingbird::Segment.
|
pure virtual |
Construct the local stiffness matrix for this element at a given ordinate.
| gll_quad | GaussLobattoLegendre quadrature set |
| material_bank | Material bank |
| ordinate | Ordinate (direction) |
Implemented in hummingbird::Segment.
|
inline |
|
inline |
|
inline |
Set the Material ID, e.g. once it has been resolved from a raw gmsh tag to a MaterialBank-assigned ID (see Mesh::ResolveIDs).
| material_id | Material ID |
| void hummingbird::Element::SetNewNodeID | ( | const size_t | prev_id, |
| const size_t | new_id ) |
Set the new Node ID.
| prev_id | Previous ID (currently stored in object) |
| new_id | New ID |
Definition at line 12 of file element.cc.
|
inline |
Replace all node IDs at once, e.g. when renumbering. Unlike SetNewNodeID, this does not search by value, so it is safe to use when remapped IDs could otherwise collide with not-yet-remapped IDs.
| node_ids | New node IDs, in the same order as the existing ones |
| void hummingbird::Element::SetNodeSourceFluxes | ( | Mesh & | mesh, |
| const MaterialBank & | material_bank, | ||
| const SourceBank & | source_bank, | ||
| const QuadratureBase< Ordinate > & | angular_quadrature ) |
Compute and set the source flux values on this element's nodes using this element's material and source IDs.
| mesh | Mesh |
| material_bank | Material bank |
| source_bank | Source bank |
| angular_quadrature | Angular quadrature set |
Definition at line 23 of file element.cc.
|
inline |
Set the Source ID, e.g. once it has been resolved from a raw gmsh tag to a SourceBank-assigned ID (see Mesh::ResolveIDs).
| source_id | Source ID |
|
inline |
|
protected |
Material ID to access Material Bank. Auto initialized to -1. Value must be set to a positive value (including 0) to map into the MaterialBank.
|
protected |
|
protected |