[cig-commits] commit: Lots of cleanup

Mercurial hg at geodynamics.org
Fri Apr 22 14:54:48 PDT 2011


changeset:   189:f14f86a116b2
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Fri Apr 22 14:53:38 2011 -0700
files:       FACStokes/FACStokes.C FACStokes/initializeLevelData.C FACStokes/packDerivedDataIntoDoubleBuffer.C FACStokes/resetHierarchyConfiguration.C FACStokes/setupPlotter.C FACStokes/solveStokes.C StokesFACOps.I StokesFACOps.h StokesFACOps/StokesFACOps.C StokesFACOps/checkInputPatchDataIndices.C StokesFACOps/computeCompositeResidualOnLevel.C StokesFACOps/computeFluxOnPatch.C StokesFACOps/ewingFixFlux.C StokesFACOps/smoothError.C StokesFACOps/smooth_Gerya.C StokesFACOps/smooth_Tackley_2D.C StokesFACOps/smooth_Tackley_3D.C StokesFACOps/solveCoarsestLevel.C StokesFACOps/solveCoarsestLevel_HYPRE.C StokesFACSolver.I StokesFACSolver.h StokesFACSolver/StokesFACSolver.C StokesFACSolver/initializeSolverState.C StokesFACSolver/solveSystem.C StokesHypreSolver.C StokesHypreSolver.h StokesSpecifications.C StokesSpecifications.I StokesSpecifications.h wscript
description:
Lots of cleanup


diff -r 3855931f7410 -r f14f86a116b2 FACStokes/FACStokes.C
--- a/FACStokes/FACStokes.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/FACStokes/FACStokes.C	Fri Apr 22 14:53:38 2011 -0700
@@ -16,7 +16,6 @@
 #include "SAMRAI/pdat/CellData.h"
 #include "SAMRAI/math/HierarchyCellDataOpsReal.h"
 #include "SAMRAI/pdat/SideData.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/tbox/Utilities.h"
 #include "SAMRAI/hier/Variable.h"
 #include "SAMRAI/hier/VariableDatabase.h"
diff -r 3855931f7410 -r f14f86a116b2 FACStokes/initializeLevelData.C
--- a/FACStokes/initializeLevelData.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/FACStokes/initializeLevelData.C	Fri Apr 22 14:53:38 2011 -0700
@@ -8,18 +8,7 @@
  *
  ************************************************************************/
 #include "FACStokes.h"
-
-#include "SAMRAI/hier/IntVector.h"
 #include "SAMRAI/geom/CartesianGridGeometry.h"
-#include "SAMRAI/geom/CartesianPatchGeometry.h"
-#include "SAMRAI/solv/SimpleCellRobinBcCoefs.h"
-#include "SAMRAI/pdat/CellData.h"
-#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
-#include "SAMRAI/pdat/SideData.h"
-#include "StokesSpecifications.h"
-#include "SAMRAI/tbox/Utilities.h"
-#include "SAMRAI/hier/Variable.h"
-#include "SAMRAI/hier/VariableDatabase.h"
 
 /*
 *************************************************************************
@@ -57,7 +46,7 @@ void SAMRAI::FACStokes::initializeLevelD
   }
 
   // const double inclusion_radius=0.5;
-  const double inclusion_viscosity=1;
+  const double inclusion_viscosity=1e2;
   const double background_viscosity=1;
 
   const double background_density(1), block_density(1);
diff -r 3855931f7410 -r f14f86a116b2 FACStokes/packDerivedDataIntoDoubleBuffer.C
--- a/FACStokes/packDerivedDataIntoDoubleBuffer.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/FACStokes/packDerivedDataIntoDoubleBuffer.C	Fri Apr 22 14:53:38 2011 -0700
@@ -16,7 +16,6 @@
 #include "SAMRAI/pdat/CellData.h"
 #include "SAMRAI/math/HierarchyCellDataOpsReal.h"
 #include "SAMRAI/pdat/SideData.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/tbox/Utilities.h"
 #include "SAMRAI/hier/Variable.h"
 #include "SAMRAI/hier/VariableDatabase.h"
diff -r 3855931f7410 -r f14f86a116b2 FACStokes/resetHierarchyConfiguration.C
--- a/FACStokes/resetHierarchyConfiguration.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/FACStokes/resetHierarchyConfiguration.C	Fri Apr 22 14:53:38 2011 -0700
@@ -16,7 +16,6 @@
 #include "SAMRAI/pdat/CellData.h"
 #include "SAMRAI/math/HierarchyCellDataOpsReal.h"
 #include "SAMRAI/pdat/SideData.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/tbox/Utilities.h"
 #include "SAMRAI/hier/Variable.h"
 #include "SAMRAI/hier/VariableDatabase.h"
diff -r 3855931f7410 -r f14f86a116b2 FACStokes/setupPlotter.C
--- a/FACStokes/setupPlotter.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/FACStokes/setupPlotter.C	Fri Apr 22 14:53:38 2011 -0700
@@ -16,7 +16,6 @@
 #include "SAMRAI/pdat/CellData.h"
 #include "SAMRAI/math/HierarchyCellDataOpsReal.h"
 #include "SAMRAI/pdat/SideData.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/tbox/Utilities.h"
 #include "SAMRAI/hier/Variable.h"
 #include "SAMRAI/hier/VariableDatabase.h"
diff -r 3855931f7410 -r f14f86a116b2 FACStokes/solveStokes.C
--- a/FACStokes/solveStokes.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/FACStokes/solveStokes.C	Fri Apr 22 14:53:38 2011 -0700
@@ -16,7 +16,6 @@
 #include "SAMRAI/pdat/CellData.h"
 #include "SAMRAI/math/HierarchyCellDataOpsReal.h"
 #include "SAMRAI/pdat/SideData.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/tbox/Utilities.h"
 #include "SAMRAI/hier/Variable.h"
 #include "SAMRAI/hier/VariableDatabase.h"
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps.I
--- a/StokesFACOps.I	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps.I	Fri Apr 22 14:53:38 2011 -0700
@@ -48,19 +48,6 @@ void StokesFACOps::setUseSMG(
 //    d_hypre_solver.setPhysicalBcCoefObject(d_physical_bc_coef);
 // #endif
 // }
-
-/*
- ********************************************************************
- * Set the object specifying the parameters of the Stokes equation *
- ********************************************************************
- */
-
-SAMRAI_INLINE_KEYWORD
-void StokesFACOps::setStokesSpecifications(
-   const StokesSpecifications& spec)
-{
-   d_stokes_spec = spec;
-}
 
 /*
  ********************************************************************
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps.h
--- a/StokesFACOps.h	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps.h	Fri Apr 22 14:53:38 2011 -0700
@@ -16,7 +16,6 @@
 #include "SAMRAI/solv/FACOperatorStrategy.h"
 #include "StokesHypreSolver.h"
 #include "SAMRAI/solv/SAMRAIVectorReal.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/math/HierarchyCellDataOpsReal.h"
 #include "SAMRAI/math/HierarchySideDataOpsReal.h"
 #include "SAMRAI/pdat/CellData.h"
@@ -139,13 +138,6 @@ public:
     * Deallocate internal data.
     */
    ~StokesFACOps(void) {}
