[cig-commits] commit: cleanup
Mercurial
hg at geodynamics.org
Fri Feb 25 14:13:13 PST 2011
changeset: 20:5965c55793a9
user: Walter Landry <wlandry at caltech.edu>
date: Sun Jan 02 00:31:33 2011 -0800
files: StokesFACOps/StokesFACOps.C StokesFACOps/checkInputPatchDataIndices.C StokesFACOps/computeCompositeResidualOnLevel.C StokesFACOps/computeFluxOnPatch.C StokesFACOps/computeResidualNorm.C StokesFACOps/computeResidualOnPatch.C StokesFACOps/computeVectorWeights.C StokesFACOps/deallocateOperatorState.C StokesFACOps/ewingFixFlux.C StokesFACOps/finalizeCallback.C StokesFACOps/initializeOperatorState.C StokesFACOps/postprocessOneCycle.C StokesFACOps/prolongErrorAndCorrect.C StokesFACOps/redOrBlackSmoothingOnPatch.C StokesFACOps/restrictResidual.C StokesFACOps/restrictSolution.C StokesFACOps/smoothError.C StokesFACOps/smoothErrorByRedBlack.C StokesFACOps/solveCoarsestLevel.C StokesFACOps/solveCoarsestLevel_HYPRE.C StokesFACOps/xeqScheduleFluxCoarsen.C StokesFACOps/xeqScheduleGhostFill.C StokesFACOps/xeqScheduleGhostFillNoCoarse.C StokesFACOps/xeqScheduleProlongation.C StokesFACOps/xeqScheduleRRestriction.C StokesFACOps/xeqScheduleURestriction.C
description:
cleanup
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/StokesFACOps.C
--- a/StokesFACOps/StokesFACOps.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/StokesFACOps.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -229,4 +226,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/checkInputPatchDataIndices.C
--- a/StokesFACOps/checkInputPatchDataIndices.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/checkInputPatchDataIndices.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -90,4 +87,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/computeCompositeResidualOnLevel.C
--- a/StokesFACOps/computeCompositeResidualOnLevel.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/computeCompositeResidualOnLevel.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -207,4 +204,4 @@ namespace SAMRAI {
}
}
-#endif
+
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/computeFluxOnPatch.C
--- a/StokesFACOps/computeFluxOnPatch.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/computeFluxOnPatch.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -248,4 +245,3 @@ void F77_FUNC(compfluxcondc3d, COMPFLUXC
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/computeResidualNorm.C
--- a/StokesFACOps/computeResidualNorm.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/computeResidualNorm.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -85,4 +82,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/computeResidualOnPatch.C
--- a/StokesFACOps/computeResidualOnPatch.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/computeResidualOnPatch.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -310,4 +307,3 @@ void F77_FUNC(compresconsca3d, COMPRESCO
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/computeVectorWeights.C
--- a/StokesFACOps/computeVectorWeights.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/computeVectorWeights.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -148,4 +145,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/deallocateOperatorState.C
--- a/StokesFACOps/deallocateOperatorState.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/deallocateOperatorState.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -93,4 +90,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/ewingFixFlux.C
--- a/StokesFACOps/ewingFixFlux.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/ewingFixFlux.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -283,4 +280,3 @@ void F77_FUNC(ewingfixfluxcondc3d, EWING
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/finalizeCallback.C
--- a/StokesFACOps/finalizeCallback.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/finalizeCallback.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -58,4 +55,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/initializeOperatorState.C
--- a/StokesFACOps/initializeOperatorState.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/initializeOperatorState.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -417,4 +414,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/postprocessOneCycle.C
--- a/StokesFACOps/postprocessOneCycle.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/postprocessOneCycle.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -81,4 +78,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/prolongErrorAndCorrect.C
--- a/StokesFACOps/prolongErrorAndCorrect.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/prolongErrorAndCorrect.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -111,4 +108,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/redOrBlackSmoothingOnPatch.C
--- a/StokesFACOps/redOrBlackSmoothingOnPatch.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/redOrBlackSmoothingOnPatch.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -597,4 +594,3 @@ void F77_FUNC(rbgswithfluxmaxcondcconsf3
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/restrictResidual.C
--- a/StokesFACOps/restrictResidual.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/restrictResidual.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -68,4 +65,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/restrictSolution.C
--- a/StokesFACOps/restrictSolution.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/restrictSolution.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -81,4 +78,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/smoothError.C
--- a/StokesFACOps/smoothError.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/smoothError.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -78,4 +75,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/smoothErrorByRedBlack.C
--- a/StokesFACOps/smoothErrorByRedBlack.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/smoothErrorByRedBlack.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -43,185 +40,179 @@
#include "SAMRAI/xfer/RefineSchedule.h"
#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
-namespace SAMRAI {
- namespace solv {
-
- /*
+/*
********************************************************************
* Workhorse function to smooth error using red-black *
* Gauss-Seidel iterations. *
********************************************************************
*/
- void StokesFACOps::smoothErrorByRedBlack(
- SAMRAIVectorReal<double>& data,
- const SAMRAIVectorReal<double>& residual,
- int ln,
- int num_sweeps,
- double residual_tolerance)
- {
+void SAMRAI::solv::StokesFACOps::smoothErrorByRedBlack(SAMRAIVectorReal<double>& data,
+ const SAMRAIVectorReal<double>&
+ residual,
+ int ln,
+ int num_sweeps,
+ double residual_tolerance)
+{
- checkInputPatchDataIndices();
+ checkInputPatchDataIndices();
#ifdef DEBUG_CHECK_ASSERTIONS
- if (data.getPatchHierarchy() != d_hierarchy
- || residual.getPatchHierarchy() != d_hierarchy) {
- TBOX_ERROR(d_object_name << ": Vector hierarchy does not match\n"
- "internal hierarchy.");
- }
+ if (data.getPatchHierarchy() != d_hierarchy
+ || residual.getPatchHierarchy() != d_hierarchy) {
+ TBOX_ERROR(d_object_name << ": Vector hierarchy does not match\n"
+ "internal hierarchy.");
+ }
#endif
- tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+ tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
- const int data_id = data.getComponentDescriptorIndex(0);
+ const int data_id = data.getComponentDescriptorIndex(0);
- const int flux_id = (d_flux_id != -1) ? d_flux_id : d_flux_scratch_id;
+ const int flux_id = (d_flux_id != -1) ? d_flux_id : d_flux_scratch_id;
- d_bc_helper.setTargetDataId(data_id);
- d_bc_helper.setHomogeneousBc(true);
- xeqScheduleGhostFillNoCoarse(data_id, ln);
+ d_bc_helper.setTargetDataId(data_id);
+ d_bc_helper.setHomogeneousBc(true);
+ xeqScheduleGhostFillNoCoarse(data_id, ln);
- if (ln > d_ln_min) {
+ if (ln > d_ln_min) {
+ /*
+ * Perform a one-time transfer of data from coarser level,
+ * to fill ghost boundaries that will not change through
+ * the smoothing loop.
+ */
+ xeqScheduleGhostFill(data_id, ln);
+ }
+
+ /*
+ * Smooth the number of sweeps specified or until
+ * the convergence is satisfactory.
+ */
+ int isweep;
+ double red_maxres, blk_maxres, maxres = 0;
+ red_maxres = blk_maxres = residual_tolerance + 1;
+ /*
+ * Instead of checking residual convergence globally,
+ * we check the not_converged flag. This avoids possible
+ * round-off errors affecting different processes differently,
+ * leading to disagreement on whether to continue smoothing.
+ */
+ int not_converged = 1;
+ for (isweep = 0; isweep < num_sweeps && not_converged; ++isweep) {
+ red_maxres = blk_maxres = 0;
+
+ // Red sweep.
+ xeqScheduleGhostFillNoCoarse(data_id, ln);
+ for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
+ tbox::Pointer<hier::Patch> patch = *pi;
+
+ bool deallocate_flux_data_when_done = false;
+ if (flux_id == d_flux_scratch_id) {
/*
- * Perform a one-time transfer of data from coarser level,
- * to fill ghost boundaries that will not change through
- * the smoothing loop.
+ * Using internal temporary storage for flux.
+ * For each patch, make sure the internal
+ * side-centered data is allocated and note
+ * whether that data should be deallocated when done.
*/
- xeqScheduleGhostFill(data_id, ln);
+ if (!patch->checkAllocated(flux_id)) {
+ patch->allocatePatchData(flux_id);
+ deallocate_flux_data_when_done = true;
+ }
}
+ tbox::Pointer<pdat::CellData<double> >
+ scalar_field_data = d_stokes_spec.cIsVariable() ?
+ patch->getPatchData(d_stokes_spec.getCPatchDataId()) :
+ tbox::Pointer<hier::PatchData>(NULL);
+ tbox::Pointer<pdat::CellData<double> >
+ err_data = data.getComponentPatchData(0, *patch);
+ tbox::Pointer<pdat::CellData<double> >
+ residual_data = residual.getComponentPatchData(0, *patch);
+ tbox::Pointer<pdat::SideData<double> >
+ flux_data = patch->getPatchData(flux_id);
+
+ computeFluxOnPatch(
+ *patch,
+ level->getRatioToCoarserLevel(),
+ *err_data,
+ *flux_data);
+
+ redOrBlackSmoothingOnPatch(*patch,
+ *flux_data,
+ *residual_data,
+ *err_data,
+ 'r',
+ &red_maxres);
+
+ if (deallocate_flux_data_when_done) {
+ patch->deallocatePatchData(flux_id);
+ }
+ } // End patch number *pi
+ xeqScheduleGhostFillNoCoarse(data_id, ln);
+
+ // Black sweep.
+ for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
+ tbox::Pointer<hier::Patch> patch = *pi;
+
+ bool deallocate_flux_data_when_done = false;
+ if (flux_id == d_flux_scratch_id) {
+ /*
+ * Using internal temporary storage for flux.
+ * For each patch, make sure the internal
+ * side-centered data is allocated and note
+ * whether that data should be deallocated when done.
+ */
+ if (!patch->checkAllocated(flux_id)) {
+ patch->allocatePatchData(flux_id);
+ deallocate_flux_data_when_done = true;
+ }
+ }
+
+ tbox::Pointer<pdat::CellData<double> >
+ scalar_field_data = d_stokes_spec.cIsVariable() ?
+ patch->getPatchData(d_stokes_spec.getCPatchDataId()) :
+ tbox::Pointer<hier::PatchData>(NULL);
+ tbox::Pointer<pdat::CellData<double> >
+ err_data = data.getComponentPatchData(0, *patch);
+ tbox::Pointer<pdat::CellData<double> >
+ residual_data = residual.getComponentPatchData(0, *patch);
+ tbox::Pointer<pdat::SideData<double> >
+ flux_data = patch->getPatchData(flux_id);
+
+ computeFluxOnPatch(
+ *patch,
+ level->getRatioToCoarserLevel(),
+ *err_data,
+ *flux_data);
+
+ redOrBlackSmoothingOnPatch(*patch,
+ *flux_data,
+ *residual_data,
+ *err_data,
+ 'b',
+ &blk_maxres);
+
+ if (deallocate_flux_data_when_done) {
+ patch->deallocatePatchData(flux_id);
+ }
+ } // End patch number *pi
+ xeqScheduleGhostFillNoCoarse(data_id, ln);
+ if (residual_tolerance >= 0.0) {
/*
- * Smooth the number of sweeps specified or until
- * the convergence is satisfactory.
+ * Check for early end of sweeps due to convergence
+ * only if it is numerically possible (user gave a
+ * non negative value for residual tolerance).
*/
- int isweep;
- double red_maxres, blk_maxres, maxres = 0;
- red_maxres = blk_maxres = residual_tolerance + 1;
- /*
- * Instead of checking residual convergence globally,
- * we check the not_converged flag. This avoids possible
- * round-off errors affecting different processes differently,
- * leading to disagreement on whether to continue smoothing.
- */
- int not_converged = 1;
- for (isweep = 0; isweep < num_sweeps && not_converged; ++isweep) {
- red_maxres = blk_maxres = 0;
+ maxres = tbox::MathUtilities<double>::Max(red_maxres, blk_maxres);
+ not_converged = maxres > residual_tolerance;
+ const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+ if (mpi.getSize() > 1) {
+ mpi.AllReduce(¬_converged, 1, MPI_MAX);
+ }
+ }
+ } // End sweep number isweep
+ if (d_enable_logging) tbox::plog
+ << d_object_name << " RBGS smoothing maxres = " << maxres << "\n"
+ << " after " << isweep << " sweeps.\n";
- // Red sweep.
- xeqScheduleGhostFillNoCoarse(data_id, ln);
- for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
- tbox::Pointer<hier::Patch> patch = *pi;
+}
- bool deallocate_flux_data_when_done = false;
- if (flux_id == d_flux_scratch_id) {
- /*
- * Using internal temporary storage for flux.
- * For each patch, make sure the internal
- * side-centered data is allocated and note
- * whether that data should be deallocated when done.
- */
- if (!patch->checkAllocated(flux_id)) {
- patch->allocatePatchData(flux_id);
- deallocate_flux_data_when_done = true;
- }
- }
-
- tbox::Pointer<pdat::CellData<double> >
- scalar_field_data = d_stokes_spec.cIsVariable() ?
- patch->getPatchData(d_stokes_spec.getCPatchDataId()) :
- tbox::Pointer<hier::PatchData>(NULL);
- tbox::Pointer<pdat::CellData<double> >
- err_data = data.getComponentPatchData(0, *patch);
- tbox::Pointer<pdat::CellData<double> >
- residual_data = residual.getComponentPatchData(0, *patch);
- tbox::Pointer<pdat::SideData<double> >
- flux_data = patch->getPatchData(flux_id);
-
- computeFluxOnPatch(
- *patch,
- level->getRatioToCoarserLevel(),
- *err_data,
- *flux_data);
-
- redOrBlackSmoothingOnPatch(*patch,
- *flux_data,
- *residual_data,
- *err_data,
- 'r',
- &red_maxres);
-
- if (deallocate_flux_data_when_done) {
- patch->deallocatePatchData(flux_id);
- }
- } // End patch number *pi
- xeqScheduleGhostFillNoCoarse(data_id, ln);
-
- // Black sweep.
- for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
- tbox::Pointer<hier::Patch> patch = *pi;
-
- bool deallocate_flux_data_when_done = false;
- if (flux_id == d_flux_scratch_id) {
- /*
- * Using internal temporary storage for flux.
- * For each patch, make sure the internal
- * side-centered data is allocated and note
- * whether that data should be deallocated when done.
- */
- if (!patch->checkAllocated(flux_id)) {
- patch->allocatePatchData(flux_id);
- deallocate_flux_data_when_done = true;
- }
- }
-
- tbox::Pointer<pdat::CellData<double> >
- scalar_field_data = d_stokes_spec.cIsVariable() ?
- patch->getPatchData(d_stokes_spec.getCPatchDataId()) :
- tbox::Pointer<hier::PatchData>(NULL);
- tbox::Pointer<pdat::CellData<double> >
- err_data = data.getComponentPatchData(0, *patch);
- tbox::Pointer<pdat::CellData<double> >
- residual_data = residual.getComponentPatchData(0, *patch);
- tbox::Pointer<pdat::SideData<double> >
- flux_data = patch->getPatchData(flux_id);
-
- computeFluxOnPatch(
- *patch,
- level->getRatioToCoarserLevel(),
- *err_data,
- *flux_data);
-
- redOrBlackSmoothingOnPatch(*patch,
- *flux_data,
- *residual_data,
- *err_data,
- 'b',
- &blk_maxres);
-
- if (deallocate_flux_data_when_done) {
- patch->deallocatePatchData(flux_id);
- }
- } // End patch number *pi
- xeqScheduleGhostFillNoCoarse(data_id, ln);
- if (residual_tolerance >= 0.0) {
- /*
- * Check for early end of sweeps due to convergence
- * only if it is numerically possible (user gave a
- * non negative value for residual tolerance).
- */
- maxres = tbox::MathUtilities<double>::Max(red_maxres, blk_maxres);
- not_converged = maxres > residual_tolerance;
- const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
- if (mpi.getSize() > 1) {
- mpi.AllReduce(¬_converged, 1, MPI_MAX);
- }
- }
- } // End sweep number isweep
- if (d_enable_logging) tbox::plog
- << d_object_name << " RBGS smoothing maxres = " << maxres << "\n"
- << " after " << isweep << " sweeps.\n";
-
- }
-
- }
-}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/solveCoarsestLevel.C
--- a/StokesFACOps/solveCoarsestLevel.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/solveCoarsestLevel.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -105,4 +102,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/solveCoarsestLevel_HYPRE.C
--- a/StokesFACOps/solveCoarsestLevel_HYPRE.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/solveCoarsestLevel_HYPRE.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -98,4 +95,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/xeqScheduleFluxCoarsen.C
--- a/StokesFACOps/xeqScheduleFluxCoarsen.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/xeqScheduleFluxCoarsen.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -69,4 +66,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/xeqScheduleGhostFill.C
--- a/StokesFACOps/xeqScheduleGhostFill.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/xeqScheduleGhostFill.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -69,4 +66,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/xeqScheduleGhostFillNoCoarse.C
--- a/StokesFACOps/xeqScheduleGhostFillNoCoarse.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/xeqScheduleGhostFillNoCoarse.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -69,4 +66,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/xeqScheduleProlongation.C
--- a/StokesFACOps/xeqScheduleProlongation.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/xeqScheduleProlongation.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -71,4 +68,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/xeqScheduleRRestriction.C
--- a/StokesFACOps/xeqScheduleRRestriction.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/xeqScheduleRRestriction.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -68,4 +65,3 @@ namespace SAMRAI {
}
}
-#endif
diff -r 04ca745a8fed -r 5965c55793a9 StokesFACOps/xeqScheduleURestriction.C
--- a/StokesFACOps/xeqScheduleURestriction.C Sun Jan 02 00:12:38 2011 -0800
+++ b/StokesFACOps/xeqScheduleURestriction.C Sun Jan 02 00:31:33 2011 -0800
@@ -7,9 +7,6 @@
* Description: Operator class for cell-centered scalar Stokes using FAC
*
************************************************************************/
-#ifndef included_solv_StokesFACOps_C
-#define included_solv_StokesFACOps_C
-
#include "StokesFACOps.h"
#include IOMANIP_HEADER_FILE
@@ -68,4 +65,3 @@ namespace SAMRAI {
}
}
-#endif
More information about the CIG-COMMITS
mailing list