31 matrix.set_size(nrows, ncols);
55 matrix.set_size(nrows, ncols);
68 set_size(rdofs.n_rows, cdofs.n_rows);
119 unsigned int ic, ir, row, col;
125 tmp_mat.col( col ).zeros();
131 tmp_rhs( row ) = 0.0;
132 tmp_mat.row( row ).zeros();
140 double new_diagonal =
matrix(row, col);
144 else if(new_diagonal == 0.0)
154 tmp_mat(row,col) = new_diagonal;
163 n_elim_cols=n_elim_rows=0;
182 matrix(row, col) += mat_val;
192 matrix(row, col) += mat_val;
220 for(
unsigned int i=0; i < sp.n_rows; i++)
221 for(
unsigned int j=0; j < sp.n_cols; j++)
void set_solution_col(uint loc_col, double solution)
#define ASSERT_EQ_DBG(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
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::Col< LongIdx > DofVec
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)
Vector classes to support both Iterator, index and Id access and creating co-located vectors...
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()