Flow123d
release_3.0.0-968-gc87a28e79
|
Go to the documentation of this file.
2 #ifndef LOCAL_SYSTEM_HH_
3 #define LOCAL_SYSTEM_HH_
51 LocalSystem(
unsigned int nrows,
unsigned int ncols);
57 void reset(arma::uword nrows, arma::uword ncols);
74 void set_solution(
unsigned int loc_dof,
double solution,
double diag=0.0);
107 void add_value(
unsigned int row,
unsigned int col,
108 double mat_val,
double rhs_val);
117 void add_value(
unsigned int row,
unsigned int col,
126 void add_value(
unsigned int row,
double rhs_val);
142 void set_size(
unsigned int nrows,
unsigned int ncols);
164 static constexpr
double almost_zero = std::numeric_limits<double>::min();
185 #endif // LOCAL_SYSTEM_HH_
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)
arma::mat sparsity
sparsity pattern
static constexpr double almost_zero
arma::mat matrix
local system matrix
void set_rhs(arma::vec rhs)
arma::vec rhs
local system RHS
void eliminate_solution()
void reset()
Resets the matrix, RHS, dofs to zero and clears solution settings.
const arma::mat & get_matrix()
const arma::vec & get_rhs()
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)