[cig-commits] commit: Remove left-over flux variables etc.
Mercurial
hg at geodynamics.org
Sat Mar 12 05:37:00 PST 2011
changeset: 110:351b8d159b53
user: Walter Landry <wlandry at caltech.edu>
date: Wed Mar 09 00:23:36 2011 -0800
files: StokesFACOps.h StokesFACOps/StokesFACOps.C StokesFACOps/computeCompositeResidualOnLevel.C StokesFACOps/deallocateOperatorState.C StokesFACOps/finalizeCallback.C
description:
Remove left-over flux variables etc.
diff -r 4c50d7d566ce -r 351b8d159b53 StokesFACOps.h
--- a/StokesFACOps.h Tue Mar 08 20:14:39 2011 -0800
+++ b/StokesFACOps.h Wed Mar 09 00:23:36 2011 -0800
@@ -774,27 +774,27 @@ private:
// return dtau_xx_dx_limited + dtau_xy_dy_limited - dp_dx_limited;
- if(axis==0 && center[1]<=2)
- {
- tbox::plog << "v_op "
- << center[0] << " "
- << center[1] << " "
- << axis << " "
- << v(center_x) << " "
- << v(center_y) << " "
- << p(center) << " "
- << (dtau_xx_dx_middle + dtau_xy_dy_middle - dp_dx_middle)
- << " "
- << (v(center_x + ip) - v(center_x)
- + v(center_y+jp) - v(center_y)) << " "
- // << dtau_xx_dx_middle << " "
- // << dtau_xx_dx_limited << " "
- // << dtau_xy_dy_middle << " "
- // << dtau_xy_dy_limited << " "
- // << dp_dx_middle << " "
- // << dp_dx_limited << " "
- << "\n";
- }
+ // if(axis==0 && center[1]<=2)
+ // {
+ // tbox::plog << "v_op "
+ // << center[0] << " "
+ // << center[1] << " "
+ // << axis << " "
+ // << v(center_x) << " "
+ // << v(center_y) << " "
+ // << p(center) << " "
+ // << (dtau_xx_dx_middle + dtau_xy_dy_middle - dp_dx_middle)
+ // << " "
+ // << (v(center_x + ip) - v(center_x)
+ // + v(center_y+jp) - v(center_y)) << " "
+ // // << dtau_xx_dx_middle << " "
+ // // << dtau_xx_dx_limited << " "
+ // // << dtau_xy_dy_middle << " "
+ // // << dtau_xy_dy_limited << " "
+ // // << dp_dx_middle << " "
+ // // << dp_dx_limited << " "
+ // << "\n";
+ // }
return dtau_xx_dx_middle + dtau_xy_dy_middle - dp_dx_middle;
@@ -1163,13 +1163,7 @@ private:
s_cell_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
static tbox::Pointer<pdat::SideVariable<double> >
- s_flux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
-
- static tbox::Pointer<pdat::SideVariable<double> >
s_side_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
-
- static tbox::Pointer<pdat::OutersideVariable<double> >
- s_oflux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
/*!
* @brief Default context of internally maintained hierarchy data.
@@ -1186,27 +1180,6 @@ private:
* to reduce memory usage.
*/
int d_cell_scratch_id, d_side_scratch_id;
-
- /*!
- * @brief ID of the side-centered scratch data.
- *
- * Set in constructor and never changed.
- * Corresponds to a pdat::SideVariable<double> named
- * @c d_object_name+"::flux_scratch".
- *
- * This data is allocated only as needed and deallocated
- * immediately after use.
- */
- int d_flux_scratch_id;
-
- /*!
- * @brief ID of the outerside-centered scratch data.
- *
- * Set in constructor and never changed.
- * Corresponds to a pdat::OutersideVariable<double> named
- * @c d_object_name+"::oflux_scratch".
- */
- int d_oflux_scratch_id;
//@}
diff -r 4c50d7d566ce -r 351b8d159b53 StokesFACOps/StokesFACOps.C
--- a/StokesFACOps/StokesFACOps.C Tue Mar 08 20:14:39 2011 -0800
+++ b/StokesFACOps/StokesFACOps.C Wed Mar 09 00:23:36 2011 -0800
@@ -51,13 +51,7 @@ namespace SAMRAI {
StokesFACOps::s_cell_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
tbox::Pointer<pdat::SideVariable<double> >
- StokesFACOps::s_flux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
-
- tbox::Pointer<pdat::SideVariable<double> >
StokesFACOps::s_side_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
-
- tbox::Pointer<pdat::OutersideVariable<double> >
- StokesFACOps::s_oflux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
tbox::StartupShutdownManager::Handler
StokesFACOps::s_finalize_handler(
@@ -112,8 +106,6 @@ namespace SAMRAI {
->getContext(object_name + "::PRIVATE_CONTEXT")),
d_cell_scratch_id(-1),
d_side_scratch_id(-1),
- d_flux_scratch_id(-1),
- d_oflux_scratch_id(-1),
invalid_id(-1),
p_prolongation_refine_operator(),
p_prolongation_refine_algorithm(),
@@ -188,16 +180,8 @@ namespace SAMRAI {
s_cell_scratch_var[dim.getValue() - 1] = new pdat::CellVariable<double>
(dim, ss.str());
ss.str("");
- ss << "StokesFACOps::private_flux_scratch" << dim.getValue();
- s_flux_scratch_var[dim.getValue() - 1] = new pdat::SideVariable<double>
- (dim, ss.str());
- ss.str("");
ss << "StokesFACOps::private_side_scratch" << dim.getValue();
s_side_scratch_var[dim.getValue() - 1] = new pdat::SideVariable<double>
- (dim, ss.str());
- ss.str("");
- ss << "StokesFACOps::private_oflux_scratch" << dim.getValue();
- s_oflux_scratch_var[dim.getValue() - 1] = new pdat::OutersideVariable<double>
(dim, ss.str());
}
@@ -206,18 +190,10 @@ namespace SAMRAI {
registerVariableAndContext(s_cell_scratch_var[dim.getValue() - 1],
d_context,
hier::IntVector::getOne(dim));
- d_flux_scratch_id = vdb->
- registerVariableAndContext(s_flux_scratch_var[dim.getValue() - 1],
- d_context,
- hier::IntVector::getZero(d_dim));
d_side_scratch_id = vdb->
registerVariableAndContext(s_side_scratch_var[dim.getValue() - 1],
d_context,
hier::IntVector::getOne(d_dim));
- d_oflux_scratch_id = vdb->
- registerVariableAndContext(s_oflux_scratch_var[dim.getValue() - 1],
- d_context,
- hier::IntVector::getZero(d_dim));
/*
* Some variables initialized by default are overriden by input.
diff -r 4c50d7d566ce -r 351b8d159b53 StokesFACOps/computeCompositeResidualOnLevel.C
--- a/StokesFACOps/computeCompositeResidualOnLevel.C Tue Mar 08 20:14:39 2011 -0800
+++ b/StokesFACOps/computeCompositeResidualOnLevel.C Wed Mar 09 00:23:36 2011 -0800
@@ -108,12 +108,6 @@ void SAMRAI::solv::StokesFACOps::compute
// * undergoes transfer operations which require the
// * whole level data.
// */
- // bool deallocate_flux_data_when_done = false;
- // if (flux_id == d_flux_scratch_id) {
- // if (!level->checkAllocated(flux_id)) {
- // level->allocatePatchData(flux_id);
- // deallocate_flux_data_when_done = true;
- // }
/* S1. Fill solution ghost data. */
@@ -146,14 +140,6 @@ void SAMRAI::solv::StokesFACOps::compute
// *soln_data,
// *flux_data);
- // }
-
- // /*
- // * S3. Coarsen oflux data from next finer level so that
- // * the computed flux becomes the composite grid flux.
- // */
- // if (ln < d_ln_max) {
- // xeqScheduleFluxCoarsen(flux_id, d_oflux_scratch_id, ln);
// }
/*
@@ -290,22 +276,6 @@ void SAMRAI::solv::StokesFACOps::compute
// tbox::plog << "\n";
}
}
-
- // if (ln > d_ln_min) {
- // /*
- // * Save outerflux data so that next coarser level
- // * can compute its coarse-fine composite flux.
- // * This is not strictly needed in this "compute residual"
- // * loop through the patches, but we put it here to
- // * avoid writing another loop for it.
- // */
- // tbox::Pointer<pdat::OutersideData<double> >
- // oflux_data = patch->getPatchData(d_oflux_scratch_id);
-
- // TBOX_ASSERT(oflux_data);
-
- // oflux_data->copy(*flux_data);
- // }
}
/* We also need to set the boundaries of the rhs so that coarsening
diff -r 4c50d7d566ce -r 351b8d159b53 StokesFACOps/deallocateOperatorState.C
--- a/StokesFACOps/deallocateOperatorState.C Tue Mar 08 20:14:39 2011 -0800
+++ b/StokesFACOps/deallocateOperatorState.C Wed Mar 09 00:23:36 2011 -0800
@@ -54,11 +54,6 @@ namespace SAMRAI {
void StokesFACOps::deallocateOperatorState()
{
if (d_hierarchy) {
- int ln;
- for (ln = d_ln_min + 1; ln <= d_ln_max; ++ln) {
- d_hierarchy->getPatchLevel(ln)->
- deallocatePatchData(d_oflux_scratch_id);
- }
d_cf_boundary.resizeArray(0);
#ifdef HAVE_HYPRE
d_hypre_solver.deallocateSolverState();
diff -r 4c50d7d566ce -r 351b8d159b53 StokesFACOps/finalizeCallback.C
--- a/StokesFACOps/finalizeCallback.C Tue Mar 08 20:14:39 2011 -0800
+++ b/StokesFACOps/finalizeCallback.C Wed Mar 09 00:23:36 2011 -0800
@@ -49,8 +49,6 @@ namespace SAMRAI {
for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
s_cell_scratch_var[d].setNull();
s_side_scratch_var[d].setNull();
- s_flux_scratch_var[d].setNull();
- s_oflux_scratch_var[d].setNull();
}
}
More information about the CIG-COMMITS
mailing list