Skip to content

Commit 0e4b205

Browse files
authored
AmrMesh: Recompute roundoff domain for fine Geometry objects (#5248)
The roundoff domain depends on the cell size and the number of cells. So we must recompute them after refinement.
1 parent b194fd7 commit 0e4b205

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Src/AmrCore/AMReX_AmrMesh.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ AmrMesh::AmrMesh (Geometry const& level_0_geom, AmrInfo const& amr_info)
6464
geom.push_back(level_0_geom);
6565
for (int lev = 1; lev <= max_level; ++lev) {
6666
geom.push_back(amrex::refine(geom[lev-1], ref_ratio[lev-1]));
67+
geom.back().computeRoundoffDomain();
6768
}
6869

6970
finest_level = -1;

Src/Base/AMReX_Geometry.H

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,7 @@ public:
433433
*/
434434
[[nodiscard]] bool insideRoundoffDomain (AMREX_D_DECL(ParticleReal x, ParticleReal y, ParticleReal z)) const;
435435

436-
/**
437-
* \brief Compute the roundoff domain. Public because it contains an
438-
* extended host / device lambda.
439-
*/
436+
//! Compute the roundoff domain.
440437
void computeRoundoffDomain ();
441438

442439
//! Returns roundoff domain's lower end

0 commit comments

Comments
 (0)