[cig-commits] commit: Make relax work with multiple patches

Mercurial hg at geodynamics.org
Fri Feb 25 14:13:30 PST 2011


changeset:   25:12b19d336e95
user:        Walter Landry <wlandry at caltech.edu>
date:        Wed Jan 05 14:27:14 2011 -0800
files:       StokesFACOps.I StokesFACOps.h StokesFACOps/StokesFACOps.C StokesFACOps/checkInputPatchDataIndices.C StokesFACOps/deallocateOperatorState.C StokesFACOps/finalizeCallback.C StokesFACOps/initializeOperatorState.C StokesFACOps/relax.C StokesFACOps/restrictSolution.C StokesFACOps/smoothErrorByRedBlack.C StokesFACOps/solveCoarsestLevel.C StokesFACOps/xeqScheduleGhostFillNoCoarse.C StokesFACSolver/initializeSolverState.C example_inputs/const_refine.2d.input
description:
Make relax work with multiple patches


diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps.I
--- a/StokesFACOps.I	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps.I	Wed Jan 05 14:27:14 2011 -0800
@@ -84,6 +84,22 @@ void StokesFACOps::setFluxId(
 void StokesFACOps::setFluxId(
    int flux_id) {
    d_flux_id = flux_id;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   checkInputPatchDataIndices();
+#endif
+}
+
+/*
+ ********************************************************************
+ * Set the patch data id for p and v.                               *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void StokesFACOps::set_p_v(
+   int p, int v) {
+   p_id = p;
+   v_id = v;
 #ifdef DEBUG_CHECK_ASSERTIONS
    checkInputPatchDataIndices();
 #endif
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps.h
--- a/StokesFACOps.h	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps.h	Wed Jan 05 14:27:14 2011 -0800
@@ -294,6 +294,9 @@ public:
    void
    setFluxId(
       int flux_id);
+
+   void
+   set_p_v(int p_id, int v_id);
 
    //@}
 
@@ -723,9 +726,8 @@ private:
     * and physical bc.
     */
    void
-   xeqScheduleGhostFillNoCoarse(
-      int dst_id,
-      int dest_ln);
+   xeqScheduleGhostFillNoCoarse(int p_id, int v_id,
+                                int dest_ln);
 
    //@}
 
@@ -873,6 +875,8 @@ private:
     */
    int d_flux_id;
 
+  int p_id, v_id;
+
 #ifdef HAVE_HYPRE
    /*!
     * @brief HYPRE coarse-level solver object.
@@ -896,6 +900,9 @@ private:
 
    static tbox::Pointer<pdat::SideVariable<double> >
    s_flux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static tbox::Pointer<pdat::SideVariable<double> >
+   s_side_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
 
    static tbox::Pointer<pdat::OutersideVariable<double> >
    s_oflux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
@@ -927,6 +934,7 @@ private:
     * immediately after use.
     */
    int d_flux_scratch_id;
+   int d_side_scratch_id;
 
    /*!
     * @brief ID of the outerside-centered scratch data.
@@ -979,6 +987,16 @@ private:
    tbox::Pointer<xfer::RefineAlgorithm> d_ghostfill_nocoarse_refine_algorithm;
    tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
    d_ghostfill_nocoarse_refine_schedules;
+
+   tbox::Pointer<xfer::RefineOperator> p_nocoarse_refine_operator;
+   tbox::Pointer<xfer::RefineAlgorithm> p_nocoarse_refine_algorithm;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   p_nocoarse_refine_schedules;
+
+   tbox::Pointer<xfer::RefineOperator> v_nocoarse_refine_operator;
+   tbox::Pointer<xfer::RefineAlgorithm> v_nocoarse_refine_algorithm;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   v_nocoarse_refine_schedules;
 
    //@}
 
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/StokesFACOps.C
--- a/StokesFACOps/StokesFACOps.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/StokesFACOps.C	Wed Jan 05 14:27:14 2011 -0800
@@ -53,6 +53,9 @@ namespace SAMRAI {
     tbox::Pointer<pdat::SideVariable<double> >
     StokesFACOps::s_flux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
 
+    tbox::Pointer<pdat::SideVariable<double> >
+    StokesFACOps::s_side_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
     tbox::Pointer<pdat::OutersideVariable<double> >
     StokesFACOps::s_oflux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
 
@@ -95,6 +98,8 @@ namespace SAMRAI {
       d_coarse_solver_max_iterations(10),
       d_residual_tolerance_during_smoothing(-1.0),
       d_flux_id(-1),
+      p_id(-1),
+      v_id(-1),
 #ifdef HAVE_HYPRE
       d_hypre_solver(dim,
                      object_name + "::hypre_solver",
@@ -107,6 +112,7 @@ namespace SAMRAI {
                 ->getContext(object_name + "::PRIVATE_CONTEXT")),
       d_cell_scratch_id(-1),
       d_flux_scratch_id(-1),
+      d_side_scratch_id(-1),
       d_oflux_scratch_id(-1),
       d_prolongation_refine_operator(),
       d_prolongation_refine_algorithm(),
@@ -126,6 +132,12 @@ namespace SAMRAI {
       d_ghostfill_nocoarse_refine_operator(),
       d_ghostfill_nocoarse_refine_algorithm(),
       d_ghostfill_nocoarse_refine_schedules(),
+      p_nocoarse_refine_operator(),
+      p_nocoarse_refine_algorithm(),
+      p_nocoarse_refine_schedules(),
+      v_nocoarse_refine_operator(),
+      v_nocoarse_refine_algorithm(),
+      v_nocoarse_refine_schedules(),
       d_bc_helper(dim,
                   d_object_name + "::bc helper"),
       d_enable_logging(false),
@@ -166,6 +178,10 @@ namespace SAMRAI {
         s_flux_scratch_var[dim.getValue() - 1] = new pdat::SideVariable<double>
           (dim, ss.str());
         ss.str("");
+        ss << "StokesFACOps::private_side_scratch" << dim.getValue();
+        s_side_scratch_var[dim.getValue() - 1] = new pdat::SideVariable<double>
+          (dim, ss.str());
+        ss.str("");
         ss << "StokesFACOps::private_oflux_scratch" << dim.getValue();
         s_oflux_scratch_var[dim.getValue() - 1] = new pdat::OutersideVariable<double>
           (dim, ss.str());
@@ -180,6 +196,10 @@ namespace SAMRAI {
         registerVariableAndContext(s_flux_scratch_var[dim.getValue() - 1],
                                    d_context,
                                    hier::IntVector::getZero(d_dim));
+      d_side_scratch_id = vdb->
+        registerVariableAndContext(s_side_scratch_var[dim.getValue() - 1],
+                                   d_context,
+                                   hier::IntVector::getOne(d_dim));
       d_oflux_scratch_id = vdb->
         registerVariableAndContext(s_oflux_scratch_var[dim.getValue() - 1],
                                    d_context,
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/checkInputPatchDataIndices.C
--- a/StokesFACOps/checkInputPatchDataIndices.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/checkInputPatchDataIndices.C	Wed Jan 05 14:27:14 2011 -0800
@@ -83,6 +83,22 @@ namespace SAMRAI {
         TBOX_ASSERT(flux_var);
       }
 
+      if (p_id != -1) {
+        tbox::Pointer<hier::Variable> var;
+        vdb.mapIndexToVariable(p_id, var);
+        tbox::Pointer<pdat::CellVariable<double> > p_var = var;
+
+        TBOX_ASSERT(p_var);
+      }
+
+      if (v_id != -1) {
+        tbox::Pointer<hier::Variable> var;
+        vdb.mapIndexToVariable(v_id, var);
+        tbox::Pointer<pdat::SideVariable<double> > v_var = var;
+
+        TBOX_ASSERT(v_var);
+      }
+
     }
 
   }
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/deallocateOperatorState.C
--- a/StokesFACOps/deallocateOperatorState.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/deallocateOperatorState.C	Wed Jan 05 14:27:14 2011 -0800
@@ -85,6 +85,12 @@ namespace SAMRAI {
         d_ghostfill_nocoarse_refine_algorithm.setNull();
         d_ghostfill_nocoarse_refine_schedules.setNull();
 
+        p_nocoarse_refine_algorithm.setNull();
+        p_nocoarse_refine_schedules.setNull();
+
+        v_nocoarse_refine_algorithm.setNull();
+        v_nocoarse_refine_schedules.setNull();
+
       }
     }
 
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/finalizeCallback.C
--- a/StokesFACOps/finalizeCallback.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/finalizeCallback.C	Wed Jan 05 14:27:14 2011 -0800
@@ -48,6 +48,7 @@ namespace SAMRAI {
     {
       for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
         s_cell_scratch_var[d].setNull();
+        s_side_scratch_var[d].setNull();
         s_flux_scratch_var[d].setNull();
         s_oflux_scratch_var[d].setNull();
       }
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/initializeOperatorState.C
--- a/StokesFACOps/initializeOperatorState.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/initializeOperatorState.C	Wed Jan 05 14:27:14 2011 -0800
@@ -40,10 +40,7 @@
 #include "SAMRAI/xfer/RefineSchedule.h"
 #include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
 
-namespace SAMRAI {
-  namespace solv {
-
-    /*
+/*
 ************************************************************************
 * FACOperatorStrategy virtual initializeOperatorState function.  *
 *                                                                      *
@@ -52,365 +49,428 @@ namespace SAMRAI {
 ************************************************************************
 */
 
-    void StokesFACOps::initializeOperatorState(
-                                               const SAMRAIVectorReal<double>& solution,
-                                               const SAMRAIVectorReal<double>& rhs)
-    {
-      deallocateOperatorState();
-      int ln;
-      hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+void SAMRAI::solv::StokesFACOps::initializeOperatorState
+(const SAMRAIVectorReal<double>& solution,
+ const SAMRAIVectorReal<double>& rhs)
+{
+  deallocateOperatorState();
+  int ln;
+  hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
 
-      d_hierarchy = solution.getPatchHierarchy();
-      d_ln_min = solution.getCoarsestLevelNumber();
-      d_ln_max = solution.getFinestLevelNumber();
-      d_hopscell = new math::HierarchyCellDataOpsReal<double>(d_hierarchy,
-                                                              d_ln_min,
-                                                              d_ln_max);
-      d_hopsside = new math::HierarchySideDataOpsReal<double>(d_hierarchy,
-                                                              d_ln_min,
-                                                              d_ln_max);
+  d_hierarchy = solution.getPatchHierarchy();
+  d_ln_min = solution.getCoarsestLevelNumber();
+  d_ln_max = solution.getFinestLevelNumber();
+  d_hopscell = new math::HierarchyCellDataOpsReal<double>(d_hierarchy,
+                                                          d_ln_min,
+                                                          d_ln_max);
+  d_hopsside = new math::HierarchySideDataOpsReal<double>(d_hierarchy,
+                                                          d_ln_min,
+                                                          d_ln_max);
 
 #ifdef DEBUG_CHECK_ASSERTIONS
 
-      if (d_physical_bc_coef == NULL) {
+  if (d_physical_bc_coef == NULL) {
+    /*
+     * It's an error not to have bc object set.
+     * Note that the bc object cannot be passed in through
+     * the argument because the interface is inherited.
+     */
+    TBOX_ERROR(
+               d_object_name << ": No physical bc object in\n"
+               <<
+               "StokesFACOps::initializeOperatorState\n"
+               << "You must use "
+               <<
+               "StokesFACOps::setPhysicalBcCoefObject\n"
+               <<
+               "to set one before calling initializeOperatorState\n");
+  }
+
+  if (solution.getNumberOfComponents() != 1) {
+    TBOX_WARNING(d_object_name
+                 << ": Solution vector has multiple components.\n"
+                 << "Solver is for component 0 only.\n");
+  }
+  if (rhs.getNumberOfComponents() != 1) {
+    TBOX_WARNING(d_object_name
+                 << ": RHS vector has multiple components.\n"
+                 << "Solver is for component 0 only.\n");
+  }
+
+  /*
+   * Make sure that solution and rhs data
+   *   are of correct type
+   *   are allocated
+   *   has sufficient ghost width
+   */
+  tbox::Pointer<hier::Variable> var;
+  {
+    vdb->mapIndexToVariable(rhs.getComponentDescriptorIndex(0),
+                            var);
+    if (!var) {
+      TBOX_ERROR(d_object_name << ": RHS component does not\n"
+                 << "correspond to a variable.\n");
+    }
+    tbox::Pointer<pdat::CellVariable<double> > cell_var = var;
+    if (!cell_var) {
+      TBOX_ERROR(d_object_name
+                 << ": RHS variable is not cell-centered double\n");
+    }
+  }
+  {
+    vdb->mapIndexToVariable(solution.getComponentDescriptorIndex(0),
+                            var);
+    if (!var) {
+      TBOX_ERROR(d_object_name << ": Solution component does not\n"
+                 << "correspond to a variable.\n");
+    }
+    tbox::Pointer<pdat::CellVariable<double> > cell_var = var;
+    if (!cell_var) {
+      TBOX_ERROR(d_object_name
+                 << ": Solution variable is not cell-centered double\n");
+    }
+  }
+  for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+    tbox::Pointer<hier::PatchLevel> level_ptr =
+      d_hierarchy->getPatchLevel(ln);
+    hier::PatchLevel& level = *level_ptr;
+    for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      tbox::Pointer<hier::PatchData> fd =
+        patch.getPatchData(rhs.getComponentDescriptorIndex(0));
+      if (fd) {
         /*
-         * It's an error not to have bc object set.
-         * Note that the bc object cannot be passed in through
-         * the argument because the interface is inherited.
+         * Some data checks can only be done if the data already exists.
          */
-        TBOX_ERROR(
-                   d_object_name << ": No physical bc object in\n"
-                   <<
-                   "StokesFACOps::initializeOperatorState\n"
-                   << "You must use "
-                   <<
-                   "StokesFACOps::setPhysicalBcCoefObject\n"
-                   <<
-                   "to set one before calling initializeOperatorState\n");
-      }
-
-      if (solution.getNumberOfComponents() != 1) {
-        TBOX_WARNING(d_object_name
-                     << ": Solution vector has multiple components.\n"
-                     << "Solver is for component 0 only.\n");
-      }
-      if (rhs.getNumberOfComponents() != 1) {
-        TBOX_WARNING(d_object_name
-                     << ": RHS vector has multiple components.\n"
-                     << "Solver is for component 0 only.\n");
-      }
-
-      /*
-       * Make sure that solution and rhs data
-       *   are of correct type
-       *   are allocated
-       *   has sufficient ghost width
-       */
-      tbox::Pointer<hier::Variable> var;
-      {
-        vdb->mapIndexToVariable(rhs.getComponentDescriptorIndex(0),
-                                var);
-        if (!var) {
-          TBOX_ERROR(d_object_name << ": RHS component does not\n"
-                     << "correspond to a variable.\n");
+        tbox::Pointer<pdat::CellData<double> > cd = fd;
+        if (!cd) {
+          TBOX_ERROR(d_object_name
+                     << ": RHS data is not cell-centered double\n");
         }
-        tbox::Pointer<pdat::CellVariable<double> > cell_var = var;
-        if (!cell_var) {
-          TBOX_ERROR(d_object_name
-                     << ": RHS variable is not cell-centered double\n");
+        if (cd->getDepth() > 1) {
+          TBOX_WARNING(d_object_name
+                       << ": RHS data has multiple depths.\n"
+                       << "Solver is for depth 0 only.\n");
         }
       }
-      {
-        vdb->mapIndexToVariable(solution.getComponentDescriptorIndex(0),
-                                var);
-        if (!var) {
-          TBOX_ERROR(d_object_name << ": Solution component does not\n"
-                     << "correspond to a variable.\n");
+      tbox::Pointer<hier::PatchData> ud =
+        patch.getPatchData(solution.getComponentDescriptorIndex(0));
+      if (ud) {
+        /*
+         * Some data checks can only be done if the data already exists.
+         */
+        tbox::Pointer<pdat::CellData<double> > cd = ud;
+        if (!cd) {
+          TBOX_ERROR(d_object_name
+                     << ": Solution data is not cell-centered double\n");
         }
-        tbox::Pointer<pdat::CellVariable<double> > cell_var = var;
-        if (!cell_var) {
+        if (cd->getDepth() > 1) {
+          TBOX_WARNING(d_object_name
+                       << ": Solution data has multiple depths.\n"
+                       << "Solver is for depth 0 only.\n");
+        }
+        if (cd->getGhostCellWidth() < hier::IntVector::getOne(d_dim)) {
           TBOX_ERROR(d_object_name
-                     << ": Solution variable is not cell-centered double\n");
+                     << ": Solution data has insufficient ghost width\n");
         }
       }
-      for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
-        tbox::Pointer<hier::PatchLevel> level_ptr =
-          d_hierarchy->getPatchLevel(ln);
-        hier::PatchLevel& level = *level_ptr;
-        for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
-          hier::Patch& patch = **pi;
-          tbox::Pointer<hier::PatchData> fd =
-            patch.getPatchData(rhs.getComponentDescriptorIndex(0));
-          if (fd) {
-            /*
-             * Some data checks can only be done if the data already exists.
-             */
-            tbox::Pointer<pdat::CellData<double> > cd = fd;
-            if (!cd) {
-              TBOX_ERROR(d_object_name
-                         << ": RHS data is not cell-centered double\n");
-            }
-            if (cd->getDepth() > 1) {
-              TBOX_WARNING(d_object_name
-                           << ": RHS data has multiple depths.\n"
-                           << "Solver is for depth 0 only.\n");
-            }
-          }
-          tbox::Pointer<hier::PatchData> ud =
-            patch.getPatchData(solution.getComponentDescriptorIndex(0));
-          if (ud) {
-            /*
-             * Some data checks can only be done if the data already exists.
-             */
-            tbox::Pointer<pdat::CellData<double> > cd = ud;
-            if (!cd) {
-              TBOX_ERROR(d_object_name
-                         << ": Solution data is not cell-centered double\n");
-            }
-            if (cd->getDepth() > 1) {
-              TBOX_WARNING(d_object_name
-                           << ": Solution data has multiple depths.\n"
-                           << "Solver is for depth 0 only.\n");
-            }
-            if (cd->getGhostCellWidth() < hier::IntVector::getOne(d_dim)) {
-              TBOX_ERROR(d_object_name
-                         << ": Solution data has insufficient ghost width\n");
-            }
-          }
-        }
-      }
+    }
+  }
 
-      /*
-       * Solution and rhs must have some similar properties.
-       */
-      if (rhs.getPatchHierarchy() != d_hierarchy
-          || rhs.getCoarsestLevelNumber() != d_ln_min
-          || rhs.getFinestLevelNumber() != d_ln_max) {
-        TBOX_ERROR(d_object_name << ": solution and rhs do not have\n"
-                   << "the same set of patch levels.\n");
-      }
+  /*
+   * Solution and rhs must have some similar properties.
+   */
+  if (rhs.getPatchHierarchy() != d_hierarchy
+      || rhs.getCoarsestLevelNumber() != d_ln_min
+      || rhs.getFinestLevelNumber() != d_ln_max) {
+    TBOX_ERROR(d_object_name << ": solution and rhs do not have\n"
+               << "the same set of patch levels.\n");
+  }
 
 #endif
 
-      /*
-       * Initialize the coarse-fine boundary description for the
-       * hierarchy.
-       */
-      d_cf_boundary.resizeArray(d_hierarchy->getNumberOfLevels());
+  /*
+   * Initialize the coarse-fine boundary description for the
+   * hierarchy.
+   */
+  d_cf_boundary.resizeArray(d_hierarchy->getNumberOfLevels());
 
-      hier::IntVector max_gcw(d_dim, 1);
-      for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
-        d_cf_boundary[ln] = new hier::CoarseFineBoundary(*d_hierarchy,
-                                                         ln,
-                                                         max_gcw);
-      }
+  hier::IntVector max_gcw(d_dim, 1);
+  for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+    d_cf_boundary[ln] = new hier::CoarseFineBoundary(*d_hierarchy,
+                                                     ln,
+                                                     max_gcw);
+  }
 #ifdef HAVE_HYPRE
-      if (d_coarse_solver_choice == "hypre") {
-        d_hypre_solver.initializeSolverState(d_hierarchy, d_ln_min);
-        /*
-         * Share the boundary condition object with the hypre solver
-         * to make sure that boundary condition settings are consistent
-         * between the two objects.
-         */
-        d_hypre_solver.setPhysicalBcCoefObject(d_physical_bc_coef);
-        d_hypre_solver.setMatrixCoefficients(d_stokes_spec);
-      }
+  if (d_coarse_solver_choice == "hypre") {
+    d_hypre_solver.initializeSolverState(d_hierarchy, d_ln_min);
+    /*
+     * Share the boundary condition object with the hypre solver
+     * to make sure that boundary condition settings are consistent
+     * between the two objects.
+     */
+    d_hypre_solver.setPhysicalBcCoefObject(d_physical_bc_coef);
+    d_hypre_solver.setMatrixCoefficients(d_stokes_spec);
+  }
 #endif
 
-      /*
-       * Get the transfer operators.
-       * Flux coarsening is conservative.
-       * Cell (solution, error, etc) coarsening is conservative.
-       * Cell refinement from same level is constant refinement.
-       * Cell refinement from coarser level is chosen by the
-       *   choice of coarse-fine discretization, d_cf_discretization,
-       *   which should be set to either "Ewing" or one of the
-       *   acceptable strings for looking up the refine operator.
-       */
-      tbox::Pointer<geom::CartesianGridGeometry> geometry =
-        d_hierarchy->getGridGeometry();
-      tbox::Pointer<hier::Variable> variable;
+  /*
+   * Get the transfer operators.
+   * Flux coarsening is conservative.
+   * Cell (solution, error, etc) coarsening is conservative.
+   * Cell refinement from same level is constant refinement.
+   * Cell refinement from coarser level is chosen by the
+   *   choice of coarse-fine discretization, d_cf_discretization,
+   *   which should be set to either "Ewing" or one of the
+   *   acceptable strings for looking up the refine operator.
+   */
+  tbox::Pointer<geom::CartesianGridGeometry> geometry =
+    d_hierarchy->getGridGeometry();
+  tbox::Pointer<hier::Variable> variable;
 
-      vdb->mapIndexToVariable(d_cell_scratch_id, variable);
-      d_prolongation_refine_operator =
-        geometry->lookupRefineOperator(variable,
-                                       d_prolongation_method);
+  vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+  d_prolongation_refine_operator =
+    geometry->lookupRefineOperator(variable,
+                                   d_prolongation_method);
 
-      vdb->mapIndexToVariable(d_cell_scratch_id, variable);
-      d_urestriction_coarsen_operator =
-        d_rrestriction_coarsen_operator =
-        geometry->lookupCoarsenOperator(variable,
-                                        "CONSERVATIVE_COARSEN");
+  vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+  d_urestriction_coarsen_operator =
+    d_rrestriction_coarsen_operator =
+    geometry->lookupCoarsenOperator(variable,
+                                    "CONSERVATIVE_COARSEN");
 
-      vdb->mapIndexToVariable(d_oflux_scratch_id, variable);
-      d_flux_coarsen_operator =
-        geometry->lookupCoarsenOperator(variable,
-                                        "CONSERVATIVE_COARSEN");
+  vdb->mapIndexToVariable(d_oflux_scratch_id, variable);
+  d_flux_coarsen_operator =
+    geometry->lookupCoarsenOperator(variable,
+                                    "CONSERVATIVE_COARSEN");
 
-      vdb->mapIndexToVariable(d_cell_scratch_id, variable);
-      d_ghostfill_refine_operator =
-        geometry->lookupRefineOperator(variable,
-                                       d_cf_discretization == "Ewing" ?
-                                       "CONSTANT_REFINE" : d_cf_discretization);
+  vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+  d_ghostfill_refine_operator =
+    geometry->lookupRefineOperator(variable,
+                                   d_cf_discretization == "Ewing" ?
+                                   "CONSTANT_REFINE" : d_cf_discretization);
 
-      vdb->mapIndexToVariable(d_cell_scratch_id, variable);
-      d_ghostfill_nocoarse_refine_operator =
-        geometry->lookupRefineOperator(variable,
-                                       "CONSTANT_REFINE");
+  vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+  d_ghostfill_nocoarse_refine_operator =
+    geometry->lookupRefineOperator(variable,
+                                   "CONSTANT_REFINE");
+
+  vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+  p_nocoarse_refine_operator =
+    geometry->lookupRefineOperator(variable,
+                                   "CONSTANT_REFINE");
+
+  vdb->mapIndexToVariable(d_side_scratch_id, variable);
+  v_nocoarse_refine_operator =
+    geometry->lookupRefineOperator(variable,
+                                   "CONSTANT_REFINE");
 
 #ifdef DEBUG_CHECK_ASSERTIONS
-      if (!d_prolongation_refine_operator) {
-        TBOX_ERROR(d_object_name
-                   << ": Cannot find prolongation refine operator");
-      }
-      if (!d_urestriction_coarsen_operator) {
-        TBOX_ERROR(d_object_name
-                   << ": Cannot find restriction coarsening operator");
-      }
-      if (!d_rrestriction_coarsen_operator) {
-        TBOX_ERROR(d_object_name
-                   << ": Cannot find restriction coarsening operator");
-      }
-      if (!d_flux_coarsen_operator) {
-        TBOX_ERROR(d_object_name
-                   << ": Cannot find flux coarsening operator");
-      }
-      if (!d_ghostfill_refine_operator) {
-        TBOX_ERROR(d_object_name
-                   << ": Cannot find ghost filling refinement operator");
-      }
-      if (!d_ghostfill_nocoarse_refine_operator) {
-        TBOX_ERROR(d_object_name
-                   << ": Cannot find ghost filling refinement operator");
-      }
+  if (!d_prolongation_refine_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find prolongation refine operator");
+  }
+  if (!d_urestriction_coarsen_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find restriction coarsening operator");
+  }
+  if (!d_rrestriction_coarsen_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find restriction coarsening operator");
+  }
+  if (!d_flux_coarsen_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find flux coarsening operator");
+  }
+  if (!d_ghostfill_refine_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find ghost filling refinement operator");
+  }
+  if (!d_ghostfill_nocoarse_refine_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find ghost filling refinement operator");
+  }
+  if (!p_nocoarse_refine_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find p ghost filling refinement operator");
+  }
+  if (!v_nocoarse_refine_operator) {
+    TBOX_ERROR(d_object_name
+               << ": Cannot find v ghost filling refinement operator");
+  }
 #endif
 
-      for (ln = d_ln_min + 1; ln <= d_ln_max; ++ln) {
-        d_hierarchy->getPatchLevel(ln)->
-          allocatePatchData(d_oflux_scratch_id);
-      }
+  for (ln = d_ln_min + 1; ln <= d_ln_max; ++ln) {
+    d_hierarchy->getPatchLevel(ln)->
+      allocatePatchData(d_oflux_scratch_id);
+  }
 
-      /*
-       * Make space for saving communication schedules.
-       * There is no need to delete the old schedules first
-       * because we have deallocated the solver state above.
-       */
-      d_prolongation_refine_schedules.resizeArray(d_ln_max + 1);
-      d_ghostfill_refine_schedules.resizeArray(d_ln_max + 1);
-      d_ghostfill_nocoarse_refine_schedules.resizeArray(d_ln_max + 1);
-      d_urestriction_coarsen_schedules.resizeArray(d_ln_max + 1);
-      d_rrestriction_coarsen_schedules.resizeArray(d_ln_max + 1);
-      d_flux_coarsen_schedules.resizeArray(d_ln_max + 1);
+  /*
+   * Make space for saving communication schedules.
+   * There is no need to delete the old schedules first
+   * because we have deallocated the solver state above.
+   */
+  d_prolongation_refine_schedules.resizeArray(d_ln_max + 1);
+  d_ghostfill_refine_schedules.resizeArray(d_ln_max + 1);
+  d_ghostfill_nocoarse_refine_schedules.resizeArray(d_ln_max + 1);
+  p_nocoarse_refine_schedules.resizeArray(d_ln_max + 1);
+  v_nocoarse_refine_schedules.resizeArray(d_ln_max + 1);
+  d_urestriction_coarsen_schedules.resizeArray(d_ln_max + 1);
+  d_rrestriction_coarsen_schedules.resizeArray(d_ln_max + 1);
+  d_flux_coarsen_schedules.resizeArray(d_ln_max + 1);
 
-      d_prolongation_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
-      d_urestriction_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
-      d_rrestriction_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
-      d_flux_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
-      d_ghostfill_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
-      d_ghostfill_nocoarse_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+  d_prolongation_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+  d_urestriction_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
+  d_rrestriction_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
+  d_flux_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
+  d_ghostfill_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+  d_ghostfill_nocoarse_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+  p_nocoarse_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+  v_nocoarse_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
 
+  d_prolongation_refine_algorithm->
+    registerRefine(d_cell_scratch_id,
+                   solution.getComponentDescriptorIndex(0),
+                   d_cell_scratch_id,
+                   d_prolongation_refine_operator);
+  d_urestriction_coarsen_algorithm->
+    registerCoarsen(solution.getComponentDescriptorIndex(0),
+                    solution.getComponentDescriptorIndex(0),
+                    d_urestriction_coarsen_operator);
+  d_rrestriction_coarsen_algorithm->
+    registerCoarsen(rhs.getComponentDescriptorIndex(0),
+                    rhs.getComponentDescriptorIndex(0),
+                    d_rrestriction_coarsen_operator);
+  d_ghostfill_refine_algorithm->
+    registerRefine(solution.getComponentDescriptorIndex(0),
+                   solution.getComponentDescriptorIndex(0),
+                   solution.getComponentDescriptorIndex(0),
+                   d_ghostfill_refine_operator);
+  d_flux_coarsen_algorithm->
+    registerCoarsen(((d_flux_id != -1) ? d_flux_id : d_flux_scratch_id),
+                    d_oflux_scratch_id,
+                    d_flux_coarsen_operator);
+  d_ghostfill_nocoarse_refine_algorithm->
+    registerRefine(solution.getComponentDescriptorIndex(0),
+                   solution.getComponentDescriptorIndex(0),
+                   solution.getComponentDescriptorIndex(0),
+                   d_ghostfill_nocoarse_refine_operator);
+  p_nocoarse_refine_algorithm->
+    registerRefine(p_id,p_id,p_id,p_nocoarse_refine_operator);
+  v_nocoarse_refine_algorithm->
+    registerRefine(v_id,v_id,v_id,v_nocoarse_refine_operator);
+
+  for (int dest_ln = d_ln_min + 1; dest_ln <= d_ln_max; ++dest_ln) {
+
+    tbox::Pointer<xfer::PatchLevelFullFillPattern> fill_pattern(
+                                                                new xfer::PatchLevelFullFillPattern());
+    d_prolongation_refine_schedules[dest_ln] =
       d_prolongation_refine_algorithm->
-        registerRefine(d_cell_scratch_id,
-                       solution.getComponentDescriptorIndex(0),
-                       d_cell_scratch_id,
-                       d_prolongation_refine_operator);
+      createSchedule(fill_pattern,
+                     d_hierarchy->getPatchLevel(dest_ln),
+                     tbox::Pointer<hier::PatchLevel>(),
+                     dest_ln - 1,
+                     d_hierarchy,
+                     &d_bc_helper);
+    if (!d_prolongation_refine_schedules[dest_ln]) {
+      TBOX_ERROR(d_object_name
+                 << ": Cannot create a refine schedule for prolongation!\n");
+    }
+    d_ghostfill_refine_schedules[dest_ln] =
+      d_ghostfill_refine_algorithm->
+      createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+                     dest_ln - 1,
+                     d_hierarchy,
+                     &d_bc_helper);
+    if (!d_ghostfill_refine_schedules[dest_ln]) {
+      TBOX_ERROR(d_object_name
+                 << ": Cannot create a refine schedule for ghost filling!\n");
+    }
+    d_ghostfill_nocoarse_refine_schedules[dest_ln] =
+      d_ghostfill_nocoarse_refine_algorithm->
+      createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+                     &d_bc_helper);
+    if (!d_ghostfill_nocoarse_refine_schedules[dest_ln]) {
+      TBOX_ERROR(
+                 d_object_name
+                 <<
+                 ": Cannot create a refine schedule for ghost filling on bottom level!\n");
+    }
+    p_nocoarse_refine_schedules[dest_ln] =
+      p_nocoarse_refine_algorithm->
+      createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+                     &d_bc_helper);
+    if (!p_nocoarse_refine_schedules[dest_ln]) {
+      TBOX_ERROR(
+                 d_object_name
+                 <<
+                 ": Cannot create a refine schedule for ghost filling on bottom level!\n");
+    }
+    v_nocoarse_refine_schedules[dest_ln] =
+      v_nocoarse_refine_algorithm->
+      createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+                     &d_bc_helper);
+    if (!v_nocoarse_refine_schedules[dest_ln]) {
+      TBOX_ERROR(
+                 d_object_name
+                 <<
+                 ": Cannot create a refine schedule for ghost filling on bottom level!\n");
+    }
+  }
+  for (int dest_ln = d_ln_min; dest_ln < d_ln_max; ++dest_ln) {
+    d_urestriction_coarsen_schedules[dest_ln] =
       d_urestriction_coarsen_algorithm->
-        registerCoarsen(solution.getComponentDescriptorIndex(0),
-                        solution.getComponentDescriptorIndex(0),
-                        d_urestriction_coarsen_operator);
+      createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+                     d_hierarchy->getPatchLevel(dest_ln + 1));
+    if (!d_urestriction_coarsen_schedules[dest_ln]) {
+      TBOX_ERROR(d_object_name
+                 << ": Cannot create a coarsen schedule for U restriction!\n");
+    }
+    d_rrestriction_coarsen_schedules[dest_ln] =
       d_rrestriction_coarsen_algorithm->
