4#ifndef HUMMINGBIRD_PROBLEM_PROBLEM_BASE_H_
5#define HUMMINGBIRD_PROBLEM_PROBLEM_BASE_H_
83 const std::vector<GlobalMatrixData>& global_matrix_data,
84 const size_t ordinate_index);
96 const std::vector<GlobalForcingData>& global_forcing_data,
97 const size_t ordinate_index);
105 void Solve(
const size_t ordinate_index);
139 const Ordinate& ordinate,
const size_t ordinate_index,
153 const BCBank& bc_bank,
const size_t ordinate_index);
221 const size_t ordinate_index) = 0;
Bank holding the boundary conditions defined in the input file.
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.
virtual void Apply1DBCs(const Mesh &mesh, const Ordinate &Ordinate, const BCBank &bc_bank, const size_t ordinate_index)=0
Apply boundary conditions to a 1D problem.
std::vector< arma::SpMat< double > > global_system_matrices_
Global system matrices in order of ordinates in angular quadrature set.
std::vector< arma::Col< double > > solution_vectors_
Column vector of the angular flux at the nodes in order of ordinates in angular quadrature set.
std::vector< arma::Col< double > > global_forcing_vectors_
Global forcing vectors in order of ordinates in angular quadrature set.
const std::vector< arma::Col< double > > & solution_vectors() const
Get the solution vectors.
void Solve(const size_t ordinate_index)
Solve the linear system using Armadillo's sparse matrix solver. Stores the results in the solution_ve...
virtual std::vector< GlobalForcingData > AssembleGlobalForcingData(const GaussLobattoLegendre &gll_quad, Mesh &mesh, const MaterialBank &material_bank, const SourceBank &source_bank, const Ordinate &ordinate, const size_t ordinate_index, const QuadratureBase< Ordinate > &angular_quad_set)=0
Assemble the vector of GlobalForcingData structs that will be using in AssembleGlobalForcing to creat...
ProblemBase(const size_t n_dofs, const size_t n_ordinates)
Construct a new Problem Base object.
void CheckGlobalMatrixData(const std::vector< GlobalMatrixData > &gmd)
Validate a vector of GlobalMatrixData before it is used to assemble the global system matrix....
virtual std::vector< GlobalMatrixData > AssembleGlobalMatrixData(const Mesh &mesh, const GaussLobattoLegendre &gll_quad, const MaterialBank &material_bank, const Ordinate &ordinate)=0
Assemble the vector of GlobalMatrixData structs that will be used in AssembleGlobalSystem to create t...
virtual ~ProblemBase()=default
Destroy the Problem Base object.
const size_t n_dofs_
Number of degrees of freedom in simulation.
void ApplyBCs(const Mesh &mesh, const Ordinate &ordinate, const BCBank &bc_bank, const size_t ordinate_index)
Apply boundary conditions by adding in values needed at boundary nodes. Internally,...
size_t n_dofs() const
Get the number of degrees of freedom.
void CheckGlobalForcingData(const std::vector< GlobalForcingData > &gfd)
Validate a vector of GlobalForcingData before it is used to assemble the global forcing vector....
void AssembleGlobalSystem(const std::vector< GlobalMatrixData > &global_matrix_data, const size_t ordinate_index)
Assemble the global element system. That is, form the matrix in . This only should be called once pe...
void AssembleGlobalForcing(const std::vector< GlobalForcingData > &global_forcing_data, const size_t ordinate_index)
Assemble the global forcing vector for a given ordinate index. The global vector is sized from the n_...
Base class for defining a quadrature set.
Bank holding the volumetric sources defined in the input file.
Convenience struct for hold the contribution for an entry in a single element to the global forcing v...
size_t row_id
Global forcing vector row ID.
double value
Value to be placed in the global vector.
Convenience struct for holding the contribution for an entry in a single element to the global matrix...
double value
Value to be placed in the global matrix. This could be an entry from a local stiffness or mass matrix...
size_t row_id
Global matrix row ID.
size_t col_id
Global matrix column ID.