-
-   /*!
-    * @brief Set the scalar Stokes equation specifications.
-    */
-   void
-   setStokesSpecifications(
-      const StokesSpecifications& spec);
 
    /*!
     * @brief Enable logging.
@@ -330,25 +322,6 @@ public:
    // setPhysicalBcCoefObject(
    //    const RobinBcCoefStrategy* physical_bc_coef);
 
-   //@{
-
-   /*!
-    * @name Functions for checking validity and correctness of state.
-    */
-
-   /*!
-    * @brief Check validity and correctness of input patch data indices.
-    *
-    * Descriptors checked:
-    * -# Diffusion coefficient (see setDiffcoefId())
-    * -# Flux (see setFluxId())
-    * -# Source (see setScalarFieldId())
-    */
-   void
-   checkInputPatchDataIndices() const;
-
-   //@}
-
    /*!
     * @brief Set weight appropriate for computing vector norms.
     *
@@ -391,43 +364,6 @@ public:
    void
    setPreconditioner(
       const FACPreconditioner* preconditioner);
-
-   /*!
-    * @brief function to compute flux, using general diffusion
-    * coefficient data.
-    *
-    * Recall that this solver class discretizes the PDE
-    * @f[ \nabla \cdot D \nabla u + C u = f @f] on an AMR grid.  This member
-    * function allows users of this solver class to compute gradient
-    * terms, @f[ D \nabla w @f], in their code in a manner consistent with the
-    * solver discretization.   In particular, when solving PDE systems, it may
-    * be necessary to discretize the gradient operator appearing in equations
-    * not treated by the solver class in the same way as those treated by this
-    * class.  These funtions allow users to do this easily.  The divergence
-    * operator used in this solver is the standard sum of centered differences
-    * involving flux terms on the cell sides computed by these routines.
-    *
-    * Note that the patch must exist on a level in an AMR hierarchy so that
-    * the discretization can be computed properly at the coarse-fine interface.
-    * Stokes coefficients C and D must exist on the patch, if they are variable.
-    * Also, calling this function does not affect the internal solver state in any
-    * way.  However, the solver must be fully initialized before it is called and care
-    * should be exercised to pass arguments so that the solver solution quantity and
-    * other internal solver quantities are not adversely affected.
-    *
-    * @param patch patch on which computation will take place
-    * @param ratio_to_coarser_level refinement ratio from coarser level to level
-    *                               on which patch lives; if current patch level
-    *                               is level zero, this is ignored
-    * @param w_data cell-centered data
-    * @param Dgradw_data side-centered flux data (i.e., D (grad w))
-    */
-   void
-   computeFluxOnPatch(
-      const hier::Patch& patch,
-      const hier::IntVector& ratio_to_coarser_level,
-      const pdat::CellData<double>& w_data,
-      pdat::SideData<double>& Dgradw_data) const;
 
    //@{ @name FACOperatorStrategy virtuals
 
@@ -690,33 +626,6 @@ private:
       int ln);
 
    /*!
-    * @brief Fix flux per Ewing's coarse-fine boundary treatment.
-    *
-    * Ewing's coarse-fine boundary treatment can be implemented
-    * using a constant refinement into the fine-grid ghost boundary,
-    * naively computing the flux using the constant-refined data then
-    * fixing up the flux to correct the error.
-    *
-    * To use this function
-    * -# you must use constant refinement to fill the fine level ghost cells
-    * -# the flux must first be computed and stored
-    *
-    * @param patch patch
-    * @param soln_data cell-centered solution data
-    * @param flux_data side-centered flux data
-    * @param diffcoef_data side-centered diffusion coefficient data
-    * @param cfb coarse-fine boundary object for the level
-    *        in which patch resides
-    * @param ratio_to_coarser Refinement ratio to the next coarser level.
-    */
-   void
-   ewingFixFlux(
-      const hier::Patch& patch,
-      const pdat::CellData<double>& soln_data,
-      pdat::SideData<double>& flux_data,
-      const hier::IntVector& ratio_to_coarser) const;
-
-   /*!
     * @brief AMR-unaware function to red or black smoothing on a single patch,
     * for variable diffusion coefficient and variable scalar field.
     *
@@ -940,12 +849,6 @@ private:
     */
 
    /*!
-    * @brief Scalar Stokes equations specifications.
-    * @see setStokesSpecifications().
-    */
-   StokesSpecifications d_stokes_spec;
-
-   /*!
     * @brief Smoothing choice.
     * @see setSmoothingChoice.
     */
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/StokesFACOps.C
--- a/StokesFACOps/StokesFACOps.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/StokesFACOps.C	Fri Apr 22 14:53:38 2011 -0700
@@ -75,7 +75,6 @@ namespace SAMRAI {
       d_ln_min(-1),
       d_ln_max(-1),
       d_cf_boundary(),
-      d_stokes_spec(object_name + "::Stokes specs"),
       d_smoothing_choice("Tackley"),
       d_coarse_solver_choice(
 #ifdef HAVE_HYPRE
@@ -215,12 +214,6 @@ namespace SAMRAI {
                                        d_enable_logging);
 
       }
-
-      /*
-       * Check input validity and correctness.
-       */
-      checkInputPatchDataIndices();
-
     }
 
   }
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/checkInputPatchDataIndices.C
--- a/StokesFACOps/checkInputPatchDataIndices.C	Fri Apr 22 14:53:20 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*************************************************************************
- *
- * This file is part of the SAMRAI distribution.  For full copyright 
- * information, see COPYRIGHT and COPYING.LESSER. 
- *
- * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
- * Description:   Operator class for cell-centered scalar Stokes using FAC 
- *
- ************************************************************************/
-#include "StokesFACOps.h"
-
-#include IOMANIP_HEADER_FILE
-
-#include "SAMRAI/hier/BoundaryBoxUtils.h"
-#include "SAMRAI/geom/CartesianGridGeometry.h"
-#include "SAMRAI/geom/CartesianPatchGeometry.h"
-#include "SAMRAI/hier/Index.h"
-#include "SAMRAI/hier/Variable.h"
-#include "SAMRAI/hier/VariableDatabase.h"
-#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
-#include "SAMRAI/pdat/CellVariable.h"
-#include "SAMRAI/pdat/OutersideData.h"
-#include "SAMRAI/pdat/OutersideVariable.h"
-#include "SAMRAI/hier/PatchData.h"
-#include "SAMRAI/pdat/SideVariable.h"
-#include "SAMRAI/solv/FACPreconditioner.h"
-#include "StokesHypreSolver.h"
-#include "SAMRAI/tbox/Array.h"
-#include "SAMRAI/tbox/MathUtilities.h"
-#include "SAMRAI/tbox/StartupShutdownManager.h"
-#include "SAMRAI/tbox/Timer.h"
-#include "SAMRAI/tbox/TimerManager.h"
-#include "SAMRAI/tbox/Utilities.h"
-#include "SAMRAI/tbox/MathUtilities.h"
-#include "SAMRAI/xfer/CoarsenAlgorithm.h"
-#include "SAMRAI/xfer/CoarsenOperator.h"
-#include "SAMRAI/xfer/CoarsenSchedule.h"
-#include "SAMRAI/xfer/RefineAlgorithm.h"
-#include "SAMRAI/xfer/RefineOperator.h"
-#include "SAMRAI/xfer/RefineSchedule.h"
-#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
-
-namespace SAMRAI {
-  namespace solv {
-
-    /*
-********************************************************************
-* Check the validity and correctness of input data for this class. *
-********************************************************************
-*/
-
-    void StokesFACOps::checkInputPatchDataIndices() const {
-      /*
-       * Check input validity and correctness.
-       */
-      hier::VariableDatabase& vdb(*hier::VariableDatabase::getDatabase());
-
-      if (!d_stokes_spec.dIsConstant()
-          && d_stokes_spec.getDPatchDataId() != -1) {
-        tbox::Pointer<hier::Variable> var;
-        vdb.mapIndexToVariable(d_stokes_spec.getDPatchDataId(), var);
-        tbox::Pointer<pdat::SideVariable<double> > diffcoef_var = var;
-        if (!diffcoef_var) {
-          TBOX_ERROR(d_object_name
-                     << ": Bad diffusion coefficient patch data index.");
-        }
-      }
-
-      if (!d_stokes_spec.cIsConstant() && !d_stokes_spec.cIsZero()) {
-        tbox::Pointer<hier::Variable> var;
-        vdb.mapIndexToVariable(d_stokes_spec.getCPatchDataId(), var);
-        tbox::Pointer<pdat::CellVariable<double> > scalar_field_var = var;
-        if (!scalar_field_var) {
-          TBOX_ERROR(d_object_name << ": Bad linear term patch data index.");
-        }
-      }
-    }
-
-  }
-}
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/computeCompositeResidualOnLevel.C
--- a/StokesFACOps/computeCompositeResidualOnLevel.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/computeCompositeResidualOnLevel.C	Fri Apr 22 14:53:38 2011 -0700
@@ -9,7 +9,6 @@ void SAMRAI::solv::StokesFACOps::compute
 
   t_compute_composite_residual->start();
 
