[cig-commits] commit: Get rid of a lot of compiler warnings.
Mercurial
hg at geodynamics.org
Sat Mar 12 05:37:08 PST 2011
changeset: 114:61f1ba62bedf
user: Walter Landry <wlandry at caltech.edu>
date: Fri Mar 11 10:59:45 2011 -0800
files: FACStokes/solveStokes.C P_Refine_Patch_Strategy.C P_Refine_Patch_Strategy.h StokesFACOps.h StokesFACOps/Update_V.C StokesFACOps/smooth_Tackley.C StokesFACSolver.h StokesFACSolver/solveSystem.C V_Boundary_Refine/Update_V.C V_Coarsen_Patch_Strategy.C V_Coarsen_Patch_Strategy.h V_Refine_Patch_Strategy.C V_Refine_Patch_Strategy.h
description:
Get rid of a lot of compiler warnings.
diff -r 576b39c7e446 -r 61f1ba62bedf FACStokes/solveStokes.C
--- a/FACStokes/solveStokes.C Thu Mar 10 20:44:11 2011 -0800
+++ b/FACStokes/solveStokes.C Fri Mar 11 10:59:45 2011 -0800
@@ -63,13 +63,11 @@ int SAMRAI::FACStokes::solveStokes()
tbox::plog << "solving..." << std::endl;
int solver_ret;
- solver_ret = d_stokes_fac_solver.solveSystem(p_id,cell_viscosity_id,
- edge_viscosity_id,dp_id,
- p_rhs_id,v_id,v_rhs_id);
+ solver_ret = d_stokes_fac_solver.solveSystem(p_id,p_rhs_id,v_id,v_rhs_id);
/*
* Present data on the solve.
*/
- double avg_factor, final_factor;
+ // double avg_factor, final_factor;
// d_stokes_fac_solver.getConvergenceFactors(avg_factor, final_factor);
// tbox::plog << "\t" << (solver_ret ? "" : "NOT ") << "converged " << "\n"
// << " iterations: "
diff -r 576b39c7e446 -r 61f1ba62bedf P_Refine_Patch_Strategy.C
--- a/P_Refine_Patch_Strategy.C Thu Mar 10 20:44:11 2011 -0800
+++ b/P_Refine_Patch_Strategy.C Fri Mar 11 10:59:45 2011 -0800
@@ -5,10 +5,10 @@
void
SAMRAI::solv::P_Refine_Patch_Strategy::preprocessRefine
-(hier::Patch& fine,
+(hier::Patch& ,
const hier::Patch& coarse,
- const hier::Box& fine_box,
- const hier::IntVector& ratio)
+ const hier::Box& ,
+ const hier::IntVector& )
{
tbox::Pointer<pdat::CellData<double> >
p = coarse.getPatchData(p_id);
diff -r 576b39c7e446 -r 61f1ba62bedf P_Refine_Patch_Strategy.h
--- a/P_Refine_Patch_Strategy.h Thu Mar 10 20:44:11 2011 -0800
+++ b/P_Refine_Patch_Strategy.h Fri Mar 11 10:59:45 2011 -0800
@@ -53,9 +53,9 @@ public:
virtual void
setPhysicalBoundaryConditions(
- hier::Patch& patch,
- const double fill_time,
- const hier::IntVector& ghost_width_to_fill) {}
+ hier::Patch& ,
+ const double ,
+ const hier::IntVector& ) {}
hier::IntVector
getRefineOpStencilWidth() const
{ return hier::IntVector::getOne(d_dim); }
@@ -73,16 +73,16 @@ public:
virtual void
postprocessRefineBoxes(
- hier::Patch& fine,
- const hier::Patch& coarse,
- const hier::BoxList& fine_boxes,
- const hier::IntVector& ratio) {}
+ hier::Patch& ,
+ const hier::Patch& ,
+ const hier::BoxList& ,
+ const hier::IntVector& ) {}
virtual void
postprocessRefine(
- hier::Patch& fine,
- const hier::Patch& coarse,
- const hier::Box& fine_box,
- const hier::IntVector& ratio) {}
+ hier::Patch& ,
+ const hier::Patch& ,
+ const hier::Box& ,
+ const hier::IntVector& ) {}
//@}
diff -r 576b39c7e446 -r 61f1ba62bedf StokesFACOps.h
--- a/StokesFACOps.h Thu Mar 10 20:44:11 2011 -0800
+++ b/StokesFACOps.h Fri Mar 11 10:59:45 2011 -0800
@@ -513,8 +513,6 @@ private:
* @name Private workhorse functions.
*/
- const int invalid_id;
-
/*!
* @brief Red-black Gauss-Seidel error smoothing on a level.
*
@@ -966,6 +964,8 @@ private:
*/
int d_cell_scratch_id, d_side_scratch_id;
+ const int invalid_id;
+
//@}
//@{
diff -r 576b39c7e446 -r 61f1ba62bedf StokesFACOps/Update_V.C
--- a/StokesFACOps/Update_V.C Thu Mar 10 20:44:11 2011 -0800
+++ b/StokesFACOps/Update_V.C Fri Mar 11 10:59:45 2011 -0800
@@ -92,7 +92,7 @@ void SAMRAI::solv::StokesFACOps::Update_
if(!((center[axis]==pbox.lower(axis) && v(left_x)==boundary_value)
|| (center[axis]==pbox.upper(axis)+1 && v(right_x)==boundary_value)))
{
- double d2vx_dxx, d2vx_dyy, C_vx;
+ double C_vx;
/* If y==0 */
hier::Index offset(0,0);
bool set_boundary(false);
@@ -126,47 +126,6 @@ void SAMRAI::solv::StokesFACOps::Update_
/* No scaling here, though there should be. */
maxres=std::max(maxres,std::fabs(delta_Rx));
-
- {
- const double dtau_xx_dx =
- 2*((v(right_x)-v(center_x))*cell_viscosity(center)
- - (v(center_x)-v(left_x))*cell_viscosity(left))/(dx*dx);
-
- const double dtau_xy_dy =
- edge_viscosity(up_e)*((v(up_x)-v(center_x))/(dy*dy)
- + (v(up_y)-v(up_y-ip))/(dx*dy))
- - edge_viscosity(center_e)*((v(center_x)-v(down_x))/(dy*dy)
- + (v(center_y)-v(center_y-ip))/(dx*dy));
- const double dp_dx=(p(center)-p(left))/dx;
-
- // tbox::plog << "v " << axis << " "
- // << center[0] << " "
- // << center[1] << " "
- // << v(center_x) << " "
- // << v(left_x) << " "
- // << v(right_x) << " "
- // << v(up_x) << " "
- // << v(down_x) << " "
- // << v(up_y) << " "
- // << v(up_y-ip) << " "
- // << v(center_y) << " "
- // << v(center_y-ip) << " "
- // << v_rhs(center_x) << " "
- // << delta_Rx << " "
- // << p(center) << " "
- // << p(left) << " "
- // << edge_viscosity(up_e) << " "
- // << edge_viscosity(center_e) << " "
- // << cell_viscosity(center) << " "
- // << cell_viscosity(left) << " "
- // << dx << " "
- // << dy << " "
- // << dtau_xx_dx << " "
- // << dtau_xy_dy << " "
- // << dp_dx << " "
- // << "\n";
- }
-
v(center_x)+=delta_Rx*theta_momentum/C_vx;
/* Set the boundary elements so that the
diff -r 576b39c7e446 -r 61f1ba62bedf StokesFACOps/smooth_Tackley.C
--- a/StokesFACOps/smooth_Tackley.C Thu Mar 10 20:44:11 2011 -0800
+++ b/StokesFACOps/smooth_Tackley.C Fri Mar 11 10:59:45 2011 -0800
@@ -123,12 +123,6 @@ void SAMRAI::solv::StokesFACOps::smooth_
tbox::Pointer<pdat::CellData<double> > p_ptr =
patch->getPatchData(p_id);
pdat::CellData<double> &p(*p_ptr);
- tbox::Pointer<pdat::CellData<double> > dp_ptr =
- patch->getPatchData(dp_id);
- pdat::CellData<double> &dp(*dp_ptr);
- tbox::Pointer<pdat::CellData<double> > p_rhs_ptr =
- patch->getPatchData(p_rhs_id);
- pdat::CellData<double> &p_rhs(*p_rhs_ptr);
tbox::Pointer<pdat::SideData<double> > v_ptr =
patch->getPatchData(v_id);
@@ -242,12 +236,6 @@ void SAMRAI::solv::StokesFACOps::smooth_
tbox::Pointer<pdat::CellData<double> > p_ptr =
patch->getPatchData(p_id);
pdat::CellData<double> &p(*p_ptr);
- tbox::Pointer<pdat::CellData<double> > dp_ptr =
- patch->getPatchData(dp_id);
- pdat::CellData<double> &dp(*dp_ptr);
- tbox::Pointer<pdat::CellData<double> > p_rhs_ptr =
- patch->getPatchData(p_rhs_id);
- pdat::CellData<double> &p_rhs(*p_rhs_ptr);
tbox::Pointer<pdat::SideData<double> > v_ptr =
patch->getPatchData(v_id);
@@ -372,9 +360,6 @@ void SAMRAI::solv::StokesFACOps::smooth_
tbox::Pointer<pdat::SideData<double> > v_ptr =
patch->getPatchData(v_id);
pdat::SideData<double> &v(*v_ptr);
- tbox::Pointer<pdat::SideData<double> > v_rhs_ptr =
- patch->getPatchData(v_rhs_id);
- pdat::SideData<double> &v_rhs(*v_rhs_ptr);
tbox::Pointer<pdat::CellData<double> > cell_visc_ptr
= patch->getPatchData(cell_viscosity_id);
@@ -525,16 +510,10 @@ void SAMRAI::solv::StokesFACOps::smooth_
tbox::Pointer<pdat::CellData<double> > dp_ptr =
patch->getPatchData(dp_id);
pdat::CellData<double> &dp(*dp_ptr);
- tbox::Pointer<pdat::CellData<double> > p_rhs_ptr =
- patch->getPatchData(p_rhs_id);
- pdat::CellData<double> &p_rhs(*p_rhs_ptr);
tbox::Pointer<pdat::SideData<double> > v_ptr =
patch->getPatchData(v_id);
pdat::SideData<double> &v(*v_ptr);
- tbox::Pointer<pdat::SideData<double> > v_rhs_ptr =
- patch->getPatchData(v_rhs_id);
- pdat::SideData<double> &v_rhs(*v_rhs_ptr);
tbox::Pointer<pdat::CellData<double> > cell_visc_ptr
= patch->getPatchData(cell_viscosity_id);
diff -r 576b39c7e446 -r 61f1ba62bedf StokesFACSolver.h
--- a/StokesFACSolver.h Thu Mar 10 20:44:11 2011 -0800
+++ b/StokesFACSolver.h Fri Mar 11 10:59:45 2011 -0800
@@ -211,8 +211,7 @@ public:
* @see solveSystem( const int, const int, tbox::Pointer< hier::PatchHierarchy >, int, int);
*/
bool
- solveSystem(const int p, const int cell_viscosity, const int edge_viscosity,
- const int dp, const int p_rhs,
+ solveSystem(const int p, const int p_rhs,
const int v, const int v_rhs);
/*!
diff -r 576b39c7e446 -r 61f1ba62bedf StokesFACSolver/solveSystem.C
--- a/StokesFACSolver/solveSystem.C Thu Mar 10 20:44:11 2011 -0800
+++ b/StokesFACSolver/solveSystem.C Fri Mar 11 10:59:45 2011 -0800
@@ -29,9 +29,7 @@
*/
bool SAMRAI::solv::StokesFACSolver::solveSystem(const int p,
- const int cell_viscosity,
- const int edge_viscosity,
- const int dp, const int p_rhs,
+ const int p_rhs,
const int v, const int v_rhs)
{
#ifdef DEBUG_CHECK_ASSERTIONS
@@ -123,8 +121,7 @@ bool SAMRAI::solv::StokesFACSolver::solv
hierarchy, coarse_ln, fine_ln);
bool solver_rval;
- solver_rval = solveSystem(p, cell_viscosity, edge_viscosity,
- dp, p_rhs, v, v_rhs);
+ solver_rval = solveSystem(p, p_rhs, v, v_rhs);
deallocateSolverState();
diff -r 576b39c7e446 -r 61f1ba62bedf V_Boundary_Refine/Update_V.C
--- a/V_Boundary_Refine/Update_V.C Thu Mar 10 20:44:11 2011 -0800
+++ b/V_Boundary_Refine/Update_V.C Fri Mar 11 10:59:45 2011 -0800
@@ -40,7 +40,6 @@ void SAMRAI::geom::V_Boundary_Refine::Up
{
pdat::SideIndex center(fine);
center.coarsen(hier::Index(2,2));
- const int off_axis= (axis==0) ? 1 : 0;
// tbox::plog << "Boundary Update V "
// << axis << " "
diff -r 576b39c7e446 -r 61f1ba62bedf V_Coarsen_Patch_Strategy.C
--- a/V_Coarsen_Patch_Strategy.C Thu Mar 10 20:44:11 2011 -0800
+++ b/V_Coarsen_Patch_Strategy.C Fri Mar 11 10:59:45 2011 -0800
@@ -4,8 +4,8 @@ SAMRAI::solv::V_Coarsen_Patch_Strategy::
SAMRAI::solv::V_Coarsen_Patch_Strategy::postprocessCoarsen
(hier::Patch& coarse,
const hier::Patch& fine,
- const hier::Box& coarse_box,
- const hier::IntVector& ratio)
+ const hier::Box& ,
+ const hier::IntVector& )
{
/* Fix up the boundary elements by iterating through the boundary
boxes */
diff -r 576b39c7e446 -r 61f1ba62bedf V_Coarsen_Patch_Strategy.h
--- a/V_Coarsen_Patch_Strategy.h Thu Mar 10 20:44:11 2011 -0800
+++ b/V_Coarsen_Patch_Strategy.h Fri Mar 11 10:59:45 2011 -0800
@@ -64,10 +64,10 @@ public:
// const hier::BoxList& fine_boxes,
// const hier::IntVector& ratio) {}
virtual void
- preprocessCoarsen(hier::Patch& coarse,
+ preprocessCoarsen(hier::Patch& ,
const hier::Patch& fine,
- const hier::Box& coarse_box,
- const hier::IntVector& ratio)
+ const hier::Box& ,
+ const hier::IntVector& )
{
set_V_boundary(fine,v_id,true);
}
diff -r 576b39c7e446 -r 61f1ba62bedf V_Refine_Patch_Strategy.C
--- a/V_Refine_Patch_Strategy.C Thu Mar 10 20:44:11 2011 -0800
+++ b/V_Refine_Patch_Strategy.C Fri Mar 11 10:59:45 2011 -0800
@@ -3,114 +3,10 @@
void
SAMRAI::solv::V_Refine_Patch_Strategy::preprocessRefine
-(hier::Patch& fine,
+(hier::Patch& ,
const hier::Patch& coarse,
- const hier::Box& fine_box,
- const hier::IntVector& ratio)
+ const hier::Box& ,
+ const hier::IntVector& )
{
- // tbox::Pointer<pdat::SideData<double> >
- // v = coarse.getPatchData(v_id);
-
- // hier::Box pbox=coarse.getBox();
- // hier::Box gbox=v->getGhostBox();
-
- // tbox::Pointer<geom::CartesianPatchGeometry>
- // geom = coarse->getPatchGeometry();
- // tbox::plog << "V Refine Patch preprocess "
- // << gbox.lower(0) << " "
- // << gbox.upper(0) << " "
- // << gbox.lower(1) << " "
- // << gbox.upper(1) << " "
- // << pbox.lower(0) << " "
- // << pbox.upper(0) << " "
- // << pbox.lower(1) << " "
- // << pbox.upper(1) << " "
- // << "\n";
-
set_V_boundary(coarse,v_id,true);
-
-
- // for(int j=gbox.lower(1); j<=gbox.upper(1)+1; ++j)
- // for(int i=gbox.lower(0); i<=gbox.upper(0)+1; ++i)
- // {
- // pdat::CellIndex center(tbox::Dimension(2));
- // center[0]=i;
- // center[1]=j;
- // hier::Index ip(1,0), jp(0,1);
-
- // /* vx */
- // if(j<=gbox.upper(1))
- // {
- // /* Set a sentinel value */
- // if((i<pbox.lower(0) && geom->getTouchesPhysicalBoundary(0,0))
- // || (i>pbox.upper(0)+1 && geom->getTouchesPhysicalBoundary(0,1)))
- // {
- // (*v)(pdat::SideIndex(center,pdat::SideIndex::X,
- // pdat::SideIndex::Lower))=
- // boundary_value;
- // }
- // /* Set the value so the derivative=0 */
- // else if(j<pbox.lower(1) && geom->getTouchesPhysicalBoundary(1,0))
- // {
- // (*v)(pdat::SideIndex(center,pdat::SideIndex::X,
- // pdat::SideIndex::Lower))=
- // (*v)(pdat::SideIndex(center+jp,pdat::SideIndex::X,
- // pdat::SideIndex::Lower));
- // }
- // else if(j>pbox.upper(1) && geom->getTouchesPhysicalBoundary(1,1))
- // {
- // (*v)(pdat::SideIndex(center,pdat::SideIndex::X,
- // pdat::SideIndex::Lower))=
- // (*v)(pdat::SideIndex(center-jp,pdat::SideIndex::X,
- // pdat::SideIndex::Lower));
- // }
- // // tbox::plog << "V Refine Patch vx "
- // // << coarse.getPatchLevelNumber() << " "
- // // << i << " "
- // // << j << " "
- // // << (*v)(pdat::SideIndex(center,pdat::SideIndex::X,
- // // pdat::SideIndex::Lower))
- // // << " "
- // // << (&(*v)(pdat::SideIndex(center,pdat::SideIndex::X,
- // // pdat::SideIndex::Lower)))
- // // << " "
- // // << "\n";
- // }
- // /* vy */
- // if(i<=gbox.upper(0))
- // {
- // if((j<pbox.lower(1) && geom->getTouchesPhysicalBoundary(1,0))
- // || (j>pbox.upper(1)+1 && geom->getTouchesPhysicalBoundary(1,1)))
- // {
- // (*v)(pdat::SideIndex(center,pdat::SideIndex::Y,
- // pdat::SideIndex::Lower))=
- // boundary_value;
- // }
- // else if(i<pbox.lower(0) && geom->getTouchesPhysicalBoundary(0,0))
- // {
- // (*v)(pdat::SideIndex(center,pdat::SideIndex::Y,
- // pdat::SideIndex::Lower))=
- // (*v)(pdat::SideIndex(center+ip,pdat::SideIndex::Y,
- // pdat::SideIndex::Lower));
- // }
- // else if(i>pbox.upper(0) && geom->getTouchesPhysicalBoundary(0,1))
- // {
- // (*v)(pdat::SideIndex(center,pdat::SideIndex::Y,
- // pdat::SideIndex::Lower))=
- // (*v)(pdat::SideIndex(center-ip,pdat::SideIndex::Y,
- // pdat::SideIndex::Lower));
- // }
- // // tbox::plog << "V Refine Patch vy "
- // // << coarse.getPatchLevelNumber() << " "
- // // << i << " "
- // // << j << " "
- // // << (*v)(pdat::SideIndex(center,pdat::SideIndex::Y,
- // // pdat::SideIndex::Lower))
- // // << " "
- // // << (&(*v)(pdat::SideIndex(center,pdat::SideIndex::Y,
- // // pdat::SideIndex::Lower)))
- // // << " "
- // // << "\n";
- // }
- // }
}
diff -r 576b39c7e446 -r 61f1ba62bedf V_Refine_Patch_Strategy.h
--- a/V_Refine_Patch_Strategy.h Thu Mar 10 20:44:11 2011 -0800
+++ b/V_Refine_Patch_Strategy.h Fri Mar 11 10:59:45 2011 -0800
@@ -53,9 +53,9 @@ public:
virtual void
setPhysicalBoundaryConditions(
- hier::Patch& patch,
- const double fill_time,
- const hier::IntVector& ghost_width_to_fill) {}
+ hier::Patch& ,
+ const double ,
+ const hier::IntVector& ) {}
hier::IntVector
getRefineOpStencilWidth() const
{ return hier::IntVector::getOne(d_dim); }
@@ -73,16 +73,16 @@ public:
virtual void
postprocessRefineBoxes(
- hier::Patch& fine,
- const hier::Patch& coarse,
- const hier::BoxList& fine_boxes,
- const hier::IntVector& ratio) {}
+ hier::Patch& ,
+ const hier::Patch& ,
+ const hier::BoxList& ,
+ const hier::IntVector& ) {}
virtual void
postprocessRefine(
- hier::Patch& fine,
- const hier::Patch& coarse,
- const hier::Box& fine_box,
- const hier::IntVector& ratio) {}
+ hier::Patch& ,
+ const hier::Patch& ,
+ const hier::Box& ,
+ const hier::IntVector& ) {}
//@}
More information about the CIG-COMMITS
mailing list