48 #include "private/matimpl.h"
97 LinSys(
unsigned int lsize,
double *sol_array = NULL);
176 virtual void mat_set_values(
int nrow,
int *rows,
int ncol,
int *cols,PetscScalar *vals) = 0;
195 VecSetValues(
rhs,nrow,rows,vals,(InsertMode)
status);
break;
197 default:
ASSERT(0,
"LinSys's status disallow set values.\n");
215 inline void set_values(
int nrow,
int *rows,
int ncol,
int *cols,PetscScalar *mat_vals, PetscScalar *rhs_vals,
253 int maxIt = 1000, //!< maximum number of iterations
254 int ndecrMax = 30 ); //!< maximum number of iterations with non-decreasing residual
258 * Returns convergence reason (form PETSC)
292 void view(std::ostream output_stream,
int * output_mapping = NULL);
349 LinSys_MATIS(
unsigned int lsize,
int sz,
int *global_row_4_sub_row,
double *sol_array=NULL);
bool own_solution
Indicates if the solution array has been allocated by this class.
Vec solution
PETSc vector constructed with vb array.
unsigned int size() const
get global size
int * subdomain_nz
For counting non-zero enteries of local subdomain.
virtual void view_local_matrix()
int get_subdomain_size()
Get local subdomain size.
virtual void start_insert_assembly()
Vec rhs
PETSc vector constructed with vx array.
void set_symmetric(bool flag=true)
SetValuesMode status
Set value status of the linear system.
virtual void preallocate_values(int nrow, int *rows, int ncol, int *cols)=0
void rhs_set_value(int row, PetscScalar val)
virtual void start_add_assembly()
virtual void rhs_set_values(int nrow, int *rows, double *vals)=0
int subdomain_size
size of subdomain in MATIS matrix
void add_constrain(int row, double value)
Mat local_matrix
local matrix of subdomain (used in LinSys_MATIS)
const Distribution & ds()
void mat_set_value(int row, int col, PetscScalar val)
void rhs_set_values(int nrow, int *rows, PetscScalar *vals)
virtual void start_allocation()
virtual void finish_assembly()=0
bool positive_definite
Flag for positive definite system.
LinSys(const Distribution *rows_ds)
virtual void apply_constrains(double scalar)=0
void set_values(int nrow, int *rows, int ncol, int *cols, PetscScalar *mat_vals, PetscScalar *rhs_vals, std::vector< bool > &constrains_row_mask=std::vector(0), double *constrain_values=NULL)
Distribution vec_ds
Distribution of continuous blocks of system rows among the processors.
double * v_rhs
RHS vector.
ISLocalToGlobalMapping mapping
virtual void start_allocation()
ISLocalToGlobalMapping map_local_to_global
PETSC mapping form local indexes of subdomain to global indexes.
double * get_solution_array()
LinSys_MPIAIJ(unsigned int lsize, double *sol_array=NULL)
const Vec & get_solution()
Vec off_vec
Vectors for counting non-zero entries.
virtual void preallocate_matrix()
bool symmetric
Flag for the symmetric system.
virtual void preallocate_values(int nrow, int *rows, int ncol, int *cols)
LinSysType type
Particular type of the linear system.
Support classes for parallel programing.
virtual void start_allocation()
virtual void preallocate_matrix()=0
Abstract linear system class.
bool is_positive_definite()
void set_positive_definite(bool flag=true)
virtual void preallocate_matrix()
virtual void mat_set_values(int nrow, int *rows, int ncol, int *cols, double *vals)=0
int * subdomain_indices
Remember indices which created mapping.
double * v_solution
Vector of solution.
virtual void preallocate_values(int nrow, int *rows, int ncol, int *cols)
virtual void view_local_matrix()
Mat matrix
Petsc matrix of the problem.
LinSys_MATIS(unsigned int lsize, int sz, int *global_row_4_sub_row, double *sol_array=NULL)
unsigned int lsize(int proc) const
get local size