[cig-commits] commit 2322 by bangerth to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Thu Feb 27 09:30:07 PST 2014
Revision 2322
Address a number of warnings ICC generates.
U trunk/aspect/source/initial_conditions/adiabatic.cc
U trunk/aspect/source/mesh_refinement/density.cc
U trunk/aspect/source/mesh_refinement/nonadiabatic_temperature.cc
U trunk/aspect/source/mesh_refinement/thermal_energy_density.cc
U trunk/aspect/source/mesh_refinement/viscosity.cc
U trunk/aspect/source/simulator/assembly.cc
U trunk/aspect/source/simulator/checkpoint_restart.cc
U trunk/aspect/source/simulator/core.cc
U trunk/aspect/source/simulator/solver.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2322&peg=2322
Diff:
Modified: trunk/aspect/source/initial_conditions/adiabatic.cc
===================================================================
--- trunk/aspect/source/initial_conditions/adiabatic.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/initial_conditions/adiabatic.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -90,10 +90,10 @@
if (perturbation_position == "center")
{
if (const GeometryModel::SphericalShell<dim> *
- geometry_model = dynamic_cast <const GeometryModel::SphericalShell<dim>*> (this->geometry_model))
+ shell_geometry_model = dynamic_cast <const GeometryModel::SphericalShell<dim>*> (this->geometry_model))
{
- const double inner_radius = geometry_model->inner_radius();
- const double half_opening_angle = numbers::PI/180.0 * 0.5 * geometry_model->opening_angle();
+ const double inner_radius = shell_geometry_model->inner_radius();
+ const double half_opening_angle = numbers::PI/180.0 * 0.5 * shell_geometry_model->opening_angle();
if (dim==2)
{
// choose the center of the perturbation at half angle along the inner radius
@@ -105,7 +105,7 @@
// if the opening angle is 90 degrees (an eighth of a full spherical
// shell, then choose the point on the inner surface along the first
// diagonal
- if (geometry_model->opening_angle() == 90)
+ if (shell_geometry_model->opening_angle() == 90)
{
mid_point(0) = inner_radius*std::sqrt(1./3),
mid_point(1) = inner_radius*std::sqrt(1./3),
@@ -121,12 +121,12 @@
}
}
else if (const GeometryModel::Box<dim> *
- geometry_model = dynamic_cast <const GeometryModel::Box<dim>*> (this->geometry_model))
+ box_geometry_model = dynamic_cast <const GeometryModel::Box<dim>*> (this->geometry_model))
// for the box geometry, choose a point at the center of the bottom face.
// (note that the loop only runs over the first dim-1 coordinates, leaving
// the depth variable at zero)
for (unsigned int i=0; i<dim-1; ++i)
- mid_point(i) += 0.5 * geometry_model->get_extents()[i];
+ mid_point(i) += 0.5 * box_geometry_model->get_extents()[i];
else
AssertThrow (false,
ExcMessage ("Not a valid geometry model for the initial conditions model"
Modified: trunk/aspect/source/mesh_refinement/density.cc
===================================================================
--- trunk/aspect/source/mesh_refinement/density.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/mesh_refinement/density.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -134,11 +134,8 @@
// will yield convergence of the error indicators to zero as h->0)
const double power = 1.0 + dim/2.0;
{
- typename DoFHandler<dim>::active_cell_iterator
- cell = this->get_dof_handler().begin_active(),
- endc = this->get_dof_handler().end();
unsigned int i=0;
- for (; cell!=endc; ++cell, ++i)
+ for (cell = this->get_dof_handler().begin_active(); cell!=endc; ++cell, ++i)
if (cell->is_locally_owned())
indicators(i) *= std::pow(cell->diameter(), power);
}
Modified: trunk/aspect/source/mesh_refinement/nonadiabatic_temperature.cc
===================================================================
--- trunk/aspect/source/mesh_refinement/nonadiabatic_temperature.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/mesh_refinement/nonadiabatic_temperature.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -110,11 +110,8 @@
// will yield convergence of the error indicators to zero as h->0)
const double power = 1.0 + dim/2.0;
{
- typename DoFHandler<dim>::active_cell_iterator
- cell = this->get_dof_handler().begin_active(),
- endc = this->get_dof_handler().end();
unsigned int i=0;
- for (; cell!=endc; ++cell, ++i)
+ for (cell = this->get_dof_handler().begin_active(); cell!=endc; ++cell, ++i)
if (cell->is_locally_owned())
indicators(i) *= std::pow(cell->diameter(), power);
}
Modified: trunk/aspect/source/mesh_refinement/thermal_energy_density.cc
===================================================================
--- trunk/aspect/source/mesh_refinement/thermal_energy_density.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/mesh_refinement/thermal_energy_density.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -132,11 +132,8 @@
// will yield convergence of the error indicators to zero as h->0)
const double power = 1.5;
{
- typename DoFHandler<dim>::active_cell_iterator
- cell = this->get_dof_handler().begin_active(),
- endc = this->get_dof_handler().end();
unsigned int i=0;
- for (; cell!=endc; ++cell, ++i)
+ for (cell = this->get_dof_handler().begin_active(); cell!=endc; ++cell, ++i)
if (cell->is_locally_owned())
indicators(i) *= std::pow(cell->diameter(), power);
}
Modified: trunk/aspect/source/mesh_refinement/viscosity.cc
===================================================================
--- trunk/aspect/source/mesh_refinement/viscosity.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/mesh_refinement/viscosity.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -132,11 +132,8 @@
// will yield convergence of the error indicators to zero as h->0)
const double power = 1.0 + dim/2.0;
{
- typename DoFHandler<dim>::active_cell_iterator
- cell = this->get_dof_handler().begin_active(),
- endc = this->get_dof_handler().end();
unsigned int i=0;
- for (; cell!=endc; ++cell, ++i)
+ for (cell = this->get_dof_handler().begin_active(); cell!=endc; ++cell, ++i)
if (cell->is_locally_owned())
indicators(i) *= std::pow(cell->diameter(), power);
}
Modified: trunk/aspect/source/simulator/assembly.cc
===================================================================
--- trunk/aspect/source/simulator/assembly.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/simulator/assembly.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -53,6 +53,8 @@
const unsigned int n_compositional_fields);
StokesPreconditioner (const StokesPreconditioner &data);
+ virtual ~StokesPreconditioner ();
+
FEValues<dim> finite_element_values;
std::vector<SymmetricTensor<2,dim> > grads_phi_u;
@@ -111,7 +113,13 @@
{}
+ template <int dim>
+ StokesPreconditioner<dim>::
+ ~StokesPreconditioner ()
+ {}
+
+
// We derive the StokesSystem scratch array from the
// StokesPreconditioner array. We do this because all the objects that
// are necessary for the assembly of the preconditioner are also
@@ -354,6 +362,8 @@
StokesPreconditioner (const FiniteElement<dim> &finite_element);
StokesPreconditioner (const StokesPreconditioner &data);
+ virtual ~StokesPreconditioner ();
+
FullMatrix<double> local_matrix;
std::vector<types::global_dof_index> local_dof_indices;
};
@@ -380,7 +390,13 @@
{}
+ template <int dim>
+ StokesPreconditioner<dim>::
+ ~StokesPreconditioner ()
+ {}
+
+
template <int dim>
struct StokesSystem : public StokesPreconditioner<dim>
{
Modified: trunk/aspect/source/simulator/checkpoint_restart.cc
===================================================================
--- trunk/aspect/source/simulator/checkpoint_restart.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/simulator/checkpoint_restart.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -183,10 +183,10 @@
uncompress((Bytef *)&uncompressed[0], &uncompressed_size, (Bytef *)&compressed[0], compression_header[3]);
{
- std::stringstream ifs;
+ std::stringstream ss;
// this puts the data of uncompressed into the stringstream
ifs.rdbuf()->pubsetbuf(&uncompressed[0], uncompressed_size);
- aspect::iarchive ia (ifs);
+ aspect::iarchive ia (ss);
ia >> (*this);
}
}
Modified: trunk/aspect/source/simulator/core.cc
===================================================================
--- trunk/aspect/source/simulator/core.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/simulator/core.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -509,11 +509,11 @@
if (comp.length()>0)
{
- for (std::string::const_iterator p=comp.begin();p!=comp.end();++p)
+ for (std::string::const_iterator direction=comp.begin();direction!=comp.end();++direction)
{
- AssertThrow(*p>='x' && *p<='z', ExcMessage("Error in selector of prescribed velocity boundary component"));
- AssertThrow(dim==3 || *p!='z', ExcMessage("for dim=2, prescribed velocity component z is invalid"))
- mask[*p-'x']=true;
+ AssertThrow(*direction>='x' && *direction<='z', ExcMessage("Error in selector of prescribed velocity boundary component"));
+ AssertThrow(dim==3 || *direction!='z', ExcMessage("for dim=2, prescribed velocity component z is invalid"))
+ mask[*direction-'x']=true;
}
for (unsigned int i=0;i<introspection.component_masks.velocities.size();++i)
mask[i] = mask[i] & introspection.component_masks.velocities[i];
Modified: trunk/aspect/source/simulator/solver.cc
===================================================================
--- trunk/aspect/source/simulator/solver.cc 2014-02-26 14:03:43 UTC (rev 2321)
+++ trunk/aspect/source/simulator/solver.cc 2014-02-27 17:30:02 UTC (rev 2322)
@@ -163,8 +163,8 @@
dst.block(1).sadd (-1, 1, b.block(1));
// clear blocks we didn't want to fill
- for (unsigned int b=2; b<dst.n_blocks(); ++b)
- dst.block(b) = 0;
+ for (unsigned int block=2; block<dst.n_blocks(); ++block)
+ dst.block(block) = 0;
return dst.l2_norm();
}
More information about the CIG-COMMITS
mailing list