-        registerCoarsen(rhs.getComponentDescriptorIndex(0),
-                        rhs.getComponentDescriptorIndex(0),
-                        d_rrestriction_coarsen_operator);
-      d_ghostfill_refine_algorithm->
-        registerRefine(solution.getComponentDescriptorIndex(0),
-                       solution.getComponentDescriptorIndex(0),
-                       solution.getComponentDescriptorIndex(0),
-                       d_ghostfill_refine_operator);
+      createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+                     d_hierarchy->getPatchLevel(dest_ln + 1));
+    if (!d_rrestriction_coarsen_schedules[dest_ln]) {
+      TBOX_ERROR(d_object_name
+                 << ": Cannot create a coarsen schedule for R restriction!\n");
+    }
+    d_flux_coarsen_schedules[dest_ln] =
       d_flux_coarsen_algorithm->
-        registerCoarsen(((d_flux_id != -1) ? d_flux_id : d_flux_scratch_id),
-                        d_oflux_scratch_id,
-                        d_flux_coarsen_operator);
-      d_ghostfill_nocoarse_refine_algorithm->
-        registerRefine(solution.getComponentDescriptorIndex(0),
-                       solution.getComponentDescriptorIndex(0),
-                       solution.getComponentDescriptorIndex(0),
-                       d_ghostfill_nocoarse_refine_operator);
-
-      for (int dest_ln = d_ln_min + 1; dest_ln <= d_ln_max; ++dest_ln) {
-
-        tbox::Pointer<xfer::PatchLevelFullFillPattern> fill_pattern(
-                                                                    new xfer::PatchLevelFullFillPattern());
-        d_prolongation_refine_schedules[dest_ln] =
-          d_prolongation_refine_algorithm->
-          createSchedule(fill_pattern,
-                         d_hierarchy->getPatchLevel(dest_ln),
-                         tbox::Pointer<hier::PatchLevel>(),
-                         dest_ln - 1,
-                         d_hierarchy,
-                         &d_bc_helper);
-        if (!d_prolongation_refine_schedules[dest_ln]) {
-          TBOX_ERROR(d_object_name
-                     << ": Cannot create a refine schedule for prolongation!\n");
-        }
-        d_ghostfill_refine_schedules[dest_ln] =
-          d_ghostfill_refine_algorithm->
-          createSchedule(d_hierarchy->getPatchLevel(dest_ln),
-                         dest_ln - 1,
-                         d_hierarchy,
-                         &d_bc_helper);
-        if (!d_ghostfill_refine_schedules[dest_ln]) {
-          TBOX_ERROR(d_object_name
-                     << ": Cannot create a refine schedule for ghost filling!\n");
-        }
-        d_ghostfill_nocoarse_refine_schedules[dest_ln] =
-          d_ghostfill_nocoarse_refine_algorithm->
-          createSchedule(d_hierarchy->getPatchLevel(dest_ln),
-                         &d_bc_helper);
-        if (!d_ghostfill_nocoarse_refine_schedules[dest_ln]) {
-          TBOX_ERROR(
-                     d_object_name
-                     <<
-                     ": Cannot create a refine schedule for ghost filling on bottom level!\n");
-        }
-      }
-      for (int dest_ln = d_ln_min; dest_ln < d_ln_max; ++dest_ln) {
-        d_urestriction_coarsen_schedules[dest_ln] =
-          d_urestriction_coarsen_algorithm->
-          createSchedule(d_hierarchy->getPatchLevel(dest_ln),
-                         d_hierarchy->getPatchLevel(dest_ln + 1));
-        if (!d_urestriction_coarsen_schedules[dest_ln]) {
-          TBOX_ERROR(d_object_name
-                     << ": Cannot create a coarsen schedule for U restriction!\n");
-        }
-        d_rrestriction_coarsen_schedules[dest_ln] =
-          d_rrestriction_coarsen_algorithm->
-          createSchedule(d_hierarchy->getPatchLevel(dest_ln),
-                         d_hierarchy->getPatchLevel(dest_ln + 1));
-        if (!d_rrestriction_coarsen_schedules[dest_ln]) {
-          TBOX_ERROR(d_object_name
-                     << ": Cannot create a coarsen schedule for R restriction!\n");
-        }
-        d_flux_coarsen_schedules[dest_ln] =
-          d_flux_coarsen_algorithm->
-          createSchedule(d_hierarchy->getPatchLevel(dest_ln),
-                         d_hierarchy->getPatchLevel(dest_ln + 1));
-        if (!d_flux_coarsen_schedules[dest_ln]) {
-          TBOX_ERROR(d_object_name
-                     << ": Cannot create a coarsen schedule for flux transfer!\n");
-        }
-      }
-      d_ghostfill_nocoarse_refine_schedules[d_ln_min] =
-        d_ghostfill_nocoarse_refine_algorithm->
-        createSchedule(d_hierarchy->getPatchLevel(d_ln_min),
-                       &d_bc_helper);
-      if (!d_ghostfill_nocoarse_refine_schedules[d_ln_min]) {
-        TBOX_ERROR(
-                   d_object_name
-                   <<
-                   ": Cannot create a refine schedule for ghost filling on bottom level!\n");
-      }
+      createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+                     d_hierarchy->getPatchLevel(dest_ln + 1));
+    if (!d_flux_coarsen_schedules[dest_ln]) {
+      TBOX_ERROR(d_object_name
+                 << ": Cannot create a coarsen schedule for flux transfer!\n");
     }
