Flow123d
release_3.0.0-968-gc87a28e79
|
Go to the documentation of this file.
17 sparsity(nrows,ncols),
31 matrix.set_size(nrows, ncols);
55 matrix.set_size(nrows, ncols);
68 set_size(rdofs.n_rows, cdofs.n_rows);
116 arma::mat tmp_mat =
matrix;
117 arma::vec tmp_rhs =
rhs;
119 unsigned int ic, ir, row, col, j;
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;
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++)
arma::Col< LongIdx > DofVec
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.
void add_value(unsigned int row, unsigned int col, double mat_val, double rhs_val)
Adds a single entry into the local system.
void set_matrix(arma::mat matrix)
#define ASSERT_EQ_DBG(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
arma::mat sparsity
sparsity pattern
static constexpr double almost_zero
arma::mat matrix
local system matrix
void set_rhs(arma::vec rhs)
Vector classes to support both Iterator, index and Id access and creating co-located vectors.
arma::vec rhs
local system RHS
void eliminate_solution()
void reset()
Resets the matrix, RHS, dofs to zero and clears solution settings.
LocalSystem()
Default constructor.
void set_sparsity(const arma::umat &sp)
Sets the sparsity pattern for the local system.
void set_solution_col(uint loc_col, double solution)
void set_solution_row(uint loc_row, double solution, double diag=0.0)
void set_size(unsigned int nrows, unsigned int ncols)