[cig-commits] [commit] master: Run astyle on the new files. (3868064)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon May 19 13:09:04 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/8cd10da0b2e753ddd449a2bce24790abdb4af621...3407c2fccc8c98ef3939d3c2d29077b4d899ff4b
>---------------------------------------------------------------
commit 3868064dc55aeb72c8a4fa057db5d91bb55fccc3
Author: Wolfgang Bangerth <bangerth at math.tamu.edu>
Date: Mon May 19 14:40:45 2014 -0500
Run astyle on the new files.
>---------------------------------------------------------------
3868064dc55aeb72c8a4fa057db5d91bb55fccc3
include/aspect/postprocess/dynamic_topography.h | 36 ++++++------
source/postprocess/dynamic_topography.cc | 78 ++++++++++++-------------
2 files changed, 57 insertions(+), 57 deletions(-)
diff --git a/include/aspect/postprocess/dynamic_topography.h b/include/aspect/postprocess/dynamic_topography.h
index 1144efc..879b636 100644
--- a/include/aspect/postprocess/dynamic_topography.h
+++ b/include/aspect/postprocess/dynamic_topography.h
@@ -52,24 +52,24 @@ namespace aspect
/**
* Declare the parameters this class takes through input files.
*/
- static
- void
- declare_parameters (ParameterHandler &prm);
-
- /**
- * Read the parameters this class declares from the parameter file.
- */
- virtual
- void
- parse_parameters (ParameterHandler &prm);
-
- private:
- /**
- * Parameters for anhydrous melting of peridotite after Katz, 2003
- */
-
- //for the solidus temperature
- bool Subtract_mean_DT; // °C
+ static
+ void
+ declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters this class declares from the parameter file.
+ */
+ virtual
+ void
+ parse_parameters (ParameterHandler &prm);
+
+ private:
+ /**
+ * Parameters for anhydrous melting of peridotite after Katz, 2003
+ */
+
+ //for the solidus temperature
+ bool Subtract_mean_DT; // °C
};
}
diff --git a/source/postprocess/dynamic_topography.cc b/source/postprocess/dynamic_topography.cc
index 02b42ca..c78705d 100644
--- a/source/postprocess/dynamic_topography.cc
+++ b/source/postprocess/dynamic_topography.cc
@@ -65,22 +65,22 @@ namespace aspect
for (; cell!=endc; ++cell)
if (cell->is_locally_owned())
- if (cell->at_boundary())
+ if (cell->at_boundary())
+ {
+ // see if the cell is at the *top* boundary, not just any boundary
{
- // see if the cell is at the *top* boundary, not just any boundary
- {
- bool is_at_top = false;
- for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
- if (cell->at_boundary(f))
- if (this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
- {
- is_at_top = true;
- break;
- }
-
- if (is_at_top == false)
- continue;
- }
+ bool is_at_top = false;
+ for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+ if (cell->at_boundary(f))
+ if (this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
+ {
+ is_at_top = true;
+ break;
+ }
+
+ if (is_at_top == false)
+ continue;
+ }
fe_values.reinit (cell);
// get the various components of the solution, then
@@ -117,10 +117,10 @@ namespace aspect
const double viscosity = out.viscosities[q];
const double density = out.densities[q];
- const SymmetricTensor<2,dim> strain_rate = in.strain_rate[q] - 1./3 * trace(in.strain_rate[q]) * unit_symmetric_tensor<dim>();
- const SymmetricTensor<2,dim> shear_stress = 2 * viscosity * strain_rate;
+ const SymmetricTensor<2,dim> strain_rate = in.strain_rate[q] - 1./3 * trace(in.strain_rate[q]) * unit_symmetric_tensor<dim>();
+ const SymmetricTensor<2,dim> shear_stress = 2 * viscosity * strain_rate;
- const Tensor<1,dim> gravity = this->get_gravity_model().gravity_vector(location);
+ const Tensor<1,dim> gravity = this->get_gravity_model().gravity_vector(location);
const Tensor<1,dim> gravity_direction = gravity/gravity.norm();
// Subtract the dynamic pressure
@@ -128,11 +128,11 @@ namespace aspect
const double sigma_rr = gravity_direction * (shear_stress * gravity_direction) - dynamic_pressure;
const double dynamic_topography = - sigma_rr / gravity.norm() / density;
- integrated_topography += dynamic_topography * fe_values.JxW(q);
- integrated_surface_area += fe_values.JxW(q);
+ integrated_topography += dynamic_topography * fe_values.JxW(q);
+ integrated_surface_area += fe_values.JxW(q);
- stored_values.push_back (std::make_pair(location, dynamic_topography));
- }
+ stored_values.push_back (std::make_pair(location, dynamic_topography));
+ }
}
const double average_topography = Utilities::MPI::sum (integrated_topography,this->get_mpi_communicator()) / Utilities::MPI::sum (integrated_surface_area,this->get_mpi_communicator());
@@ -143,16 +143,16 @@ namespace aspect
// otherwise leave as is
for (unsigned int i=0; i<stored_values.size(); ++i)
{
- output << stored_values[i].first
- << ' '
- << stored_values[i].second -
- (Subtract_mean_DT
- ?
- average_topography
- :
- 0.)
- << std::endl;
- }
+ output << stored_values[i].first
+ << ' '
+ << stored_values[i].second -
+ (Subtract_mean_DT
+ ?
+ average_topography
+ :
+ 0.)
+ << std::endl;
+ }
const std::string filename = this->get_output_directory() +
@@ -216,12 +216,12 @@ namespace aspect
{
prm.enter_subsection("Dynamic Topography");
{
- prm.declare_entry ("Subtract mean of dynamic topography", "false",
- Patterns::Bool (),
- "Option to remove the mean dynamic topography "
- "in the outputted data file (not visualization). "
- "'true' subtracts the mean, 'false' leaves "
- "the calculated dynamic topography as is. ");
+ prm.declare_entry ("Subtract mean of dynamic topography", "false",
+ Patterns::Bool (),
+ "Option to remove the mean dynamic topography "
+ "in the outputted data file (not visualization). "
+ "'true' subtracts the mean, 'false' leaves "
+ "the calculated dynamic topography as is. ");
}
prm.leave_subsection();
@@ -237,7 +237,7 @@ namespace aspect
{
prm.enter_subsection("Dynamic Topography");
{
- Subtract_mean_DT = prm.get_bool("Subtract mean of dynamic topography");
+ Subtract_mean_DT = prm.get_bool("Subtract mean of dynamic topography");
}
prm.leave_subsection();
}
More information about the CIG-COMMITS
mailing list