1#ifndef ELEMENT_MANAGER_H
2#define ELEMENT_MANAGER_H
22 std::vector<std::unique_ptr<GenericElement<T>>> m_interior_cells{};
23 std::vector<std::unique_ptr<GenericElement<T>>> m_boundary_cells{};
67 throw std::runtime_error(
"Grid initialization failed, no matrix size could be retrived!\n");
73 m_capacitance_matrix->buildAtRuntime(size, size);
74 m_stiffness_matrix->buildAtRuntime(size, size);
75 m_forcing_vector.resize(size);
91 cell_ptr->getReferenceToElements(*m_capacitance_matrix, *m_stiffness_matrix,
97 boundary_ptr->getReferenceToElements(*m_capacitance_matrix, *m_stiffness_matrix,
100 m_boundary_cells.push_back(std::move(
cell_ptr));
106 m_interior_cells.push_back(std::move(
cell_ptr));
121 sortCells(all_cells);
131 m_stiffness_matrix->zeroMatrix();
132 m_capacitance_matrix->zeroMatrix();
133 m_forcing_vector *= 0;
Error class to throw when a module chain has circular or missing dependencies. Inherits from std::exc...
Definition ChainManager.h:28
Class that manages the building of the global capacitance and stiffness matrix and forcing vector fro...
Definition ElementManager.h:20
ElementManager(int size, std::shared_ptr< MatrixFactory< T > > matrix_factory)
Constructor for cases, where the cell list will be set later.
Definition ElementManager.h:46
std::shared_ptr< GenericMatrix< T > > m_capacitance_matrix
Definition ElementManager.h:30
std::valarray< T > m_forcing_vector
Definition ElementManager.h:32
void setCells(std::vector< std::unique_ptr< GenericElement< T > > > &all_cells)
Does the cell sorting for the cases where the ElementManager has been default constructed.
Definition ElementManager.h:119
std::shared_ptr< GenericMatrix< T > > m_stiffness_matrix
Definition ElementManager.h:31
void assembleFemMatrices()
Calls all the element matrix creation function to assemble the global FEM matrices and vectors.
Definition ElementManager.h:141