Scale corrected ir smoother#2036
Conversation
8770bc8 to
9a68ea5
Compare
yhmtsai
left a comment
There was a problem hiding this comment.
miss ir.hpp change, should remove scale-correction-mg-solver binary, need to add test
6861d33 to
6eaf738
Compare
| std::shared_ptr<const LinOp>(dense_b, [](const LinOp*) {}), dense_x, | ||
| residual_ptr); | ||
|
|
||
| // Matches the OpenFOAM GAMGSolver::scale function: |
There was a problem hiding this comment.
do you also have paper reference?
| if (const auto* de = | ||
| dynamic_cast<const DiagonalExtractable<ValueType>*>(local_A)) { |
There was a problem hiding this comment.
this only check whether the diagonal can be extracted.
but it might have some zero in the diagonal
There was a problem hiding this comment.
can this be replaced by Jacobi-IR with 1 iteration?
| // then accumulate into x. | ||
| apply_scale_correction(inner_solution, residual_ptr); | ||
| } | ||
| dense_x->add_scaled(relaxation_factor_, inner_solution); |
There was a problem hiding this comment.
should relaxation_factor be used together with the scale correction?
| * OpenFOAM never scales x directly, so mode 1 has no OpenFOAM | ||
| * equivalent. | ||
| */ | ||
| int GKO_FACTORY_PARAMETER_SCALAR(scale_correction, 0); |
There was a problem hiding this comment.
maybe have a tag?
ir_method::richardson, backward, forward.
Is mode 1 used in some cases?
There was a problem hiding this comment.
+1 for tag.
It could be extended to use the approach in https://dl.acm.org/doi/full/10.1145/3712285.3759807
8f86851 to
5abc13f
Compare
|
Error: The following files need to be formatted: You can find a formatting patch under Artifacts here or run |
This PR adds a scale corrected IR smoother which aims to improve convergence.