456 hpcg 2 amg v cycle#42
Conversation
anyzelman
left a comment
There was a problem hiding this comment.
Only code style issues in amg.hpp
Hope to review the remainder tomorrow. Likely merge into develop after releasing v0.6.
read v-cycle hierarchy matrices A_ ,R_ (matrix market format ) and vectors A_diag and use them instead of them (instead of r-b-Gauss-Siedel) as smoother (A_diag) and coarsener (R_ and P_=R_^T). Continue with CG-solver where v-cycle is the preconditioning step.
hpcg-benchmark leftovers cleanup
residual and error print
restore hpcg from develop
81e8c03 to
d1f2fe3
Compare
|
@anyzelman should I rebase again and finalize this PR? |
| namespace algorithms { | ||
|
|
||
| /** | ||
| * Algebraic Multi-grid algorithm relying on level_ matrices from AMGCL. |
There was a problem hiding this comment.
Typo? (level_ matrices -> level-matrices?)
| * | ||
| * Finds the solution x of an \f$ A x = b \f$ algebraic system by running | ||
| * the AMG algorithm. AMG implementation (as the standard one) couples a | ||
| * standard CG algorithm with a V-cycle multi-grid solver to initially |
| * \p data; otherwise, the refinement is not performed and only the CG | ||
| * algorithm is run. | ||
| * | ||
| * This implementation assumes that the vectors and matrices inside \p data |
There was a problem hiding this comment.
\p should be \a (\a refers to arguments)
| /** | ||
| * Algebraic Multi-grid algorithm relying on level_ matrices from AMGCL. | ||
| * | ||
| * Finds the solution x of an \f$ A x = b \f$ algebraic system by running |
There was a problem hiding this comment.
The first x should be \f$ x \f$ ?
| * - amg_data#b with the right-hand side vector \f$ b \f$ | ||
| * - amg_data#A_diagonal with the diagonal values of the matrix | ||
| * - amg_data#coarser_level with the information for | ||
| * the coarser multi-grid run (if any) |
There was a problem hiding this comment.
Use spaces to align the' with with' in the line above it
| return 0; | ||
| } | ||
|
|
||
| static void parse_arguments( simulation_input &sim_in, size_t &outer_iterations, |
| } | ||
|
|
||
| static void parse_arguments( simulation_input &sim_in, size_t &outer_iterations, | ||
| double &max_residual_norm, int argc, char **argv ) { |
| parser.parse( argc, argv ); | ||
|
|
||
| std::string matAfile = sim_in.matAfile_c_str; | ||
| if ( ! matAfile.empty() ) { |
| } | ||
| else { |
| std::cout << "Setting number of iterations to 1" << std::endl; | ||
| sim_in.max_iterations = 1; | ||
| } | ||
| } |
|
Hi Denis, thanks a lot, looking great! I have made some additional requests for changes-- all minor / code style related. If some of those requested things are as a surprise, please add it to the issue about coding style so that we may clarify that in a code style guide. As an additional request following the chat earlier, this MR requires AMGCL as a dependence correct? Can we make its compilation optional through CMake parameters (which may already be the case), and then add switches to |
|
Just to sync the status-- is this one blocking on a refactoring with HPCG and CG? |
Rather the opposite, this one will be added on top of the refactored HPCG (and CG). |
not urgent, waiting for changes then, and happy hols! |
|
Waiting for #167 to merge first (right? @alberto-scolari , @djelovina ) If confirmed, this also then will target the v0.8 release. |
No description provided.