-  checkInputPatchDataIndices();
 #ifdef DEBUG_CHECK_ASSERTIONS
   if (residual.getPatchHierarchy() != d_hierarchy
       || solution.getPatchHierarchy() != d_hierarchy
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/computeFluxOnPatch.C
--- a/StokesFACOps/computeFluxOnPatch.C	Fri Apr 22 14:53:20 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-/*************************************************************************
- *
- * This file is part of the SAMRAI distribution.  For full copyright 
- * information, see COPYRIGHT and COPYING.LESSER. 
- *
- * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
- * Description:   Operator class for cell-centered scalar Stokes using FAC 
- *
- ************************************************************************/
-#include "StokesFACOps.h"
-
-#include IOMANIP_HEADER_FILE
-
-#include "SAMRAI/hier/BoundaryBoxUtils.h"
-#include "SAMRAI/geom/CartesianGridGeometry.h"
-#include "SAMRAI/geom/CartesianPatchGeometry.h"
-#include "SAMRAI/hier/Index.h"
-#include "SAMRAI/hier/Variable.h"
-#include "SAMRAI/hier/VariableDatabase.h"
-#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
-#include "SAMRAI/pdat/CellVariable.h"
-#include "SAMRAI/pdat/OutersideData.h"
-#include "SAMRAI/pdat/OutersideVariable.h"
-#include "SAMRAI/hier/PatchData.h"
-#include "SAMRAI/pdat/SideVariable.h"
-#include "SAMRAI/solv/FACPreconditioner.h"
-#include "StokesHypreSolver.h"
-#include "SAMRAI/tbox/Array.h"
-#include "SAMRAI/tbox/MathUtilities.h"
-#include "SAMRAI/tbox/StartupShutdownManager.h"
-#include "SAMRAI/tbox/Timer.h"
-#include "SAMRAI/tbox/TimerManager.h"
-#include "SAMRAI/tbox/Utilities.h"
-#include "SAMRAI/tbox/MathUtilities.h"
-#include "SAMRAI/xfer/CoarsenAlgorithm.h"
-#include "SAMRAI/xfer/CoarsenOperator.h"
-#include "SAMRAI/xfer/CoarsenSchedule.h"
-#include "SAMRAI/xfer/RefineAlgorithm.h"
-#include "SAMRAI/xfer/RefineOperator.h"
-#include "SAMRAI/xfer/RefineSchedule.h"
-#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
-
-namespace SAMRAI {
-  namespace solv {
-
-extern "C" {
-
-void F77_FUNC(compfluxvardc2d, COMPFLUXVARDC2D) (
-   double* xflux,
-   double* yflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const double* xdiff_coef,
-   const double* ydiff_coef,
-   const int* dcgi,
-   const int* dcgj,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const double* dx);
-void F77_FUNC(compfluxcondc2d, COMPFLUXCONDC2D) (
-   double* xflux,
-   double* yflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const double & diff_coef,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const double* dx);
-
-void F77_FUNC(compfluxvardc3d, COMPFLUXVARDC3D) (
-   double* xflux,
-   double* yflux,
-   double* zflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const int* fluxgk,
-   const double* xdiff_coef,
-   const double* ydiff_coef,
-   const double* zdiff_coef,
-   const int* dcgi,
-   const int* dcgj,
-   const int* dcgk,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* solngk,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const int* kfirst,
-   const int* klast,
-   const double* dx);
-void F77_FUNC(compfluxcondc3d, COMPFLUXCONDC3D) (
-   double* xflux,
-   double* yflux,
-   double* zflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const int* fluxgk,
-   const double & diff_coef,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* solngk,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const int* kfirst,
-   const int* klast,
-   const double* dx);
-
-}
-    /*
-*******************************************************************
-*                                                                 *
-* AMR-unaware patch-centered computational kernels.               *
-*                                                                 *
-*******************************************************************
-*/
-
-    void StokesFACOps::computeFluxOnPatch(
-                                          const hier::Patch& patch,
-                                          const hier::IntVector& ratio_to_coarser_level,
-                                          const pdat::CellData<double>& w_data,
-                                          pdat::SideData<double>& Dgradw_data) const
-    {
-      TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim, patch, ratio_to_coarser_level, w_data,
-                                      Dgradw_data);
-      TBOX_ASSERT(patch.inHierarchy());
-      TBOX_ASSERT(w_data.getGhostCellWidth() >=
-                  hier::IntVector::getOne(ratio_to_coarser_level.getDim()));
-
-      tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
-        patch.getPatchGeometry();
-      const hier::Box& box = patch.getBox();
-      const int* lower = &box.lower()[0];
-      const int* upper = &box.upper()[0];
-      const double* dx = patch_geom->getDx();
-
-      double D_value;
-      tbox::Pointer<pdat::SideData<double> > D_data;
-      if (d_stokes_spec.dIsConstant()) {
-        D_value = d_stokes_spec.getDConstant();
-      } else {
-        D_data = patch.getPatchData(d_stokes_spec.getDPatchDataId());
-      }
-
-      if (d_stokes_spec.dIsConstant()) {
-        if (d_dim == tbox::Dimension(2)) {
-          F77_FUNC(compfluxcondc2d, COMPFLUXCONDC2D) (
-                                                      Dgradw_data.getPointer(0),
-                                                      Dgradw_data.getPointer(1),
-                                                      &Dgradw_data.getGhostCellWidth()[0],
-                                                      &Dgradw_data.getGhostCellWidth()[1],
-                                                      D_value,
-                                                      w_data.getPointer(),
-                                                      &w_data.getGhostCellWidth()[0],
-                                                      &w_data.getGhostCellWidth()[1],
-                                                      &lower[0], &upper[0],
-                                                      &lower[1], &upper[1],
-                                                      dx);
-        } else if (d_dim == tbox::Dimension(3)) {
-          F77_FUNC(compfluxcondc3d, COMPFLUXCONDC3D) (
-                                                      Dgradw_data.getPointer(0),
-                                                      Dgradw_data.getPointer(1),
-                                                      Dgradw_data.getPointer(2),
-                                                      &Dgradw_data.getGhostCellWidth()[0],
-                                                      &Dgradw_data.getGhostCellWidth()[1],
-                                                      &Dgradw_data.getGhostCellWidth()[2],
-                                                      D_value,
-                                                      w_data.getPointer(),
-                                                      &w_data.getGhostCellWidth()[0],
-                                                      &w_data.getGhostCellWidth()[1],
-                                                      &w_data.getGhostCellWidth()[2],
-                                                      &lower[0], &upper[0],
-                                                      &lower[1], &upper[1],
-                                                      &lower[2], &upper[2],
-                                                      dx);
-        }
-      } else {
-        if (d_dim == tbox::Dimension(2)) {
-          F77_FUNC(compfluxvardc2d, COMPFLUXVARDC2D) (
-                                                      Dgradw_data.getPointer(0),
-                                                      Dgradw_data.getPointer(1),
-                                                      &Dgradw_data.getGhostCellWidth()[0],
-                                                      &Dgradw_data.getGhostCellWidth()[1],
-                                                      D_data->getPointer(0),
-                                                      D_data->getPointer(1),
-                                                      &D_data->getGhostCellWidth()[0],
-                                                      &D_data->getGhostCellWidth()[1],
-                                                      w_data.getPointer(),
-                                                      &w_data.getGhostCellWidth()[0],
-                                                      &w_data.getGhostCellWidth()[1],
-                                                      &lower[0], &upper[0],
-                                                      &lower[1], &upper[1],
-                                                      dx);
-        }
-        if (d_dim == tbox::Dimension(3)) {
-          F77_FUNC(compfluxvardc3d, COMPFLUXVARDC3D) (
-                                                      Dgradw_data.getPointer(0),
-                                                      Dgradw_data.getPointer(1),
-                                                      Dgradw_data.getPointer(2),
-                                                      &Dgradw_data.getGhostCellWidth()[0],
-                                                      &Dgradw_data.getGhostCellWidth()[1],
-                                                      &Dgradw_data.getGhostCellWidth()[2],
-                                                      D_data->getPointer(0),
-                                                      D_data->getPointer(1),
-                                                      D_data->getPointer(2),
-                                                      &D_data->getGhostCellWidth()[0],
-                                                      &D_data->getGhostCellWidth()[1],
-                                                      &D_data->getGhostCellWidth()[2],
-                                                      w_data.getPointer(),
-                                                      &w_data.getGhostCellWidth()[0],
-                                                      &w_data.getGhostCellWidth()[1],
-                                                      &w_data.getGhostCellWidth()[2],
-                                                      &lower[0], &upper[0],
-                                                      &lower[1], &upper[1],
-                                                      &lower[2], &upper[2],
-                                                      dx);
-        }
-      }
-
-      const int patch_ln = patch.getPatchLevelNumber();
-
-      if (d_cf_discretization == "Ewing" && patch_ln > d_ln_min) {
-        ewingFixFlux(patch,
-                     w_data,
-                     Dgradw_data,
-                     ratio_to_coarser_level);
-      }
-
-    }
-
-  }
-}
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/ewingFixFlux.C
--- a/StokesFACOps/ewingFixFlux.C	Fri Apr 22 14:53:20 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-/*************************************************************************
- *
- * This file is part of the SAMRAI distribution.  For full copyright 
- * information, see COPYRIGHT and COPYING.LESSER. 
- *
- * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
- * Description:   Operator class for cell-centered scalar Stokes using FAC 
- *
- ************************************************************************/
-#include "StokesFACOps.h"
-
-#include IOMANIP_HEADER_FILE
-
-#include "SAMRAI/hier/BoundaryBoxUtils.h"
-#include "SAMRAI/geom/CartesianGridGeometry.h"
-#include "SAMRAI/geom/CartesianPatchGeometry.h"
-#include "SAMRAI/hier/Index.h"
-#include "SAMRAI/hier/Variable.h"
-#include "SAMRAI/hier/VariableDatabase.h"
-#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
-#include "SAMRAI/pdat/CellVariable.h"
-#include "SAMRAI/pdat/OutersideData.h"
-#include "SAMRAI/pdat/OutersideVariable.h"
-#include "SAMRAI/hier/PatchData.h"
-#include "SAMRAI/pdat/SideVariable.h"
-#include "SAMRAI/solv/FACPreconditioner.h"
-#include "StokesHypreSolver.h"
-#include "SAMRAI/tbox/Array.h"
-#include "SAMRAI/tbox/MathUtilities.h"
-#include "SAMRAI/tbox/StartupShutdownManager.h"
-#include "SAMRAI/tbox/Timer.h"
-#include "SAMRAI/tbox/TimerManager.h"
-#include "SAMRAI/tbox/Utilities.h"
-#include "SAMRAI/tbox/MathUtilities.h"
-#include "SAMRAI/xfer/CoarsenAlgorithm.h"
-#include "SAMRAI/xfer/CoarsenOperator.h"
-#include "SAMRAI/xfer/CoarsenSchedule.h"
-#include "SAMRAI/xfer/RefineAlgorithm.h"
-#include "SAMRAI/xfer/RefineOperator.h"
-#include "SAMRAI/xfer/RefineSchedule.h"
-#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
-
-namespace SAMRAI {
-  namespace solv {
-
-extern "C" {
-void F77_FUNC(ewingfixfluxvardc2d, EWINGFIXFLUXVARDC2D) (
-   const double* xflux,
-   const double* yflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const double* xdiff_coef,
-   const double* ydiff_coef,
-   const int* dcgi,
-   const int* dcgj,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const int* location_index,
-   const int* ratio_to_coarser,
-   const int* blower,
-   const int* bupper,
-   const double* dx);
-void F77_FUNC(ewingfixfluxcondc2d, EWINGFIXFLUXCONDC2D) (
-   const double* xflux,
-   const double* yflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const double & diff_coef,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const int* location_index,
-   const int* ratio_to_coarser,
-   const int* blower,
-   const int* bupper,
-   const double* dx);
-
-void F77_FUNC(ewingfixfluxvardc3d, EWINGFIXFLUXVARDC3D) (
-   const double* xflux,
-   const double* yflux,
-   const double* zflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const int* fluxgk,
-   const double* xdiff_coef,
-   const double* ydiff_coef,
-   const double* zdiff_coef,
-   const int* dcgi,
-   const int* dcgj,
-   const int* dcgk,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* solngk,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const int* kfirst,
-   const int* klast,
-   const int* location_index,
-   const int* ratio_to_coarser,
-   const int* blower,
-   const int* bupper,
-   const double* dx);
-void F77_FUNC(ewingfixfluxcondc3d, EWINGFIXFLUXCONDC3D) (
-   const double* xflux,
-   const double* yflux,
-   const double* zflux,
-   const int* fluxgi,
-   const int* fluxgj,
-   const int* fluxgk,
-   const double & diff_coef,
-   const double* soln,
-   const int* solngi,
-   const int* solngj,
-   const int* solngk,
-   const int* ifirst,
-   const int* ilast,
-   const int* jfirst,
-   const int* jlast,
-   const int* kfirst,
-   const int* klast,
-   const int* location_index,
-   const int* ratio_to_coarser,
-   const int* blower,
-   const int* bupper,
-   const double* dx);
-}
-    /*
-********************************************************************
-* Fix flux on coarse-fine boundaries computed from a               *
-* constant-refine interpolation of coarse level data.              *
-********************************************************************
-*/
-
-    void StokesFACOps::ewingFixFlux(
-                                    const hier::Patch& patch,
-                                    const pdat::CellData<double>& soln_data,
-                                    pdat::SideData<double>& flux_data,
-                                    const hier::IntVector& ratio_to_coarser) const
-    {
-      TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim, patch, soln_data, flux_data,
-                                      ratio_to_coarser);
-
-      const int patch_ln = patch.getPatchLevelNumber();
-      const hier::GlobalId id = patch.getGlobalId();
-      tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
-        patch.getPatchGeometry();
-      const double* dx = patch_geom->getDx();
-      const hier::Box& patch_box(patch.getBox());
-      const hier::Index& plower = patch_box.lower();
-      const hier::Index& pupper = patch_box.upper();
-
-      const tbox::Array<hier::BoundaryBox>& bboxes =
-        d_cf_boundary[patch_ln]->getBoundaries(id, 1);
-      int bn, nboxes = bboxes.getSize();
-
-      if (d_stokes_spec.dIsVariable()) {
-
-        tbox::Pointer<pdat::SideData<double> > diffcoef_data;
-        diffcoef_data = patch.getPatchData(d_stokes_spec.getDPatchDataId());
-
-        for (bn = 0; bn < nboxes; ++bn) {
-          const hier::BoundaryBox& boundary_box = bboxes[bn];
-
-          TBOX_ASSERT(boundary_box.getBoundaryType() == 1);
-
-          const hier::Box& bdry_box = boundary_box.getBox();
-          const hier::Index& blower = bdry_box.lower();
-          const hier::Index& bupper = bdry_box.upper();
-          const int location_index = boundary_box.getLocationIndex();
-          if (d_dim == tbox::Dimension(2)) {
-            F77_FUNC(ewingfixfluxvardc2d, EWINGFIXFLUXVARDC2D) (
-                                                                flux_data.getPointer(0), flux_data.getPointer(1),
-                                                                &flux_data.getGhostCellWidth()[0],
-                                                                &flux_data.getGhostCellWidth()[1],
-                                                                diffcoef_data->getPointer(0), diffcoef_data->getPointer(1),
-                                                                &diffcoef_data->getGhostCellWidth()[0],
-                                                                &diffcoef_data->getGhostCellWidth()[1],
-                                                                soln_data.getPointer(),
-                                                                &soln_data.getGhostCellWidth()[0],
-                                                                &soln_data.getGhostCellWidth()[1],
-                                                                &plower[0], &pupper[0], &plower[1], &pupper[1],
-                                                                &location_index,
-                                                                &ratio_to_coarser[0],
-                                                                &blower[0], &bupper[0],
-                                                                dx);
-          } else if (d_dim == tbox::Dimension(3)) {
-            F77_FUNC(ewingfixfluxvardc3d, EWINGFIXFLUXVARDC3D) (
-                                                                flux_data.getPointer(0),
-                                                                flux_data.getPointer(1),
-                                                                flux_data.getPointer(2),
-                                                                &flux_data.getGhostCellWidth()[0],
-                                                                &flux_data.getGhostCellWidth()[1],
-                                                                &flux_data.getGhostCellWidth()[2],
-                                                                diffcoef_data->getPointer(0),
-                                                                diffcoef_data->getPointer(1),
-                                                                diffcoef_data->getPointer(2),
-                                                                &diffcoef_data->getGhostCellWidth()[0],
-                                                                &diffcoef_data->getGhostCellWidth()[1],
-                                                                &diffcoef_data->getGhostCellWidth()[2],
-                                                                soln_data.getPointer(),
-                                                                &soln_data.getGhostCellWidth()[0],
-                                                                &soln_data.getGhostCellWidth()[1],
-                                                                &soln_data.getGhostCellWidth()[2],
-                                                                &plower[0], &pupper[0],
-                                                                &plower[1], &pupper[1],
-                                                                &plower[2], &pupper[2],
-                                                                &location_index,
-                                                                &ratio_to_coarser[0],
-                                                                &blower[0], &bupper[0],
-                                                                dx);
-          } else {
-            TBOX_ERROR("StokesFACOps : DIM > 3 not supported" << std::endl);
-          }
-
-        }
-      } else {
-
-        const double diffcoef_constant = d_stokes_spec.getDConstant();
-
-        for (bn = 0; bn < nboxes; ++bn) {
-          const hier::BoundaryBox& boundary_box = bboxes[bn];
-
-          TBOX_ASSERT(boundary_box.getBoundaryType() == 1);
-
-          const hier::Box& bdry_box = boundary_box.getBox();
-          const hier::Index& blower = bdry_box.lower();
-          const hier::Index& bupper = bdry_box.upper();
-          const int location_index = boundary_box.getLocationIndex();
-          if (d_dim == tbox::Dimension(2)) {
-            F77_FUNC(ewingfixfluxcondc2d, EWINGFIXFLUXCONDC2D) (
-                                                                flux_data.getPointer(0), flux_data.getPointer(1),
-                                                                &flux_data.getGhostCellWidth()[0],
-                                                                &flux_data.getGhostCellWidth()[1],
-                                                                diffcoef_constant,
-                                                                soln_data.getPointer(),
-                                                                &soln_data.getGhostCellWidth()[0],
-                                                                &soln_data.getGhostCellWidth()[1],
-                                                                &plower[0], &pupper[0],
-                                                                &plower[1], &pupper[1],
-                                                                &location_index,
-                                                                &ratio_to_coarser[0],
-                                                                &blower[0], &bupper[0],
-                                                                dx);
-          } else if (d_dim == tbox::Dimension(3)) {
-            F77_FUNC(ewingfixfluxcondc3d, EWINGFIXFLUXCONDC3D) (
-                                                                flux_data.getPointer(0),
-                                                                flux_data.getPointer(1),
-                                                                flux_data.getPointer(2),
-                                                                &flux_data.getGhostCellWidth()[0],
-                                                                &flux_data.getGhostCellWidth()[1],
-                                                                &flux_data.getGhostCellWidth()[2],
-                                                                diffcoef_constant,
-                                                                soln_data.getPointer(),
-                                                                &soln_data.getGhostCellWidth()[0],
-                                                                &soln_data.getGhostCellWidth()[1],
-                                                                &soln_data.getGhostCellWidth()[2],
-                                                                &plower[0], &pupper[0],
-                                                                &plower[1], &pupper[1],
-                                                                &plower[2], &pupper[2],
-                                                                &location_index,
-                                                                &ratio_to_coarser[0],
-                                                                &blower[0], &bupper[0],
-                                                                dx);
-          }
-        }
-      }
-    }
-
-  }
-}
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/smoothError.C
--- a/StokesFACOps/smoothError.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/smoothError.C	Fri Apr 22 14:53:38 2011 -0700
@@ -53,7 +53,6 @@ void SAMRAI::solv::StokesFACOps::smoothE
 {
   t_smooth_error->start();
 
-  checkInputPatchDataIndices();
   if (d_smoothing_choice == "Gerya") {
     smooth_Gerya(data,residual,ln,num_sweeps,
                  d_residual_tolerance_during_smoothing);
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/smooth_Gerya.C
--- a/StokesFACOps/smooth_Gerya.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/smooth_Gerya.C	Fri Apr 22 14:53:38 2011 -0700
@@ -20,8 +20,6 @@ void SAMRAI::solv::StokesFACOps::smooth_
     p_rhs_id(residual.getComponentDescriptorIndex(0)),
     v_id(solution.getComponentDescriptorIndex(1)),
     v_rhs_id(residual.getComponentDescriptorIndex(1));
-
-  checkInputPatchDataIndices();
 
 #ifdef DEBUG_CHECK_ASSERTIONS
   if (solution.getPatchHierarchy() != d_hierarchy
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/smooth_Tackley_2D.C
--- a/StokesFACOps/smooth_Tackley_2D.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/smooth_Tackley_2D.C	Fri Apr 22 14:53:38 2011 -0700
@@ -19,8 +19,6 @@ void SAMRAI::solv::StokesFACOps::smooth_
     p_rhs_id(residual.getComponentDescriptorIndex(0)),
     v_id(solution.getComponentDescriptorIndex(1)),
     v_rhs_id(residual.getComponentDescriptorIndex(1));
-
-  checkInputPatchDataIndices();
 
 #ifdef DEBUG_CHECK_ASSERTIONS
   if (solution.getPatchHierarchy() != d_hierarchy
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/smooth_Tackley_3D.C
--- a/StokesFACOps/smooth_Tackley_3D.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/smooth_Tackley_3D.C	Fri Apr 22 14:53:38 2011 -0700
@@ -19,8 +19,6 @@ void SAMRAI::solv::StokesFACOps::smooth_
     p_rhs_id(residual.getComponentDescriptorIndex(0)),
     v_id(solution.getComponentDescriptorIndex(1)),
     v_rhs_id(residual.getComponentDescriptorIndex(1));
-
-  checkInputPatchDataIndices();
 
 #ifdef DEBUG_CHECK_ASSERTIONS
   if (solution.getPatchHierarchy() != d_hierarchy
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/solveCoarsestLevel.C
--- a/StokesFACOps/solveCoarsestLevel.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/solveCoarsestLevel.C	Fri Apr 22 14:53:38 2011 -0700
@@ -54,8 +54,6 @@ int SAMRAI::solv::StokesFACOps::solveCoa
 {
   t_solve_coarsest->start();
 
-  checkInputPatchDataIndices();
-
   int return_value = 0;
 
   if (d_coarse_solver_choice == "Tackley"
diff -r 3855931f7410 -r f14f86a116b2 StokesFACOps/solveCoarsestLevel_HYPRE.C
--- a/StokesFACOps/solveCoarsestLevel_HYPRE.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACOps/solveCoarsestLevel_HYPRE.C	Fri Apr 22 14:53:38 2011 -0700
@@ -68,7 +68,6 @@ namespace SAMRAI {
 
 #else
 
-      checkInputPatchDataIndices();
       d_hypre_solver.setStoppingCriteria(d_coarse_solver_max_iterations,
                                          d_coarse_solver_tolerance);
       const int solver_ret =
diff -r 3855931f7410 -r f14f86a116b2 StokesFACSolver.I
--- a/StokesFACSolver.I	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACSolver.I	Fri Apr 22 14:53:38 2011 -0700
@@ -9,38 +9,6 @@
  ************************************************************************/
 namespace SAMRAI {
 namespace solv {
-
-SAMRAI_INLINE_KEYWORD
-void StokesFACSolver::setDPatchDataId(
-   int id) {
-   d_stokes_spec.setDPatchDataId(id);
-}
-
-SAMRAI_INLINE_KEYWORD
-void StokesFACSolver::setDConstant(
-   double scalar) {
-   d_stokes_spec.setDConstant(scalar);
-}
-
-SAMRAI_INLINE_KEYWORD
-void StokesFACSolver::setCPatchDataId(
-   int id) {
-   d_stokes_spec.setCPatchDataId(id);
-}
-
-SAMRAI_INLINE_KEYWORD
-void StokesFACSolver::setCConstant(
-   double scalar) {
-// Disable Intel warning on real comparison
-#ifdef __INTEL_COMPILER
-#pragma warning (disable:1572)
-#endif
-   if (scalar == 0.0) {
-      d_stokes_spec.setCZero();
-   } else {
-      d_stokes_spec.setCConstant(scalar);
-   }
-}
 
 SAMRAI_INLINE_KEYWORD
 void StokesFACSolver::set_P_ProlongationMethod(
diff -r 3855931f7410 -r f14f86a116b2 StokesFACSolver.h
--- a/StokesFACSolver.h	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACSolver.h	Fri Apr 22 14:53:38 2011 -0700
@@ -14,7 +14,6 @@
 
 #include "SAMRAI/solv/FACPreconditioner.h"
 #include "StokesFACOps.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/solv/SimpleCellRobinBcCoefs.h"
 #include "SAMRAI/tbox/Database.h"
 #include "SAMRAI/tbox/Pointer.h"
@@ -617,11 +616,6 @@ private:
    std::string d_object_name;
 
    /*!
-    * @brief Object holding the specifications of the Stokes equation.
-    */
-   StokesSpecifications d_stokes_spec;
-
-   /*!
     * @brief FAC operator implementation corresponding to cell-centered
     * Stokes discretization.
     */
diff -r 3855931f7410 -r f14f86a116b2 StokesFACSolver/StokesFACSolver.C
--- a/StokesFACSolver/StokesFACSolver.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACSolver/StokesFACSolver.C	Fri Apr 22 14:53:38 2011 -0700
@@ -59,7 +59,6 @@ namespace SAMRAI {
                                      tbox::Pointer<tbox::Database> database):
       d_dim(dim),
       d_object_name(object_name),
-      d_stokes_spec(object_name + "::stokes_spec"),
       d_fac_ops(d_dim, object_name + "::fac_ops",database),
       d_fac_precond(object_name + "::fac_precond", d_fac_ops),
       d_bc_object(NULL),
diff -r 3855931f7410 -r f14f86a116b2 StokesFACSolver/initializeSolverState.C
--- a/StokesFACSolver/initializeSolverState.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACSolver/initializeSolverState.C	Fri Apr 22 14:53:38 2011 -0700
@@ -95,14 +95,7 @@ void SAMRAI::solv::StokesFACSolver::init
     d_simple_bc.setHierarchy(d_hierarchy,
                              d_ln_min,
                              d_ln_max);
-    if (d_stokes_spec.dIsConstant()) {
-      d_simple_bc.setDiffusionCoefConstant(d_stokes_spec.getDConstant());
-    } else {
-      d_simple_bc.setDiffusionCoefId(d_stokes_spec.getDPatchDataId());
-    }
   }
-
-  d_fac_ops.setStokesSpecifications(d_stokes_spec);
 
   d_fac_ops.set_viscosity_dp_id(cell_viscosity,edge_viscosity,dp);
 
diff -r 3855931f7410 -r f14f86a116b2 StokesFACSolver/solveSystem.C
--- a/StokesFACSolver/solveSystem.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesFACSolver/solveSystem.C	Fri Apr 22 14:53:38 2011 -0700
@@ -99,7 +99,6 @@ bool SAMRAI::solv::StokesFACSolver::solv
   if (d_enable_logging) {
     tbox::plog << "StokesFACSolver::solveSystem (" << d_object_name
                << ")\n";
-    d_stokes_spec.printClassData(tbox::plog);
   }
 #ifdef DEBUG_CHECK_ASSERTIONS
   if (d_solver_is_initialized) {
diff -r 3855931f7410 -r f14f86a116b2 StokesHypreSolver.C
--- a/StokesHypreSolver.C	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesHypreSolver.C	Fri Apr 22 14:53:38 2011 -0700
@@ -720,8 +720,7 @@ void StokesHypreSolver::copyFromHypre(
  *************************************************************************
  */
 
-void StokesHypreSolver::setMatrixCoefficients(
-   const StokesSpecifications& spec)
+void StokesHypreSolver::setMatrixCoefficients()
 {
    if (d_physical_bc_coef_strategy == NULL) {
       TBOX_ERROR(
@@ -778,27 +777,6 @@ void StokesHypreSolver::setMatrixCoeffic
       const hier::Index patch_lo = patch_box.lower();
       const hier::Index patch_up = patch_box.upper();
 
-      if (!spec.cIsZero() && !spec.cIsConstant()) {
-         C_data = patch.getPatchData(spec.getCPatchDataId());
-         if (C_data.isNull()) {
-            TBOX_ERROR(d_object_name << ": Invalid cell variable index "
-                                     << spec.getCPatchDataId()
-                                     << " for the C parameter.  It is not\n"
-                                     << "cell-centered double data.");
-         }
-      }
-
-      if (!spec.dIsConstant()) {
-         D_data = patch.getPatchData(spec.getDPatchDataId());
-         if (D_data.isNull()) {
-            TBOX_ERROR(d_object_name << ": Invalid cell variable index "
-                                     << spec.getDPatchDataId()
-                                     <<
-               " for diffusion coefficient.  It is not\n"
-                                     << "side-centered double data.");
-         }
-      }
-
       Ak0 = patch.getPatchData(d_Ak0_id);
 
       Ak0->fillAll(0.0);
@@ -829,41 +807,22 @@ void StokesHypreSolver::setMatrixCoeffic
        * These off-diagonal entries are simply D/(h*h), according
        * to our central difference formula.
        */
-      if (spec.dIsConstant()) {
-         for (i = 0; i < d_dim.getValue(); ++i) {
-            double dhh = spec.getDConstant() / (h[i] * h[i]);
-            pdat::ArrayData<double>& off_diag_array(off_diagonal.getArrayData(i));
-            off_diag_array.fill(dhh);
-         }
-      } else {
-         for (i = 0; i < d_dim.getValue(); ++i) {
-            hier::Box sbox(patch_box);
-            sbox.growUpper(i, 1);
-            array_math.scale(off_diagonal.getArrayData(i),
-               1.0 / (h[i] * h[i]),
-               D_data->getArrayData(i),
-               sbox);
-         }
+      for (i = 0; i < d_dim.getValue(); ++i) {
+        hier::Box sbox(patch_box);
+        sbox.growUpper(i, 1);
+        array_math.scale(off_diagonal.getArrayData(i),
+                         1.0 / (h[i] * h[i]),
+                         D_data->getArrayData(i),
+                         sbox);
       }
 
       /*
        * Compute diagonal entries using off-diagonal contributions.
        */
-      if (spec.cIsZero()) {
-         computeDiagonalEntries(diagonal,
-            off_diagonal,
-            patch_box);
-      } else if (spec.cIsConstant()) {
-         computeDiagonalEntries(diagonal,
-            spec.getCConstant(),
-            off_diagonal,
-            patch_box);
-      } else {
-         computeDiagonalEntries(diagonal,
-            *C_data,
-            off_diagonal,
-            patch_box);
-      }
+      computeDiagonalEntries(diagonal,
+                             *C_data,
+                             off_diagonal,
+                             patch_box);
 
       /*
        * Walk physical domain boundaries and adjust off-diagonals
diff -r 3855931f7410 -r f14f86a116b2 StokesHypreSolver.h
--- a/StokesHypreSolver.h	Fri Apr 22 14:53:20 2011 -0700
+++ b/StokesHypreSolver.h	Fri Apr 22 14:53:38 2011 -0700
@@ -30,7 +30,6 @@
 
 #include "SAMRAI/solv/GhostCellRobinBcCoefs.h"
 #include "SAMRAI/solv/RobinBcCoefStrategy.h"
-#include "StokesSpecifications.h"
 #include "SAMRAI/solv/SimpleCellRobinBcCoefs.h"
 #include "SAMRAI/pdat/CellData.h"
 #include "SAMRAI/pdat/SideData.h"
@@ -144,8 +143,7 @@ public:
     * This method must be called before solveSystem().
     */
    void
-   setMatrixCoefficients(
-      const StokesSpecifications& spec);
+   setMatrixCoefficients();
 
    /*!
     * @brief Set default depth of the solution data involved in the solve.
diff -r 3855931f7410 -r f14f86a116b2 StokesSpecifications.C
--- a/StokesSpecifications.C	Fri Apr 22 14:53:20 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*************************************************************************
- *
- * This file is part of the SAMRAI distribution.  For full copyright 
- * information, see COPYRIGHT and COPYING.LESSER. 
- *
- * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
- * Description:   Specifications for the scalar Stokes equation 
- *
- ************************************************************************/
-#include "StokesSpecifications.h"
-
-#ifndef SAMRAI_INLINE
-#include "StokesSpecifications.I"
-#endif
-
-namespace SAMRAI {
-namespace solv {
-
-void StokesSpecifications::printClassData(
-   std::ostream& stream) const
-{
-   stream << "StokesSpecifications " << d_object_name << "\n"
-          << "   D is ";
-   if (d_D_id != -1) {
-      stream << "variable with patch id " << d_D_id << "\n";
-   } else {
-      stream << "constant with value " << d_D_constant << "\n";
-   }
-   stream << "   C is ";
-   if (d_C_zero) {
-      stream << "zero\n";
-   } else if (d_C_id != -1) {
-      stream << "variable with patch id " << d_C_id << "\n";
-   } else {
-      stream << "constant with value " << d_C_constant << "\n";
-   }
-}
-
-} // namespace solv
-} // namespace SAMRAI
diff -r 3855931f7410 -r f14f86a116b2 StokesSpecifications.I
--- a/StokesSpecifications.I	Fri Apr 22 14:53:20 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,259 +0,0 @@
-/*************************************************************************
- *
- * This file is part of the SAMRAI distribution.  For full copyright 
- * information, see COPYRIGHT and COPYING.LESSER. 
- *
- * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
- * Description:   Specifications for the scalar Stokes equation 
- *
- ************************************************************************/
-#include "SAMRAI/tbox/Utilities.h"
-#include "SAMRAI/tbox/Pointer.h"
-
-namespace SAMRAI {
-namespace solv {
-
-/*
- *******************************************************************
- * Default constructor                                             *
- *******************************************************************
- */
-
-SAMRAI_INLINE_KEYWORD
-StokesSpecifications::StokesSpecifications(
-   const std::string& object_name):d_object_name(object_name),
-   d_D_id(-1),
-   d_D_constant(1.0),
-   d_C_zero(true),
-   d_C_id(-1),
-   d_C_constant(0.0) {
-}
-
-/*
- *******************************************************************
- * Copy constructor                                                *
- *******************************************************************
- */
-
-SAMRAI_INLINE_KEYWORD
-StokesSpecifications::StokesSpecifications(
-   const std::string& object_name,
-   const StokesSpecifications& r):d_object_name(object_name),
-   d_D_id(r.d_D_id),
-   d_D_constant(r.d_D_constant),
-   d_C_zero(r.d_C_zero),
-   d_C_id(r.d_C_id),
-   d_C_constant(r.d_C_constant) {
-}
-
-/*
- *******************************************************************
- * Destructor (does nothing).                                      *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-StokesSpecifications::~StokesSpecifications() {
-}
-
-/*
- *******************************************************************
- * Assignment operator                                             *
- *******************************************************************
- */
-
-SAMRAI_INLINE_KEYWORD
-const StokesSpecifications
-& StokesSpecifications::operator = (
-   const StokesSpecifications& r) {
-   d_D_id = r.d_D_id;
-   d_D_constant = r.d_D_constant;
-   d_C_zero = r.d_C_zero;
-   d_C_id = r.d_C_id;
-   d_C_constant = r.d_C_constant;
-   return *this;
-}
-
-/*
- *******************************************************************
- * Set the patch data index for variable D.                        *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-void StokesSpecifications::setDPatchDataId(
-   int id) {
-#ifdef DEBUG_CHECK_ASSERTIONS
-   if (id < 0) {
-      TBOX_ERROR(d_object_name << ": Invalid patch data id.\n");
-   }
-#endif
-   d_D_id = id;
-   d_D_constant = 0.0;
-}
-
-/*
- *******************************************************************
- * Set the constant value variable D.                              *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-void StokesSpecifications::setDConstant(
-   double constant) {
-   d_D_id = -1;
-   d_D_constant = constant;
-}
-
-/*
- *******************************************************************
- * Whether D is variable.                                          *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-bool StokesSpecifications::dIsVariable() const {
-   return d_D_id != -1;
-}
-
-/*
- *******************************************************************
- * Whether D is constant.                                          *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-bool StokesSpecifications::dIsConstant() const {
-   return d_D_id == -1;
-}
-
-/*
- *******************************************************************
- * Get the patch data index for variable D.                        *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-int StokesSpecifications::getDPatchDataId() const {
-#ifdef DEBUG_CHECK_ASSERTIONS
-   if (d_D_id == -1) {
-      TBOX_ERROR(d_object_name << ": D not prepresented by a patch data.\n");
-   }
-#endif
-   return d_D_id;
-}
-
-/*
- *******************************************************************
- * Get the constant D value.                                       *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-double StokesSpecifications::getDConstant() const {
-#ifdef DEBUG_CHECK_ASSERTIONS
-   if (d_D_id != -1) {
-      TBOX_ERROR(d_object_name << ": D not prepresented by a constant.\n");
-   }
-#endif
-   return d_D_constant;
-}
-
-/*
- *******************************************************************
- * Set the constant value variable C.                              *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-void StokesSpecifications::setCPatchDataId(
-   int id) {
-#ifdef DEBUG_CHECK_ASSERTIONS
-   if (id < 0) {
-      TBOX_ERROR(d_object_name << ": Invalid patch data id.\n");
-   }
-#endif
-   d_C_zero = false;
-   d_C_id = id;
-   d_C_constant = 0.0;
-}
-
-/*
- *******************************************************************
- * Set the patch data index for variable C.                        *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-void StokesSpecifications::setCConstant(
-   double constant) {
-   d_C_zero = false;
-   d_C_id = -1;
-   d_C_constant = constant;
-}
-
-/*
- *******************************************************************
- * Set the value of C to zero.                                     *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-void StokesSpecifications::setCZero() {
-   d_C_zero = true;
-   d_C_id = -1;
-   d_C_constant = 0.0;
-}
-
-/*
- *******************************************************************
- * Whether C is variable.                                          *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-bool StokesSpecifications::cIsVariable() const {
-   return d_C_id != -1;
-}
-
-/*
- *******************************************************************
- * Whether C is zero.                                              *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-bool StokesSpecifications::cIsZero() const {
-   return d_C_zero;
-}
-
-/*
- *******************************************************************
- * Whether C is constant.                                          *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-bool StokesSpecifications::cIsConstant() const {
-   return !d_C_zero && (d_C_id == -1);
-}
-
-/*
- *******************************************************************
- * Get the patch data index for variable C.                        *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-int StokesSpecifications::getCPatchDataId() const {
-#ifdef DEBUG_CHECK_ASSERTIONS
-   if (d_C_id == -1) {
-      TBOX_ERROR(d_object_name << ": C not prepresented by a an index.\n");
-   }
-#endif
-   return d_C_id;
-}
-
-/*
- *******************************************************************
- * Get the constant C value.                                       *
- *******************************************************************
- */
-SAMRAI_INLINE_KEYWORD
-double StokesSpecifications::getCConstant() const {
-#ifdef DEBUG_CHECK_ASSERTIONS
-   if (d_C_id != -1 || d_C_zero) {
-      TBOX_ERROR(d_object_name << ": C is not prepresented by a constant.\n");
-   }
-#endif
-   return d_C_constant;
-}
-
-} // namespace SAMRAI
-}
diff -r 3855931f7410 -r f14f86a116b2 StokesSpecifications.h
--- a/StokesSpecifications.h	Fri Apr 22 14:53:20 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*************************************************************************
- *
- * This file is part of the SAMRAI distribution.  For full copyright 
- * information, see COPYRIGHT and COPYING.LESSER. 
- *
- * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
- * Description:   Specifications for the scalar Stokes equation 
- *
- ************************************************************************/
-#ifndef included_solv_StokesSpecifications
-#define included_solv_StokesSpecifications
-
-#include "SAMRAI/SAMRAI_config.h"
-
-#include <string>
-
-namespace SAMRAI {
-namespace solv {
-
-/*!
- * @brief Light class holding specifications for cell-centered
- * implementation of the scalar Stokes equation.
- *
- * The scalar Stokes equation is
- * @f$ \nabla ( D \nabla u ) + C u = f @f$,
- * where C is a scalar field, D is the diffusion coefficient.
- * and u and f are scalar quantities.
- *
- * This class describes the things you can set: C, D.
- *
- * Note that the storage and alignment of u, f, C and D depend
- * on the implementation of the solver.  For example, if the
- * solver is cell centered, u, f and C are cell-centered while
- * D is side-centered.
- */
-
-class StokesSpecifications
-{
-public:
-   /*!
-    * @brief Constructor.
-    *
-    * Sets the specifications to their default state:
-    * - C is zero
-    * - D is uniformly 1
-    *
-    * @param object_name Name of object.
-    */
-   StokesSpecifications(
-      const std::string& object_name);
-
-   /*!
-    * @brief Copy constructor.
-    */
-   StokesSpecifications(
-      const std::string& object_name,
-      const StokesSpecifications& r);
-
-   /*!
-    * @brief Destructor (does nothing).
-    */
-   virtual ~StokesSpecifications();
-
-   /*!
-    * @brief Assignment operator
-    *
-    * Assign everything except name.
-    */
-   const StokesSpecifications&
-   operator = (
-      const StokesSpecifications& r);
-
-   /*!
-    * @brief Print out class data.
-    */
-   virtual void
-   printClassData(
-      std::ostream& stream) const;
-
-   //@{
-   //! @name Functions for setting and getting D
-
-   /*!
-    * @brief Set the patch data index for variable D.
-    *
-    * In addition, disregard any previous value
-    * specified by setDConstant().
-    */
-   void
-   setDPatchDataId(
-      int id);
-
-   /*!
-    * @brief Set the constant value variable D.
-    *
-    * In addition, disregard any previous patch data index
-    * specified by setDPatchDataId().
-    */
-   void
-   setDConstant(
-      double constant);
-
-   /*!
-    * @brief Whether D is variable (described by a patch data id).
-    *
-    * @return True if D is variable, described by the patch data
-    *         id given in setCPatchDataId().
-    */
-   bool
-   dIsVariable() const;
-
-   /*!
-    * @brief Whether D is constant.
-    *
-    * @return True if D is constant, as specified by setCConstant().
-    */
-   bool
-   dIsConstant() const;
-
-   /*!
-    * @brief Get D's patch data id
-    *
-    * Error if D is not represented by a patch data id.
-    *
-    * @return D's id
-    */
-   int
-   getDPatchDataId() const;
-
-   /*!
-    * @brief Get D constant value
-    *
-    * Error if D is not represented by a constant.
-    *
-    * @return D's constant value
-    */
-   double
-   getDConstant() const;
-
-   //@}
-
-   //@{
-   //! @name Functions for setting and getting C
-
-   /*!
-    * @brief Set the patch data index for C.
-    *
-    * In addition, disregard any previous values
-    * specified by setCConstant() or setCZero().
-    */
-   void
-   setCPatchDataId(
-      int id);
-
-   /*!
-    * @brief Set C to a constant.
-    *
-    * In addition, disregard any previous value
-    * specified by setCPatchDataId() or setCZero().
-    *
-    * If you want to set C to zero, use setCZero() instead.
-    * This allows solvers to take advantage of fact C is absent.
-    */
-   void
-   setCConstant(
-      double constant);
-
-   /*!
-    * @brief Set the value of C to zero.
-    *
-    * In addition, disregard any previous patch data index
-    * specified by setCPatchDataId() and any previous constant
-    * specified by setCConstant().
-    */
-   void
-   setCZero();
-
-   /*!
-    * @brief Whether C is variable (described by a patch data id).
-    *
-    * @return True if C is variable, described by the patch data
-    *         id given in setCPatchDataId().
-    */
-   bool
-   cIsVariable() const;
-
-   /*!
-    * @brief Whether C is zero.
-    *
-    * As it pertains to what this function returns,
-    * C is zero @em only by calling setCZero().
-    * Calling setCConstant() does @em not make C zero,
-    * even if you pass in the value of zero.
-    *
-    * @return True if C is exactly zero, as set by setCZero().
-    */
-   bool
-   cIsZero() const;
-
-   /*!
-    * @brief Whether C is constant.
-    *
-    * As it pertains to what this function returns,
-    * C is constant @em only by calling setCConstant().
-    * Calling setCZero() does @em not make C a constant.
-    *
-    * @return True if C is constant, as specified by setCConstant().
-    */
-   bool
-   cIsConstant() const;
-
-   /*!
-    * @brief Get C's patch data id
-    *
-    * Error if C is not represented by a patch data id.
-    *
-    * @return C's patch data id
-    */
-   int
-   getCPatchDataId() const;
-
-   /*!
-    * @brief Get C as a constant value.
-    *
-    * Error if C is not represented by a constant.
-    *
-    * @return C's constant value
-    */
-   double
-   getCConstant() const;
-
-   //@}
-
-private:
-   /*!
-    * @brief Object name.
-    */
-   std::string d_object_name;
-
-   int d_D_id;
-   double d_D_constant;
-
-   bool d_C_zero;
-   int d_C_id;
-   double d_C_constant;
-
-};
-
-} // namespace SAMRAI
-}
-
-#ifdef SAMRAI_INLINE
-#include "StokesSpecifications.I"
-#endif
-
-#endif
diff -r 3855931f7410 -r f14f86a116b2 wscript
--- a/wscript	Fri Apr 22 14:53:20 2011 -0700
+++ b/wscript	Fri Apr 22 14:53:38 2011 -0700
@@ -33,15 +33,12 @@ def build(bld):
                         'Edge_Viscosity_Coarsen.C',
                         'set_boundary.C',
                         'StokesFACOps/StokesFACOps.C',
-                        'StokesFACOps/checkInputPatchDataIndices.C',
                         'StokesFACOps/computeCompositeResidualOnLevel.C',
                         'StokesFACOps/residual_2D.C',
                         'StokesFACOps/residual_3D.C',
-                        'StokesFACOps/computeFluxOnPatch.C',
                         'StokesFACOps/computeResidualNorm.C',
                         'StokesFACOps/computeVectorWeights.C',
                         'StokesFACOps/deallocateOperatorState.C',
-                        'StokesFACOps/ewingFixFlux.C',
                         'StokesFACOps/finalizeCallback.C',
                         'StokesFACOps/initializeOperatorState.C',
                         'StokesFACOps/postprocessOneCycle.C',
@@ -74,8 +71,7 @@ def build(bld):
                         'StokesFACSolver/setBcObject.C',
                         'StokesFACSolver/setBoundaries.C',
                         'StokesFACSolver/solveSystem.C',
-                        'StokesHypreSolver.C',
-                        'StokesSpecifications.C'],
+                        'StokesHypreSolver.C'],
 
         target       = 'gamr',
         # cxxflags      = ['-std=c++0x','-g','-D_GLIBCXX_DEBUG'],



More information about the CIG-COMMITS mailing list