Go to the documentation of this file.
18 #ifndef __PASO_SOLVER_H__
19 #define __PASO_SOLVER_H__
28 #define TOLERANCE_FOR_SCALARS (double)(0.)
37 dim_t* iter,
double* tolerance, Performance* pp);
40 double* tolerance, Performance* pp);
43 double* tolerance, Performance* pp);
46 dim_t* iter,
double* tolerance, Performance* pp);
49 dim_t* num_iter,
double* tolerance,
54 double* x,
dim_t* iter,
double* tolerance,
62 #endif // __PASO_SOLVER_H__
void UMFPACK_free(SparseMatrix *A)
frees any UMFPACK related data from the matrix
Definition: UMFPACK.cpp:46
static const real_t EPSILON
Definition: ReactiveSolver.cpp:52
Preconditioner_LocalSmoother * Preconditioner_LocalSmoother_alloc(SparseMatrix_ptr A, bool jacobi, bool verbose)
Definition: Smoother.cpp:75
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:73
escript::JMPI mpi_info
Definition: SystemMatrix.h:332
double lsup(dim_t n, const double *x, escript::JMPI mpiinfo)
returns the global Lsup of x
Definition: PasoUtil.cpp:489
void Preconditioner_Smoother_free(Preconditioner_Smoother *in)
Definition: Smoother.cpp:45
SolverResult Solver_GMRES(SystemMatrix_ptr A, double *r, double *x, dim_t *iter, double *tolerance, dim_t Length_of_recursion, dim_t restart, Performance *pp)
Definition: GMRES.cpp:79
void Performance_startMonitor(Performance *pp, int monitor)
switches on a monitor
Definition: performance.cpp:174
SolverResult Solver_MINRES(SystemMatrix_ptr A, double *R, double *X, dim_t *iter, double *tolerance, Performance *pp)
Definition: MINRES.cpp:70
#define MATRIX_FORMAT_CSC
Definition: Paso.h:61
static int getSolver(int solver, int package, bool symmetry, const escript::JMPI &mpi_info)
returns the solver to be used with given combination
Definition: Options.cpp:230
void solve_free(SystemMatrix *in)
Definition: solve.cpp:140
SolverResult Solver(SystemMatrix_ptr A, double *x, double *b, Options *options, Performance *pp)
calls the iterative solver
Definition: Solver.cpp:57
dim_t getGlobalNumCols() const
Definition: SystemMatrix.h:233
void BlockOps_MViP_3(const double *mat, double *V)
inplace matrix vector product - order 3
Definition: BlockOps.h:210
boost::shared_ptr< SystemMatrix > SystemMatrix_ptr
Definition: SystemMatrix.h:51
#define PASO_GMRES
Definition: Options.h:46
#define MPI_SUM
Definition: EsysMPI.h:50
void MKL_solve(SparseMatrix_ptr A, double *out, double *in, index_t reordering, dim_t numRefinements, bool verbose)
Definition: MKL.cpp:78
SolverResult Solver_TFQMR(SystemMatrix_ptr A, double *B, double *X, dim_t *iter, double *tolerance, Performance *pp)
Definition: TFQMR.cpp:73
void AXPY(dim_t N, double *x, double a, const double *y)
x = x+a*y
Definition: PasoUtil.h:122
#define PASO_PRES20
Definition: Options.h:47
#define PASO_MKL
Definition: Options.h:48
#define MATRIX_FORMAT_OFFSET1
Definition: Paso.h:63
double * diag
Definition: Preconditioner.h:69
Preconditioner_LocalSmoother * localSmoother
Definition: Preconditioner.h:76
SolverResult Solver_GMRES2(Function *F, const double *f0, const double *x0, double *dx, dim_t *iter, double *tolerance, Performance *pp)
Definition: GMRES2.cpp:35
#define MPI_MAX
Definition: EsysMPI.h:52
index_t solver_package
package code controlling the solver pointer
Definition: SystemMatrix.h:359
void Preconditioner_LocalSmoother_Sweep_colored(SparseMatrix_ptr A, Preconditioner_LocalSmoother *gs, double *x)
Definition: Smoother.cpp:349
void Performance_close(Performance *pp, int verbose)
shuts down the monitoring process
Definition: performance.cpp:104
void BlockOps_solveAll(dim_t n_block, dim_t n, double *D, index_t *pivot, double *x)
Definition: BlockOps.h:229
void copy(dim_t N, double *out, const double *in)
out = in
Definition: PasoUtil.h:110
#define PASO_PCG
Definition: Options.h:39
#define PASO_TFQMR
Definition: Options.h:58
SolverResult Solver_BiCGStab(SystemMatrix_ptr A, double *r, double *x, dim_t *iter, double *tolerance, Performance *pp)
Definition: BiCGStab.cpp:89
void Preconditioner_LocalSmoother_free(Preconditioner_LocalSmoother *in)
Definition: Smoother.cpp:53
void Preconditioner_Smoother_solve(SystemMatrix_ptr A, Preconditioner_Smoother *gs, double *x, const double *b, dim_t sweeps, bool x_is_initial)
Definition: Smoother.cpp:111
ASM_ptr getPtr()
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Definition: AbstractSystemMatrix.cpp:52
index_t dim_t
Definition: DataTypes.h:87
dim_t getGlobalNumRows() const
Definition: SystemMatrix.h:225
SolverResult Solver_PCG(SystemMatrix_ptr A, double *r, double *x, dim_t *iter, double *tolerance, Performance *pp)
Definition: PCG.cpp:73
SparseMatrix_ptr mainBlock
main block
Definition: SystemMatrix.h:338
void BlockOps_SMV_2(double *R, const double *mat, const double *V)
performs operation R=R-mat*V (V and R are not overlapping) - 2x2
Definition: BlockOps.h:56
void UMFPACK_solve(SparseMatrix_ptr A, double *out, double *in, dim_t numRefinements, bool verbose)
calls the solver
Definition: UMFPACK.cpp:66
SolverResult
Definition: Paso.h:53
#define PASO_NONLINEAR_GMRES
Definition: Options.h:57
void MKL_free(SparseMatrix *A)
Definition: MKL.cpp:47
dim_t col_block_size
Definition: SystemMatrix.h:327
void Performance_open(Performance *pp, int verbose)
sets up the monitoring process
Definition: performance.cpp:47
#define PASO_PASO
Definition: Options.h:54
void BlockOps_solve_N(dim_t N, double *X, double *mat, index_t *pivot, int *failed)
solves system of linear equations A*X=B
Definition: BlockOps.h:177
#define PASO_UMFPACK
Definition: Options.h:49
#define PASO_BICGSTAB
Definition: Options.h:42
dim_t row_block_size
Definition: SystemMatrix.h:326
boost::shared_ptr< SparseMatrix > SparseMatrix_ptr
Definition: SparseMatrix.h:46
#define MPI_DOUBLE
Definition: EsysMPI.h:45
void Solver_free(SystemMatrix *A)
Definition: Solver.cpp:51
void BlockOps_Cpy_N(dim_t N, double *R, const double *V)
Definition: BlockOps.h:50
PasoException exception class.
Definition: PasoException.h:43
#define PASO_MINRES
Definition: Options.h:59
double gettime()
returns the current ticks for timing
Definition: EsysMPI.h:185
void BlockOps_MV_N(dim_t N, double *R, const double *mat, const double *V)
Definition: BlockOps.h:100
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:82
void Performance_stopMonitor(Performance *pp, int monitor)
switches off a monitor
Definition: performance.cpp:193
Preconditioner_Smoother * Preconditioner_Smoother_alloc(SystemMatrix_ptr A, bool jacobi, bool is_local, bool verbose)
constructs the symmetric Gauss-Seidel preconditioner
Definition: Smoother.cpp:65
double * buffer
Definition: Preconditioner.h:70
SolverResult Preconditioner_Smoother_solve_byTolerance(SystemMatrix_ptr A, Preconditioner_Smoother *gs, double *x, const double *b, double atol, dim_t *sweeps, bool x_is_initial)
Definition: Smoother.cpp:138
void solve(double *out, double *in, Options *options) const
Definition: solve.cpp:51
void Preconditioner_LocalSmoother_Sweep_sequential(SparseMatrix_ptr A, Preconditioner_LocalSmoother *gs, double *x)
inplace Gauss-Seidel sweep in sequential mode
Definition: Smoother.cpp:232
index_t * pivot
Definition: Preconditioner.h:71
void SparseMatrix_MatrixVector_CSR_OFFSET0(const double alpha, const_SparseMatrix_ptr A, const double *in, const double beta, double *out)
Definition: SparseMatrix_MatrixVector.cpp:292
void Preconditioner_LocalSmoother_solve(SparseMatrix_ptr A, Preconditioner_LocalSmoother *gs, double *x, const double *b, dim_t sweeps, bool x_is_initial)
Definition: Smoother.cpp:172
void BlockOps_SMV_3(double *R, const double *mat, const double *V)
performs operation R=R-mat*V (V and R are not overlapping) - 3x3
Definition: BlockOps.h:69
real_t real_t_eps()
Returns the machine epsilon for the real_t type.
Definition: DataTypes.h:120
SolverResult Solver_NewtonGMRES(Function *F, double *x, Options *options, Performance *pp)
Definition: NewtonGMRES.cpp:54
SystemMatrix()
default constructor - throws exception.
Definition: SystemMatrix.cpp:52
void BlockOps_MViP_2(const double *mat, double *V)
inplace matrix vector product - order 2
Definition: BlockOps.h:197
Definition: BiCGStab.cpp:25
#define PASO_SMOOTHER
Definition: Options.h:72
Definition: Preconditioner.h:66
void Preconditioner_LocalSmoother_Sweep(SparseMatrix_ptr A, Preconditioner_LocalSmoother *gs, double *x)
Definition: Smoother.cpp:212
void BlockOps_SMV_N(dim_t N, double *R, const double *mat, const double *V)
performs operation R=R-mat*V (V and R are not overlapping) - NxN
Definition: BlockOps.h:91