Castro icon indicating copy to clipboard operation
Castro copied to clipboard

eliminate the ghost cell from State_Type when running with radiation

Open zingale opened this issue 6 years ago • 2 comments

The hyperbolic system does not need the ghost cell in the State_Type data, even with radiation. The only reason it seems to be there is for constructs like this in MGFLDRadSolver.cpp:

MultiFab& S_lag = castro->get_old_data(State_Type);
for (FillPatchIterator fpi(*castro,S_lag,ngrow,oldtime,State_Type,
                                      0,S_lag.nComp()); fpi.isValid(); ++fpi) {
    S_lag[fpi].copy(fpi());
}

but this can be changed with

FillPatchIterator fpi(....);
MultiFab& S_lag = fpi.get_mf();

or doing a FillPatch on a temporary multifab.

Note: that this applies to State_Type, but Rad_Type still needs one ghost cell because of how the gradient is computed for the flux limiter. At a cource-fine boundary, the values in the ghost cells are set to -1.0 which is a flag for the coarse-fine boundary, in which case we do a one-sided derivative.

zingale avatar Mar 21 '19 01:03 zingale

This probably addresses #423

zingale avatar Mar 21 '19 01:03 zingale

Assigning this to myself as part of the radiation cleanup I'm doing.

maximumcats avatar Dec 29 '19 01:12 maximumcats