Skip to content

Commit

Permalink
Merge branch 'develop' into jmm/global-boundaries-2
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan authored Sep 23, 2024
2 parents bc6168b + e0c85cc commit aaefc37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [[PR 1172]](https://github.com/parthenon-hpc-lab/parthenon/pull/1172) Make parthenon manager robust against external MPI init and finalize calls

### Fixed (not changing behavior/API/variables/...)
- [[PR 1178]](https://github.com/parthenon-hpc-lab/parthenon/pull/1178) Fix issue with mesh pointer when using relative residual tolerance in BiCGSTAB solver.
- [[PR1173]](https://github.com/parthenon-hpc-lab/parthenon/pull/1173) Make debugging easier by making parthenon throw an error if ParameterInput is different on multiple MPI ranks.

### Infrastructure (changes irrelevant to downstream codes)
Expand Down
13 changes: 6 additions & 7 deletions src/solvers/bicgstab_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,18 @@ class BiCGSTABSolver {
this);
tl.AddTask(
TaskQualifier::once_per_region, initialize, "print to screen",
[&](BiCGSTABSolver *solver, std::shared_ptr<Real> res_tol,
bool relative_residual) {
[&](BiCGSTABSolver *solver, std::shared_ptr<Real> res_tol, bool relative_residual,
Mesh *pm) {
if (Globals::my_rank == 0 && params_.print_per_step) {
Real tol =
relative_residual
? *res_tol * std::sqrt(solver->rhs2.val / pmesh->GetTotalCells())
: *res_tol;
Real tol = relative_residual
? *res_tol * std::sqrt(solver->rhs2.val / pm->GetTotalCells())
: *res_tol;
printf("# [0] v-cycle\n# [1] rms-residual (tol = %e) \n# [2] rms-error\n",
tol);
}
return TaskStatus::complete;
},
this, params_.residual_tolerance, params_.relative_residual);
this, params_.residual_tolerance, params_.relative_residual, pmesh);

// BEGIN ITERATIVE TASKS
auto [itl, solver_id] = tl.AddSublist(initialize, {1, params_.max_iters});
Expand Down

0 comments on commit aaefc37

Please sign in to comment.