-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Subycling Support #297
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the test case is good for development but too large for a regression test, see: https://docs.einsteintoolkit.org/et-docs/Adding_a_test_case
{ | ||
} no | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for making it restricted? Should there be any other thorn that accesses it? ODESolvers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And also for those evolution thorns, they will need a flag to determine if they want allocate memories for ks
or not.
CarpetX/src/schedule.cxx
Outdated
@@ -1755,6 +1771,12 @@ int Evolve(tFleshConfig *config) { | |||
|
|||
CycleTimelevels(cctkGH); | |||
|
|||
cctkGH->cctk_timefac = (use_subcycling_wip) ? std::pow(2, min_level) : 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parens are superfluous
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -0,0 +1,9 @@ | |||
Cactus Code Thorn Subcycling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather have separate pull requests for the CarpetX infrastructure and this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required for the unit test. It's difficult to come up a new unit test just test the change in CarpetX. Or we can take that the change we made in CarpetX didn't break any of the old unit test as a good 'unit test' :)
grid.loop_ghosts_device<0, 0, 0>( | ||
grid.nghostzones, | ||
[=] CCTK_DEVICE(const Loop::PointDesc &p) CCTK_ATTRIBUTE_ALWAYS_INLINE { | ||
isrmbndry(p.I) = (level_neighbor(p.I) == cctk_level) ? 0 : 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also flags points that are restricted into as refinement boundaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this only flags points that are restricted into as refinement boundaries
// Default: vertex-centred | ||
index = {0, 0, 0}; | ||
} else if (iret >= 0) { | ||
assert(iret == Loop::dim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may benefit (here and in the source in CapretX) from a better error message since this error is user triggerable when they say eg centering={cc}
const CCTK_REAL dtc, const CCTK_REAL xsi, const CCTK_INT stage) { | ||
assert(stage > 0 && stage <= 4); | ||
|
||
CCTK_REAL r = 0.5; // ratio between coarse and fine cell size (2 to 1 MR case) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cite the paper describing the method and the equations you are using
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
{ | ||
"standing wave" :: "Standing wave" | ||
"Gaussian" :: "Gaussian" | ||
} "standing wave" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need both? These are just copied from wavetoy, yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I just copied from wavetoy
@@ -0,0 +1,9 @@ | |||
Cactus Code Thorn TestSubcycling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need a specific thorn? Ie does the client thorn for subcycling in time have to be aware of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you were talking about thorn Subcycling
here. No, the client thorn need not to be aware of it. But I thought this will be modulated if we separate it from CarpetX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, if you are implementing RK4 yourself instead of using ODESovler, then your thorn should be aware of Subcycling
update CarpetX to support subcycling time steping
add Subcycling Thorn
subcycling.hxx
which implement the subcyling algorithm of Peter McCorquodale and Phillip Colella (2011)isrmbndry
to identify refinement boundary of ghost pointsadd TestSubycling Thorn