[cig-commits] commit: Make relax use only the SAMRAIVectorReal instead of passing in p_id etc.

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


changeset:   30:10cc6696de94
user:        Walter Landry <wlandry at caltech.edu>
date:        Fri Jan 07 10:27:53 2011 -0800
files:       StokesFACOps.h StokesFACOps/relax.C StokesFACSolver/solveSystem.C
description:
Make relax use only the SAMRAIVectorReal instead of passing in p_id etc.


diff -r 99b1a4090021 -r 10cc6696de94 StokesFACOps.h
--- a/StokesFACOps.h	Thu Jan 06 19:36:35 2011 -0800
+++ b/StokesFACOps.h	Fri Jan 07 10:27:53 2011 -0800
@@ -423,9 +423,7 @@ public:
              const SAMRAIVectorReal<double>& residual,
              int ln,
              int num_sweeps,
-             double residual_tolerance,
-             const int p_id, const int p_rhs_id,
-             const int v_id, const int v_rhs_id);
+             double residual_tolerance);
 
    //@{ @name FACOperatorStrategy virtuals
 
diff -r 99b1a4090021 -r 10cc6696de94 StokesFACOps/relax.C
--- a/StokesFACOps/relax.C	Thu Jan 06 19:36:35 2011 -0800
+++ b/StokesFACOps/relax.C	Fri Jan 07 10:27:53 2011 -0800
@@ -49,18 +49,21 @@
 ********************************************************************
 */
 
-void SAMRAI::solv::StokesFACOps::relax(SAMRAIVectorReal<double>& data,
+void SAMRAI::solv::StokesFACOps::relax(SAMRAIVectorReal<double>& solution,
                                        const SAMRAIVectorReal<double>& residual,
                                        int ln,
                                        int num_sweeps,
-                                       double residual_tolerance,
-                                       const int p_id, const int p_rhs_id,
-                                       const int v_id, const int v_rhs_id)
+                                       double residual_tolerance)
 {
+  const int p_id(solution.getComponentDescriptorIndex(0)),
+    p_rhs_id(residual.getComponentDescriptorIndex(0)),
+    v_id(solution.getComponentDescriptorIndex(1)),
+    v_rhs_id(residual.getComponentDescriptorIndex(1));
+
   checkInputPatchDataIndices();
 
 #ifdef DEBUG_CHECK_ASSERTIONS
-  if (data.getPatchHierarchy() != d_hierarchy
+  if (solution.getPatchHierarchy() != d_hierarchy
       || residual.getPatchHierarchy() != d_hierarchy) {
     TBOX_ERROR(d_object_name << ": Vector hierarchy does not match\n"
                "internal hierarchy.");
diff -r 99b1a4090021 -r 10cc6696de94 StokesFACSolver/solveSystem.C
--- a/StokesFACSolver/solveSystem.C	Thu Jan 06 19:36:35 2011 -0800
+++ b/StokesFACSolver/solveSystem.C	Fri Jan 07 10:27:53 2011 -0800
@@ -68,7 +68,7 @@ namespace SAMRAI {
 
       // d_fac_ops.relax(*d_uv, *d_fv, 0, 5, 1.0, p, p_rhs, v, v_rhs);
       // d_fac_ops.relax(*d_uv, *d_fv, 1, 5, 1.0, p, p_rhs, v, v_rhs);
-      d_fac_ops.relax(*d_uv, *d_fv, 2, 10, 1.0, p, p_rhs, v, v_rhs);
+      d_fac_ops.relax(*d_uv, *d_fv, 2, 100, 1.0);
       // solver_rval = d_fac_precond.solveSystem(*d_uv, *d_fv);
 
       return solver_rval;



More information about the CIG-COMMITS mailing list