2 #ifndef LOCAL_SYSTEM_HH_ 3 #define LOCAL_SYSTEM_HH_ 50 LocalSystem(
unsigned int nrows,
unsigned int ncols);
56 void reset(
unsigned int nrows,
unsigned int ncols);
62 void reset(
const DofVec &row_dofs,
const DofVec &col_dofs);
73 void set_solution(
unsigned int loc_dof,
double solution,
double diag=0.0);
106 void add_value(
unsigned int row,
unsigned int col,
107 double mat_val,
double rhs_val);
116 void add_value(
unsigned int row,
unsigned int col,
125 void add_value(
unsigned int row,
double rhs_val);
141 void set_size(
unsigned int nrows,
unsigned int ncols);
163 static constexpr
double almost_zero = std::numeric_limits<double>::min();
184 #endif // LOCAL_SYSTEM_HH_ void set_solution_col(uint loc_col, double solution)
const arma::mat & get_matrix()
const arma::vec & get_rhs()
void set_matrix(arma::mat matrix)
void set_sparsity(const arma::umat &sp)
Sets the sparsity pattern for the local system.
static constexpr double almost_zero
void set_size(unsigned int nrows, unsigned int ncols)
void set_solution(unsigned int loc_dof, double solution, double diag=0.0)
Set the position and value of known solution. E.g. Dirichlet boundary condition.
arma::vec rhs
local system RHS
arma::mat sparsity
sparsity pattern
void reset()
Resets the matrix, RHS, dofs to zero and clears solution settings.
LocalSystem()
Default constructor.
arma::mat matrix
local system matrix
void set_solution_row(uint loc_row, double solution, double diag=0.0)
void set_rhs(arma::vec rhs)
void add_value(unsigned int row, unsigned int col, double mat_val, double rhs_val)
Adds a single entry into the local system.
void eliminate_solution()