1#ifndef GENERIC_BOUNDARY_CONDITION_H
2#define GENERIC_BOUNDARY_CONDITION_H
76 for (
int i{0};
i < m_boundary_points.
size();
i++)
80 for (
int j{0};
j < m_connected_points[
i].
size();
j++)
87 this->m_capacitance_matrix_elements.emplace_back(
temp_cap_mat);
89 this->m_forcing_vector_elements.emplace_back(
forcing_vector[m_boundary_points[
i]]);
100 for (
int i{0};
i < m_boundary_points.
size();
i++)
102 for (
int j{0};
j < m_connected_points[
i].
size();
j++)
105 m_connected_points[
i][
j]);
107 m_connected_points[
i][
j]);
Concrete implementation of a matrix class representing a Compressed Sparse Rows (CSR) matrix....
Definition CsrMatrix.h:37
void registerElement(T value, int rows, int cols) override
Registers the element and it's initial value within a COO style vector for dynamic creation.
Definition CsrMatrix.h:128
CsrSparseMatrix()
Constructor for an empty CsrSparseMatrix object. Leaves all storage arrays empty but sets the flag to...
Definition CsrMatrix.h:94
const MatrixType getMatrixType() override
Definition CsrMatrix.h:71
Boundary condition abstract base class for the finite element method. All boundary condition implemen...
Definition GenericBoundaryCondition.h:18
virtual void getReferenceToElements(GenericMatrix< T > &capacitance_matrix, GenericMatrix< T > &stiffness_matrix, std::valarray< T > &forcing_vector)
Sets up a referrence_wrapper vector to the elements within the matrix object. This adds a bit of pre-...
Definition GenericBoundaryCondition.h:72
std::vector< std::vector< std::reference_wrapper< T > > > m_stiffness_matrix_elements
Definition GenericBoundaryCondition.h:24
virtual ~GenericBoundaryCondition()=default
std::vector< std::reference_wrapper< T > > m_forcing_vector_elements
Definition GenericBoundaryCondition.h:25
GenericBoundaryCondition(SimulationClassBase< T > *sim, std::vector< int > boundary_points, std::vector< std::vector< int > > connected_points, int facet_nr, std::string face_prefix)
Constructor for a GenericElement object. Sets all parameters that are known at creation.
Definition GenericBoundaryCondition.h:54
int m_facet_number
Definition GenericBoundaryCondition.h:26
std::vector< std::vector< std::reference_wrapper< T > > > m_capacitance_matrix_elements
Definition GenericBoundaryCondition.h:23
std::vector< int > m_boundary_points
Definition GenericBoundaryCondition.h:21
std::vector< std::vector< int > > m_connected_points
Definition GenericBoundaryCondition.h:22
std::string m_face_indicator_prefix
Definition GenericBoundaryCondition.h:27
SimulationClassBase< T > * m_sim
Definition GenericBoundaryCondition.h:20
void registerElementsCsr(GenericMatrix< T > &capacitance_matrix, GenericMatrix< T > &stiffness_matrix)
Definition GenericBoundaryCondition.h:94
virtual void writeBoundaryCondition()=0
std::pair< int, int > size() const
Function that returns the size of the matrix as a pair in (rows, columns) format.
Definition GenericMatrix.h:120