[cig-commits] commit: Grow scratch region for fine cells by the ghost width in case the
Mercurial
hg at geodynamics.org
Fri Feb 25 14:10:17 PST 2011
changeset: 6:ab729087458a
tag: tip
user: Walter Landry <wlandry at caltech.edu>
date: Thu Feb 10 11:14:51 2011 -0800
files: source/SAMRAI/xfer/CoarsenSchedule.C
description:
Grow scratch region for fine cells by the ghost width in case the
coarsening algorithm needs a stencil.
diff -r c23af87eaeb6 -r ab729087458a source/SAMRAI/xfer/CoarsenSchedule.C
--- a/source/SAMRAI/xfer/CoarsenSchedule.C Thu Feb 10 11:12:06 2011 -0800
+++ b/source/SAMRAI/xfer/CoarsenSchedule.C Thu Feb 10 11:14:51 2011 -0800
@@ -694,6 +694,7 @@ hier::IntVector CoarsenSchedule::getMaxG
{
const tbox::Dimension& dim(d_crse_level->getDim());
+ tbox::Pointer<hier::PatchDescriptor> pd = d_crse_level->getPatchDescriptor();
/*
* MappedBox, face and side elements of adjacent cells overlap even though
* the cells do not overlap. Therefore, we always grow at least one
@@ -704,13 +705,14 @@ hier::IntVector CoarsenSchedule::getMaxG
for (size_t ici = 0; ici < d_number_coarsen_items; ici++) {
/*
- * I don't know why we need to grow by ghost width of src_id.
- * Rich seems to recall needing this but can't remember the
- * reason. I am disabling it, but may have to re-enable it
- * if it causes problems.
+ * Grow src_id by ghost width. This is needed if the coarsening
+ * algorithm needs a stencil. For example, for face centered,
+ * if the coarsening algorithm uses neighboring points on the
+ * side of the face, and not just the points directly on the
+ * face itself.
*/
- // const int src_id = d_coarsen_items[ici]->d_src;
- // gcw.max(pd->getPatchDataFactory(src_id)->getDefaultGhostCellWidth());
+ const int src_id = d_coarsen_items[ici]->d_src;
+ gcw.max(pd->getPatchDataFactory(src_id)->getGhostCellWidth());
hier::IntVector gcw1 = d_coarsen_items[ici]->d_gcw_to_coarsen;
if (!d_coarsen_items[ici]->d_opcoarsen.isNull()) {
More information about the CIG-COMMITS
mailing list