[cig-commits] [commit] master: More style and documentation fixes. (5c76c33)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu May 15 08:58:23 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/2f27335d4a52efc6ce31351c2a47422171411114...47f27df84eb33170e6ea9a3937e3adc652a9f3f0
>---------------------------------------------------------------
commit 5c76c33eefae303682c825faf14c74d8061bdcd8
Author: Wolfgang Bangerth <bangerth at math.tamu.edu>
Date: Thu May 15 10:37:15 2014 -0500
More style and documentation fixes.
>---------------------------------------------------------------
5c76c33eefae303682c825faf14c74d8061bdcd8
include/aspect/velocity_boundary_conditions/gplates.h | 7 ++++---
source/velocity_boundary_conditions/gplates.cc | 12 +++++++-----
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/include/aspect/velocity_boundary_conditions/gplates.h b/include/aspect/velocity_boundary_conditions/gplates.h
index db9197b..cafb8bd 100644
--- a/include/aspect/velocity_boundary_conditions/gplates.h
+++ b/include/aspect/velocity_boundary_conditions/gplates.h
@@ -105,15 +105,16 @@ namespace aspect
/**
* Pointers to the actual tables. Used to avoid unnecessary copying
- * of values.
+ * of values. These pointers point to either velocity_vals or
+ * old_velocity_vals.
*/
dealii::Table<2,Tensor<1,3> > *velocity_values;
dealii::Table<2,Tensor<1,3> > *old_velocity_values;
/**
- * Distances between adjacent point in the Lat/Lon grid
+ * Distances between adjacent point in the Lat/Long grid
*/
- double delta_phi,delta_theta;
+ double delta_phi, delta_theta;
/**
* The rotation axis and angle around which a 2D model needs to be
diff --git a/source/velocity_boundary_conditions/gplates.cc b/source/velocity_boundary_conditions/gplates.cc
index 62b62ac..22c2445 100644
--- a/source/velocity_boundary_conditions/gplates.cc
+++ b/source/velocity_boundary_conditions/gplates.cc
@@ -40,7 +40,9 @@ namespace aspect
{
namespace internal
{
- GPlatesLookup::GPlatesLookup(const Tensor<1,2> &surface_point_one, const Tensor<1,2> &surface_point_two, const double interpolation_width_)
+ GPlatesLookup::GPlatesLookup(const Tensor<1,2> &surface_point_one,
+ const Tensor<1,2> &surface_point_two,
+ const double interpolation_width_)
:
velocity_vals(0,0),
old_velocity_vals(0,0),
@@ -51,8 +53,7 @@ namespace aspect
delta_theta(0.0),
interpolation_width(interpolation_width_)
{
-
- // get the cartesian coordinates of the points the 2D model shall lie in
+ // get the Cartesian coordinates of the points the 2D model shall lie in
// this computation is done also for 3D since it is not expensive and the
// template dim is currently not used here. Could be changed.
const Tensor<1,3> point_one = cartesian_surface_coordinates(convert_tensor<2,3>(surface_point_one));
@@ -161,7 +162,7 @@ namespace aspect
// swap pointers to old and new values, we overwrite the old ones
// and the new ones become the old ones
- std::swap( velocity_values, old_velocity_values);
+ std::swap (velocity_values, old_velocity_values);
(*velocity_values).reinit(n_theta,n_phi);
velocity_positions.reinit(n_theta,n_phi);
@@ -325,7 +326,8 @@ namespace aspect
// sin(theta) accounts for the different area covered by grid points at varying latitudes
// the minimal value is chosen to weight points at the poles according to their number and area
- const double point_weight = std::max(std::sin(spherical_point[0]),std::sin(delta_theta/2)/velocity_values->n_cols());
+ const double point_weight = std::max(std::sin(spherical_point[0]),
+ std::sin(delta_theta/2)/velocity_values->n_cols());
const Tensor<1,3> normalized_position = position / position.norm();
More information about the CIG-COMMITS
mailing list