Closed maikel closed 4 years ago
Don't laugh. The following change will make it run.
- const double ylength = 0.3;
+ const double ylength = 0.30000000001;
The issue is when we coarsen a fine EB, we could end up with multiple cuts in a coarse cell. That is happening in your case. Unfortunately we don't have a good solution for this.
I do not laugh, but I try to understand this case here. Is it a 3D specific situation? Do you coarsen the EB data by fixing the face area fractions?
@Weiqun -- imagine a time-stepping algorithm where the EB cut cells are always resolved at level 1 and the algorithm does not need to advance the underlying coarse cells "correctly" because they will be over-written by level 1.
This would be the case for an explicit advance of hyperbolic equations, for example, as long as the cut cells were sufficiently in the interior of the fine region.
Could one create a flag to over-ride the coarsenability requirement, so that we could allow for geometry that is ok at its finest level but not coarsenable to amr level 0?
On Thu, Oct 31, 2019 at 1:15 AM Maikel Nadolski notifications@github.com wrote:
I do not laugh, but I try to understand this case here. Is it a 3D specific situation? Do you coarsen the EB data by fixing the face area fractions?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/amrex/issues/608?email_source=notifications&email_token=ACRE6YW44SZ4FOUP2LZMPPDQRKHZXA5CNFSM4JGFPP4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECW4N6Q#issuecomment-548259578, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRE6YVFRDTKHEHYU4PUWKDQRKHZXANCNFSM4JGFPP4A .
This is not 3d specific. Here is a picture demonstrating the issue. Both red and blue boundaries are fine for the 4 fine cells. However, when the 4 fine cells are merged into one coarse cell, the blue boundary is fine, whereas the red is not.
Indeed, very helpful! Thank you
@asalmgren Yes, we could certainly ignore it for hyperbolic problems if the boundaries are refined. Or we may simply have all regular geometry on the coarse level.
Is there a way currently to tell the code not to worry about whether a geometry at level 1 is coarsenable to level 0?
On Thu, Oct 31, 2019 at 6:04 AM WeiqunZhang notifications@github.com wrote:
@asalmgren https://github.com/asalmgren Yes, we could certainly ignore it for hyperbolic problems if the boundaries are refined. Or we may simply have all regular geometry on the coarse level.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/amrex/issues/608?email_source=notifications&email_token=ACRE6YRBTRPVMKV2ZGAP54TQRLJV7A5CNFSM4JGFPP4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECXV6ZQ#issuecomment-548364134, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRE6YWMBWBSKWHFQYYTWJDQRLJV7ANCNFSM4JGFPP4A .
We can set required coarsening level to zero when building.
On Thu, Oct 31, 2019, 7:18 AM asalmgren notifications@github.com wrote:
Is there a way currently to tell the code not to worry about whether a geometry at level 1 is coarsenable to level 0?
On Thu, Oct 31, 2019 at 6:04 AM WeiqunZhang notifications@github.com wrote:
@asalmgren https://github.com/asalmgren Yes, we could certainly ignore it for hyperbolic problems if the boundaries are refined. Or we may simply have all regular geometry on the coarse level.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/AMReX-Codes/amrex/issues/608?email_source=notifications&email_token=ACRE6YRBTRPVMKV2ZGAP54TQRLJV7A5CNFSM4JGFPP4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECXV6ZQ#issuecomment-548364134 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACRE6YWMBWBSKWHFQYYTWJDQRLJV7ANCNFSM4JGFPP4A
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/amrex/issues/608?email_source=notifications&email_token=AB37TYI4K26OT6G3TLD4WYDQRLSJNA5CNFSM4JGFPP4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECX6AKI#issuecomment-548397097, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB37TYNTZHAFEVUWLMAZVALQRLSJNANCNFSM4JGFPP4A .
Or we may simply have all regular geometry on the coarse level. [...] We can set required coarsening level to zero when building.
I think this is exactly the way I thought of doing it. I will try it the "normal" way first and only consider work-arounds only if I truly need them. Thank you, IMO this issue is resolved.
I append here a test case (which needs
-std=c++17
, sorry) where I generate a 3D EB geometry which successfully runs with a call toamrex::EB::Build(shop, coarse_geom, 0, 0)
but fails withamrex::EB::Build(shop, fine_geom, 1, 2)
oramrex::EB::Build(shop, fine_geom, 1, 1)
. The abort message in the latter case isIf AMREX_SPACEDIM == 2 it works in both cases. The geometry which is generated in 2D is
The geometry in 3D is
Is this expected behaviour? Is this fixable? If not, I would try to somehow circumvent it by using a non coarsenable index space on finer levels.
EDIT: I changed the
amrex::EB::Build
call to use the fine geometry but it still fails.