Skip to content

Commit

Permalink
Geometry: Fix operator>> (#4042)
Browse files Browse the repository at this point in the history
We cannot use Geometry::Domain in operator>> because it in turn calls
Geometry::computeRoundoffDomain before prob_domain is set.
  • Loading branch information
WeiqunZhang authored Jul 22, 2024
1 parent cdacc4d commit e7333ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Src/Base/AMReX_Geometry.H
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ private:

//
Box domain;

friend std::istream& operator>> (std::istream&, Geometry&);
};


Expand Down
8 changes: 3 additions & 5 deletions Src/Base/AMReX_Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ std::istream&
operator>> (std::istream& is,
Geometry& g)
{
Box bx;
RealBox rb;
is >> (CoordSys&) g >> rb >> bx;
g.Domain(bx);
g.ProbDomain(rb);
is >> (CoordSys&) g >> g.prob_domain >> g.domain;

g.computeRoundoffDomain();

int ic = is.peek();
if (ic == static_cast<int>('P')) {
Expand Down

0 comments on commit e7333ca

Please sign in to comment.