4#ifndef HUMMINGBIRD_MESH_ELEMENT_H_
5#define HUMMINGBIRD_MESH_ELEMENT_H_
53 const std::vector<Node>& existing_nodes,
99 void SetNewNodeID(
const size_t prev_id,
const size_t new_id);
139 const size_t ordinate_index) = 0;
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 sour...
int material_id() const
Get Material ID.
std::vector< size_t > node_ids_
IDs of nodes defining the element.
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 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.
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 val...
int material_id_
Material ID to access Material Bank. Auto initialized to -1. Value must be set to a positive value (i...
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 doma...
virtual ~Element()=default
Destroy the Element object. Virtual because Element is used polymorphically through std::unique_ptr<E...
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 (se...
std::vector< size_t > node_ids() const
Get node IDs.
Element(const int material_id, const int source_id)
Construct a new Element object.
int source_id() const
Get Source ID.
int source_id_
Source ID to access Source Bank. ID of 0 is always NONE, meaning the element has no external source.
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...
void SetNewNodeID(const size_t prev_id, const size_t new_id)
Set the new Node ID.
virtual unsigned int dimension() const =0
Get the spatial dimension of this element type (e.g. 1 for a line segment).
Class defining a 1D Gauss-Legendre-Lobatto quadrature set on [-1,1]. The quadrature set approximates ...
Bank holding the materials defined in the input file.
Defines a solid angle, or ordinate, in spherical geometry.
Base class for defining a quadrature set.
Bank holding the volumetric sources defined in the input file.