Closed abarret closed 1 year ago
@bindi-nagda Take a look now. I replaced the two separate variables with one variable with a depth of NDIM
. It also reads in tolerances from the input file.
Okay, looks good to me. By the way, why don't we need to allocate patch data for grad_thn_idx?
Okay, looks good to me. By the way, why don't we need to allocate patch data for grad_thn_idx?
Variables registered with getCurrentContext()
are always allocated. They represent "state" data that is always maintained on the patch hierarchy.
Ok, I see. Should I go ahead and merge this PR?
Let's go ahead and merge. We need to test this more, but we can do that later.
There are a few significant changes here.
registerVariable
interface, which sets them up to be reinitialized on regridding.VariableDatabase<NDIM>
and withgetCurrentContext()
,getNewContext()
, andgetScratchContext()
. The current context holds the current values.d_hier_[s|c]c_data_manager
to do any kind of copying/vector operations on patch indices.preprocessHierarchyIntegrator
. AllintegrateHierarchy
does now is solve the system.The function that decides when to regrid is not implemented in this class. It is
atRegridPointSpecialized
for which a default implementation is provided in the base classHierarchyIntegrator
. The default implementation regrids after a set number of time steps provided by the input database optionregrid_interval
.