-
+  }
+  d_ghostfill_nocoarse_refine_schedules[d_ln_min] =
+    d_ghostfill_nocoarse_refine_algorithm->
+    createSchedule(d_hierarchy->getPatchLevel(d_ln_min),
+                   &d_bc_helper);
+  if (!d_ghostfill_nocoarse_refine_schedules[d_ln_min]) {
+    TBOX_ERROR(
+               d_object_name
+               <<
+               ": Cannot create a refine schedule for ghost filling on bottom level!\n");
+  }
+  p_nocoarse_refine_schedules[d_ln_min] =
+    p_nocoarse_refine_algorithm->
+    createSchedule(d_hierarchy->getPatchLevel(d_ln_min),
+                   &d_bc_helper);
+  if (!p_nocoarse_refine_schedules[d_ln_min]) {
+    TBOX_ERROR(
+               d_object_name
+               <<
+               ": Cannot create a refine schedule for p ghost filling on bottom level!\n");
+  }
+  v_nocoarse_refine_schedules[d_ln_min] =
+    v_nocoarse_refine_algorithm->
+    createSchedule(d_hierarchy->getPatchLevel(d_ln_min),
+                   &d_bc_helper);
+  if (!v_nocoarse_refine_schedules[d_ln_min]) {
+    TBOX_ERROR(
+               d_object_name
+               <<
+               ": Cannot create a refine schedule for v ghost filling on bottom level!\n");
   }
 }
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/relax.C
--- a/StokesFACOps/relax.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/relax.C	Wed Jan 05 14:27:14 2011 -0800
@@ -102,7 +102,7 @@ void SAMRAI::solv::StokesFACOps::relax(S
     for(int rb=0;rb<2;++rb)
       {
         // Need to sync
-        // xeqScheduleGhostFillNoCoarse(data_id, ln);
+        xeqScheduleGhostFillNoCoarse(p_id,v_id,ln);
         for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
           tbox::Pointer<hier::Patch> patch = *pi;
 
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/restrictSolution.C
--- a/StokesFACOps/restrictSolution.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/restrictSolution.C	Wed Jan 05 14:27:14 2011 -0800
@@ -66,8 +66,9 @@ namespace SAMRAI {
       d_bc_helper.setTargetDataId(d.getComponentDescriptorIndex(0));
 
       if (dest_ln == d_ln_min) {
-        xeqScheduleGhostFillNoCoarse(d.getComponentDescriptorIndex(0),
-                                     dest_ln);
+        // xeqScheduleGhostFillNoCoarse(d.getComponentDescriptorIndex(0),
+        //                              dest_ln);
+        abort();
       } else {
         xeqScheduleGhostFill(d.getComponentDescriptorIndex(0),
                              dest_ln);
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/smoothErrorByRedBlack.C
--- a/StokesFACOps/smoothErrorByRedBlack.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/smoothErrorByRedBlack.C	Wed Jan 05 14:27:14 2011 -0800
@@ -72,7 +72,8 @@ void SAMRAI::solv::StokesFACOps::smoothE
 
   d_bc_helper.setTargetDataId(data_id);
   d_bc_helper.setHomogeneousBc(true);
-  xeqScheduleGhostFillNoCoarse(data_id, ln);
+  // xeqScheduleGhostFillNoCoarse(data_id, ln);
+  abort();
 
   if (ln > d_ln_min) {
     /*
@@ -101,7 +102,8 @@ void SAMRAI::solv::StokesFACOps::smoothE
     red_maxres = blk_maxres = 0;
 
     // Red sweep.
-    xeqScheduleGhostFillNoCoarse(data_id, ln);
+    // xeqScheduleGhostFillNoCoarse(data_id, ln);
+    abort();
     for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
       tbox::Pointer<hier::Patch> patch = *pi;
 
@@ -147,8 +149,8 @@ void SAMRAI::solv::StokesFACOps::smoothE
         patch->deallocatePatchData(flux_id);
       }
     }        // End patch number *pi
-    xeqScheduleGhostFillNoCoarse(data_id, ln);
-
+    // xeqScheduleGhostFillNoCoarse(data_id, ln);
+    abort();
     // Black sweep.
     for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
       tbox::Pointer<hier::Patch> patch = *pi;
@@ -195,7 +197,8 @@ void SAMRAI::solv::StokesFACOps::smoothE
         patch->deallocatePatchData(flux_id);
       }
     }        // End patch number *pi
-    xeqScheduleGhostFillNoCoarse(data_id, ln);
+    // xeqScheduleGhostFillNoCoarse(data_id, ln);
+    abort();
     if (residual_tolerance >= 0.0) {
       /*
        * Check for early end of sweeps due to convergence
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/solveCoarsestLevel.C
--- a/StokesFACOps/solveCoarsestLevel.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/solveCoarsestLevel.C	Wed Jan 05 14:27:14 2011 -0800
@@ -92,9 +92,9 @@ namespace SAMRAI {
                    "' in scapStokesOps::solveCoarsestLevel.");
       }
 
-      xeqScheduleGhostFillNoCoarse(data.getComponentDescriptorIndex(0),
-                                   coarsest_ln);
-
+      // xeqScheduleGhostFillNoCoarse(data.getComponentDescriptorIndex(0),
+      //                              coarsest_ln);
+      abort();
       t_solve_coarsest->stop();
 
       return return_value;
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACOps/xeqScheduleGhostFillNoCoarse.C
--- a/StokesFACOps/xeqScheduleGhostFillNoCoarse.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACOps/xeqScheduleGhostFillNoCoarse.C	Wed Jan 05 14:27:14 2011 -0800
@@ -40,29 +40,33 @@
 #include "SAMRAI/xfer/RefineSchedule.h"
 #include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
 
-namespace SAMRAI {
-  namespace solv {
+void SAMRAI::solv::StokesFACOps::xeqScheduleGhostFillNoCoarse(int p_id,
+                                                              int v_id,
+                                                              int dest_ln)
+{
+  /* p */
+  {
+    if (!p_nocoarse_refine_schedules[dest_ln]) {
+      TBOX_ERROR("Expected cell schedule not found.");
+    }
+    xfer::RefineAlgorithm refiner(d_dim);
+    refiner.registerRefine(p_id,p_id,p_id,p_nocoarse_refine_operator);
+    refiner.resetSchedule(p_nocoarse_refine_schedules[dest_ln]);
+    p_nocoarse_refine_schedules[dest_ln]->fillData(0.0,false);
+    p_nocoarse_refine_algorithm->
+      resetSchedule(p_nocoarse_refine_schedules[dest_ln]);
+  }
 
-    void
-    StokesFACOps::xeqScheduleGhostFillNoCoarse(
-                                               int dst_id,
-                                               int dest_ln)
-    {
-      if (!d_ghostfill_nocoarse_refine_schedules[dest_ln]) {
-        TBOX_ERROR("Expected schedule not found.");
-      }
-      xfer::RefineAlgorithm refiner(d_dim);
-      refiner.
-        registerRefine(dst_id,
-                       dst_id,
-                       dst_id,
-                       d_ghostfill_nocoarse_refine_operator);
-      refiner.
-        resetSchedule(d_ghostfill_nocoarse_refine_schedules[dest_ln]);
-      d_ghostfill_nocoarse_refine_schedules[dest_ln]->fillData(0.0);
-      d_ghostfill_nocoarse_refine_algorithm->
-        resetSchedule(d_ghostfill_nocoarse_refine_schedules[dest_ln]);
+  /* v */
+  {
+    if (!v_nocoarse_refine_schedules[dest_ln]) {
+      TBOX_ERROR("Expected side schedule not found.");
     }
-
+    xfer::RefineAlgorithm refiner(d_dim);
+    refiner.registerRefine(v_id,v_id,v_id,v_nocoarse_refine_operator);
+    refiner.resetSchedule(v_nocoarse_refine_schedules[dest_ln]);
+    v_nocoarse_refine_schedules[dest_ln]->fillData(0.0,false);
+    v_nocoarse_refine_algorithm->resetSchedule(v_nocoarse_refine_schedules[dest_ln]);
+      
   }
 }
diff -r bbb880a9ab82 -r 12b19d336e95 StokesFACSolver/initializeSolverState.C
--- a/StokesFACSolver/initializeSolverState.C	Wed Jan 05 14:26:51 2011 -0800
+++ b/StokesFACSolver/initializeSolverState.C	Wed Jan 05 14:27:14 2011 -0800
@@ -89,6 +89,8 @@ namespace SAMRAI {
                                      s_weight_id[d_dim.getValue() - 1],
                                      d_ln_min,
                                      d_ln_max);
+      d_fac_ops.set_p_v(p,v);
+
 
       if (d_bc_object == &d_simple_bc) {
         d_simple_bc.setHierarchy(d_hierarchy,
diff -r bbb880a9ab82 -r 12b19d336e95 example_inputs/const_refine.2d.input
--- a/example_inputs/const_refine.2d.input	Wed Jan 05 14:26:51 2011 -0800
+++ b/example_inputs/const_refine.2d.input	Wed Jan 05 14:27:14 2011 -0800
@@ -126,7 +126,8 @@ PatchHierarchy {
       level_2            = 2, 2
    }
    largest_patch_size {
-      level_0 = 32, 32
+      //level_0 = 32, 32
+      level_0 = 8, 8
       // all finer levels will use same values as level_0...
    }
 }



More information about the CIG-COMMITS mailing list