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 | setTergetAMGAccuracy (double t_a) |
| Set the target accuracy to score the AMG solver.
|
|
void | setMaxSweep (int max_sw) |
| Set the target accuracy to score the AMG solver.
|
|
void | try_solve (SparseMatrix< double, int, PETSC_BASE > &A, const Vector< double, PETSC_BASE > &b) |
| Try to use AMG pre-conditioner and check how they they perform.
|
|
|
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
|
|
void | test_coarsener (SparseMatrix< double, int, PETSC_BASE > &A, const Vector< double, PETSC_BASE > &b) |
| test the corasener for this problem
|
|
double | score_solver (double t_solve, double t_m) |
| Score the solver.
|
|
void | write_report_coars (GoogleChart &cg) |
| Write the report for coarsening.
|
|
void | write_report_cycle (GoogleChart &cg, openfpm::vector< std::string > &coars) |
| Write the report for coarsening.
|
|
void | write_report_cycle_asym (GoogleChart &cg, openfpm::vector< std::string > &coars) |
| Write the report for coarsening.
|
|
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
|
|
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
|
|
void | write_report (openfpm::vector< std::string > &coars) |
|
void | best_coarsener (openfpm::vector< std::string > &coars) |
| take the most accurate and the fastest AMG
|
|
void | best_score (openfpm::vector< AMG_time_err_coars > &perf, openfpm::vector< size_t > &sw_optimal, size_t nm) |
| Return the best scoring solver.
|
|
◆ benchmark()
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.
◆ best_coarsener()
void petsc_AMG_report::best_coarsener |
( |
openfpm::vector< std::string > & |
coars | ) |
|
|
inlineprivate |
◆ best_score()
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.
◆ score_solver()
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.
◆ setMaxSweep()
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.
◆ setTergetAMGAccuracy()
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.
◆ test_coarsener()
void petsc_AMG_report::test_coarsener |
( |
SparseMatrix< double, int, PETSC_BASE > & |
A, |
|
|
const Vector< double, PETSC_BASE > & |
b |
|
) |
| |
|
inlineprivate |
◆ test_cycle_asym()
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.
◆ test_cycle_type()
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.
◆ try_solve()
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.
◆ write_report()
void petsc_AMG_report::write_report |
( |
openfpm::vector< std::string > & |
coars | ) |
|
|
inlineprivate |
◆ write_report_coars()
void petsc_AMG_report::write_report_coars |
( |
GoogleChart & |
cg | ) |
|
|
inlineprivate |
◆ write_report_cycle()
◆ write_report_cycle_asym()
◆ asym_tests
◆ method
◆ num_sweep_test
size_t petsc_AMG_report::num_sweep_test = 10 |
|
private |
◆ perf_amg_coars
◆ perf_amg_sweep_asym
◆ perf_amg_sweep_sym
◆ target_accuracy
double petsc_AMG_report::target_accuracy = 1 |
|
private |
◆ v_cycle_tested_asym
openfpm::vector<std::pair<size_t,size_t> > petsc_AMG_report::v_cycle_tested_asym |
|
private |
◆ v_cycle_tested_sym
The documentation for this class was generated from the following file: