- changed status to open
- removed comment
Allow skipping of MoL_PostStep and MoL_PseudoEvolutionBoundaries in POSTRESTRICT
It is not always necessary to call MoL_PostStep and MoL_PseudoEvolutionBoundaries in POSTRESTRICT, and it can introduce a performance penalty. The main reason for these calls is that restriction does not fill (outer or symmetry) boundary points, and this is usually done in MoL_PostStep. MoL_PseudoEvolutionBoundaries also sets boundary conditions. However, if restriction does not modify boundary points, for example in the case that boundary points are always far from refined regions, there is no reason to apply boundary conditions (e.g. by calling MoL_PostStep) after restriction.
Eventually, Carpet and MoL should be modified to determine automatically whether the BCs need to be applied, but until that is implemented, the attached patch provides parameters for careful users to optimise their simulations in the case where this is safe to do.
Additionally, recalculations performed in MoL_PostStep may replace more accurate restricted values computed on finer grids, leading to a loss of accuracy.
OK to commit?
Keyword:
Comments (9)
-
-
- changed status to open
- removed comment
-
reporter - removed comment
The attached (untested) patch enables a Carpet sync after restrict determined by a new parameter. I want to test this a bit before committing though.
-
- removed comment
Ian: this has been taken care of, yes?
-
reporter - removed comment
No, they have not been committed. In light of the recent changes to sync/restrict handling, I'll have to go back and think about these patches again.
-
- removed comment
Ian: did you decide what to do with these?
-
reporter - removed comment
No. The sync-after-restrict patch should not be necessary, as Carpet now either syncs after restriction (cell-centering) or restricts into ghost zones (vertex centering), as far as I remember. The MoL patch probably would still be useful and correct in certain situations, but I would have to think about it more before committing it.
-
- changed status to open
- removed comment
Ian is apparently still think on these.
-
- removed comment
The MoL patch also affects buffer zones. Since the restricted points will be source points for the prolongation operators (being just next to the buffer points on the fine grid). So not running MoL_PostStep will change values in the buffer zones.
- Log in to comment
Note that "boundaries" include ghost zones. You probably have to sync the restricted grid functions manually.
Okay to apply.