Class to test AMG solvers.
More...
Class to test AMG solvers.
Definition at line 42 of file petsc_solver_AMG_report.hpp.
#include <petsc_solver_AMG_report.hpp>
|
void | benchmark (SparseMatrix< double, int, PETSC_BASE > &A, const Vector< double, PETSC_BASE > &b, petsc_solver< double > &solver, openfpm::vector< AMG_time_err_coars > &perf_amg) |
| benchmark the selected setting for the preconditioner More...
|
|
void | test_coarsener (SparseMatrix< double, int, PETSC_BASE > &A, const Vector< double, PETSC_BASE > &b) |
| test the corasener for this problem More...
|
|
double | score_solver (double t_solve, double t_m) |
| Score the solver. More...
|
|
void | write_report_coars (GoogleChart &cg) |
| Write the report for coarsening. More...
|
|
void | write_report_cycle (GoogleChart &cg, openfpm::vector< std::string > &coars) |
| Write the report for coarsening. More...
|
|
void | write_report_cycle_asym (GoogleChart &cg, openfpm::vector< std::string > &coars) |
| Write the report for coarsening. More...
|
|
void | test_cycle_type (SparseMatrix< double, int, PETSC_BASE > &A, const Vector< double, PETSC_BASE > &b, openfpm::vector< std::string > &coarsener_to_test) |
| test the corasener for this problem More...
|
|
void | test_cycle_asym (SparseMatrix< double, int, PETSC_BASE > &A, const Vector< double, PETSC_BASE > &b, openfpm::vector< size_t > &ids_ts, openfpm::vector< std::string > &coarsener_to_test) |
| test best asymmetric combination of sweeps More...
|
|
void | write_report (openfpm::vector< std::string > &coars) |
|
void | best_coarsener (openfpm::vector< std::string > &coars) |
| take the most accurate and the fastest AMG More...
|
|
void | best_score (openfpm::vector< AMG_time_err_coars > &perf, openfpm::vector< size_t > &sw_optimal, size_t nm) |
| Return the best scoring solver. More...
|
|
benchmark the selected setting for the preconditioner
- Parameters
-
A | sparse matrix |
b | right-hand-side |
solver | to use for benchmarking |
perf_amg | performance of the AMG |
Definition at line 79 of file petsc_solver_AMG_report.hpp.
void petsc_AMG_report::best_coarsener |
( |
openfpm::vector< std::string > & |
coars | ) |
|
|
inlineprivate |
Return the best scoring solver.
- Parameters
-
perf | where to search for the best score |
optimal | number of sweeps for each tested method |
mn | number of method tested |
Definition at line 514 of file petsc_solver_AMG_report.hpp.
double petsc_AMG_report::score_solver |
( |
double |
t_solve, |
|
|
double |
t_m |
|
) |
| |
|
inlineprivate |
Score the solver.
- Parameters
-
t_solve | time to solve |
t_m | target accuracy the solver should reach |
Definition at line 197 of file petsc_solver_AMG_report.hpp.
void petsc_AMG_report::setMaxSweep |
( |
int |
max_sw | ) |
|
|
inline |
Set the target accuracy to score the AMG solver.
Set the maximum number of sweep for testing
- Parameters
-
max_sw | max number of sweep |
Definition at line 562 of file petsc_solver_AMG_report.hpp.
void petsc_AMG_report::setTergetAMGAccuracy |
( |
double |
t_a | ) |
|
|
inline |
Set the target accuracy to score the AMG solver.
The score is calculated as \( \frac{1}{t_s} max(1,t_a/t_m) \)
where \( t_s \) is the time to solve the system \( t_a \) is the target accuracy \( t_m \) is the time of the method
- Parameters
-
Definition at line 550 of file petsc_solver_AMG_report.hpp.
void petsc_AMG_report::test_coarsener |
( |
SparseMatrix< double, int, PETSC_BASE > & |
A, |
|
|
const Vector< double, PETSC_BASE > & |
b |
|
) |
| |
|
inlineprivate |
test best asymmetric combination of sweeps
- Parameters
-
A | matrix to invert |
b | right-hand-side |
ids_ts | set of sweep configuration to test |
coarsener_to_test | coarsener to test |
Definition at line 404 of file petsc_solver_AMG_report.hpp.
void petsc_AMG_report::test_cycle_type |
( |
SparseMatrix< double, int, PETSC_BASE > & |
A, |
|
|
const Vector< double, PETSC_BASE > & |
b, |
|
|
openfpm::vector< std::string > & |
coarsener_to_test |
|
) |
| |
|
inlineprivate |
test the corasener for this problem
- Parameters
-
A | matrix to invert |
b | right-hand-side |
coarsener_to_test | coarsener to test |
Definition at line 350 of file petsc_solver_AMG_report.hpp.
void petsc_AMG_report::try_solve |
( |
SparseMatrix< double, int, PETSC_BASE > & |
A, |
|
|
const Vector< double, PETSC_BASE > & |
b |
|
) |
| |
|
inline |
Try to use AMG pre-conditioner and check how they they perform.
- Parameters
-
A | Sparse matrix |
b | right-hand side |
Definition at line 575 of file petsc_solver_AMG_report.hpp.
void petsc_AMG_report::write_report |
( |
openfpm::vector< std::string > & |
coars | ) |
|
|
inlineprivate |
void petsc_AMG_report::write_report_coars |
( |
GoogleChart & |
cg | ) |
|
|
inlineprivate |
The documentation for this class was generated from the following file: