[cig-commits] [commit] master: astyle (53d645f)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Jan 22 08:16:16 PST 2015


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/2fcde671ad63cce6d01d453c70d572b875893f2b...59e1a2f9609f8666d604a8513b66c1d5f7b326b8

>---------------------------------------------------------------

commit 53d645f5a5c9d5200cd4b606eb6115178a8214fb
Author: Timo Heister <timo.heister at gmail.com>
Date:   Thu Jan 22 09:19:45 2015 -0500

    astyle


>---------------------------------------------------------------

53d645f5a5c9d5200cd4b606eb6115178a8214fb
 include/aspect/geometry_model/box.h                | 16 +++----
 include/aspect/geometry_model/interface.h          | 18 ++++----
 include/aspect/geometry_model/sphere.h             | 16 +++----
 include/aspect/geometry_model/spherical_shell.h    | 16 +++----
 include/aspect/material_model/morency_doin.h       |  2 +-
 source/geometry_model/interface.cc                 |  0
 source/geometry_model/spherical_shell.cc           |  0
 source/initial_conditions/adiabatic.cc             | 12 ++---
 source/main.cc                                     |  0
 source/postprocess/basic_statistics.cc             |  8 ++--
 source/postprocess/dynamic_topography.cc           | 52 +++++++++++-----------
 source/postprocess/table_heat_flux_statistics.cc   |  8 ++--
 source/postprocess/table_velocity_statistics.cc    |  8 ++--
 source/postprocess/visualization.cc                | 14 +++---
 .../visualization/dynamic_topography.cc            | 42 ++++++++---------
 source/simulator/assembly.cc                       | 16 +++----
 source/simulator/core.cc                           |  2 +-
 source/velocity_boundary_conditions/gplates.cc     |  2 +-
 18 files changed, 116 insertions(+), 116 deletions(-)

diff --git a/include/aspect/geometry_model/box.h b/include/aspect/geometry_model/box.h
index 82f9908..5d4c28e 100644
--- a/include/aspect/geometry_model/box.h
+++ b/include/aspect/geometry_model/box.h
@@ -113,14 +113,14 @@ namespace aspect
         std::set< std::pair< std::pair<types::boundary_id, types::boundary_id>, unsigned int> >
         get_periodic_boundary_pairs () const;
 
-	/**
-	 * @copydoc Interface::has_curved_elements()
-	 *
-	 * A box has only straight boundaries and cells, so return false.
-	 */
-	virtual
-	bool
-	has_curved_elements() const;
+        /**
+         * @copydoc Interface::has_curved_elements()
+         *
+         * A box has only straight boundaries and cells, so return false.
+         */
+        virtual
+        bool
+        has_curved_elements() const;
 
         /**
          * Declare the parameters this class takes through input files.
diff --git a/include/aspect/geometry_model/interface.h b/include/aspect/geometry_model/interface.h
index c4bbfee..d841646 100644
--- a/include/aspect/geometry_model/interface.h
+++ b/include/aspect/geometry_model/interface.h
@@ -230,15 +230,15 @@ namespace aspect
         std::set< std::pair< std::pair<types::boundary_id, types::boundary_id>, unsigned int> >
         get_periodic_boundary_pairs () const;
 
-	/**
-	 * If true, the geometry contains cells with boundaries that are not straight
-	 * and have a deal.II boundary object attached to it. If the return value is
-	 * @p false, certain operation can be optimized.The default implementation of
-	 * this function will return @p true.
-	 */
-	virtual
-	bool
-	has_curved_elements() const;
+        /**
+         * If true, the geometry contains cells with boundaries that are not straight
+         * and have a deal.II boundary object attached to it. If the return value is
+         * @p false, certain operation can be optimized.The default implementation of
+         * this function will return @p true.
+         */
+        virtual
+        bool
+        has_curved_elements() const;
 
         /**
          * Declare the parameters this class takes through input files. The
diff --git a/include/aspect/geometry_model/sphere.h b/include/aspect/geometry_model/sphere.h
index eea5512..f489b14 100644
--- a/include/aspect/geometry_model/sphere.h
+++ b/include/aspect/geometry_model/sphere.h
@@ -78,14 +78,14 @@ namespace aspect
         std::map<std::string,types::boundary_id>
         get_symbolic_boundary_names_map () const;
 
-	/**
-	 * @copydoc Interface::has_curved_elements()
-	 *
-	 * Return true because we have a curved boundary.
-	 */
-	virtual
-	bool
-	has_curved_elements() const;
+        /**
+         * @copydoc Interface::has_curved_elements()
+         *
+         * Return true because we have a curved boundary.
+         */
+        virtual
+        bool
+        has_curved_elements() const;
 
         static
         void
diff --git a/include/aspect/geometry_model/spherical_shell.h b/include/aspect/geometry_model/spherical_shell.h
index 1d45894..890eec2 100644
--- a/include/aspect/geometry_model/spherical_shell.h
+++ b/include/aspect/geometry_model/spherical_shell.h
@@ -94,14 +94,14 @@ namespace aspect
         std::map<std::string,types::boundary_id>
         get_symbolic_boundary_names_map () const;
 
-	/**
-	 * @copydoc Interface::has_curved_elements()
-	 *
-	 * Return true because we have a curved boundary.
-	 */
-	virtual
-	bool
-	has_curved_elements() const;
+        /**
+         * @copydoc Interface::has_curved_elements()
+         *
+         * Return true because we have a curved boundary.
+         */
+        virtual
+        bool
+        has_curved_elements() const;
 
         /**
          * Declare the parameters this class takes through input files. The
diff --git a/include/aspect/material_model/morency_doin.h b/include/aspect/material_model/morency_doin.h
index 1898316..8e93190 100644
--- a/include/aspect/material_model/morency_doin.h
+++ b/include/aspect/material_model/morency_doin.h
@@ -158,7 +158,7 @@ namespace aspect
          * fields and 1.0 is assumed to be the amount of background mantle.
          */
         std::vector<double> compute_volume_fractions(
-                const std::vector<double> &compositional_fields) const;
+          const std::vector<double> &compositional_fields) const;
         std::vector<double> densities;
         std::vector<double> activation_energies;
         std::vector<double> thermal_expansivities;
diff --git a/source/initial_conditions/adiabatic.cc b/source/initial_conditions/adiabatic.cc
index 58f03a4..5107f41 100644
--- a/source/initial_conditions/adiabatic.cc
+++ b/source/initial_conditions/adiabatic.cc
@@ -59,16 +59,16 @@ namespace aspect
       // at the surface and maximal_temperature() the value at the bottom.
       const double T_surface = (&this->get_boundary_temperature() != 0)
                                ?
-                                   this->get_boundary_temperature().minimal_temperature(
-                                       this->get_fixed_temperature_boundary_indicators())
+                               this->get_boundary_temperature().minimal_temperature(
+                                 this->get_fixed_temperature_boundary_indicators())
                                :
-                                   adiabatic_surface_temperature;
+                               adiabatic_surface_temperature;
       const double T_bottom = (&this->get_boundary_temperature() != 0)
                               ?
-                                  this->get_boundary_temperature().maximal_temperature(
-                                      this->get_fixed_temperature_boundary_indicators())
+                              this->get_boundary_temperature().maximal_temperature(
+                                this->get_fixed_temperature_boundary_indicators())
                               :
-                                  adiabatic_surface_temperature;
+                              adiabatic_surface_temperature;
 
       // get a representative profile of the compositional fields as an input
       // for the material model
diff --git a/source/postprocess/basic_statistics.cc b/source/postprocess/basic_statistics.cc
index 906bded..063b944 100644
--- a/source/postprocess/basic_statistics.cc
+++ b/source/postprocess/basic_statistics.cc
@@ -49,10 +49,10 @@ namespace aspect
               // dT is only meaningful if boundary temperatures are prescribed, otherwise it is 0
               const double dT = (&this->get_boundary_temperature())
                                 ?
-                                    this->get_boundary_temperature().maximal_temperature(this->get_fixed_temperature_boundary_indicators())
-                                    - this->get_boundary_temperature().minimal_temperature(this->get_fixed_temperature_boundary_indicators())
-                                    :
-                                    0;
+                                this->get_boundary_temperature().maximal_temperature(this->get_fixed_temperature_boundary_indicators())
+                                - this->get_boundary_temperature().minimal_temperature(this->get_fixed_temperature_boundary_indicators())
+                                :
+                                0;
 
               // we do not compute the compositions but give the functions below the value 0.0 instead
               std::vector<double> composition_values(this->n_compositional_fields(),0.0);
diff --git a/source/postprocess/dynamic_topography.cc b/source/postprocess/dynamic_topography.cc
index dda7e1b..0c2958c 100644
--- a/source/postprocess/dynamic_topography.cc
+++ b/source/postprocess/dynamic_topography.cc
@@ -79,10 +79,10 @@ namespace aspect
                 bool is_at_top = false;
                 for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
                   if (cell->at_boundary(f) && this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
-                      {
-                        is_at_top = true;
-                        break;
-                      }
+                    {
+                      is_at_top = true;
+                      break;
+                    }
 
                 if (is_at_top == false)
                   continue;
@@ -141,28 +141,28 @@ namespace aspect
                   const double sigma_rr           = gravity_direction * (shear_stress * gravity_direction) - dynamic_pressure;
                   const double dynamic_topography = - sigma_rr / gravity.norm() / density;
 
-                 // JxW provides the volume quadrature weights. This is a general formulation
-                 // necessary for when a quadrature formula is used that has more than one point.
-                 dynamic_topography_x_volume += dynamic_topography * fe_values.JxW(q);
-                 volume += fe_values.JxW(q);  
-               }
-               
-               const double dynamic_topography_cell_average = dynamic_topography_x_volume / volume;
-               // Compute the associated surface area to later compute the surfaces weighted integral
-               double surface;
-               Point<dim> midpoint_at_surface;  
-               for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
-                 if (cell->at_boundary(f) && this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
-                     {
-                     fe_face_values.reinit(cell,f);
-                     surface = fe_face_values.JxW(0);
-                     midpoint_at_surface = cell->face(f)->center(); 
-                     }
-
-               integrated_topography += dynamic_topography_cell_average*surface;
-               integrated_surface_area += surface;
-
-               stored_values.push_back (std::make_pair(midpoint_at_surface, dynamic_topography_cell_average));
+                  // JxW provides the volume quadrature weights. This is a general formulation
+                  // necessary for when a quadrature formula is used that has more than one point.
+                  dynamic_topography_x_volume += dynamic_topography * fe_values.JxW(q);
+                  volume += fe_values.JxW(q);
+                }
+
+              const double dynamic_topography_cell_average = dynamic_topography_x_volume / volume;
+              // Compute the associated surface area to later compute the surfaces weighted integral
+              double surface;
+              Point<dim> midpoint_at_surface;
+              for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+                if (cell->at_boundary(f) && this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
+                  {
+                    fe_face_values.reinit(cell,f);
+                    surface = fe_face_values.JxW(0);
+                    midpoint_at_surface = cell->face(f)->center();
+                  }
+
+              integrated_topography += dynamic_topography_cell_average*surface;
+              integrated_surface_area += surface;
+
+              stored_values.push_back (std::make_pair(midpoint_at_surface, dynamic_topography_cell_average));
             }
 
       // Calculate surface weighted average dynamic topography
diff --git a/source/postprocess/table_heat_flux_statistics.cc b/source/postprocess/table_heat_flux_statistics.cc
index 1dead58..b876f41 100644
--- a/source/postprocess/table_heat_flux_statistics.cc
+++ b/source/postprocess/table_heat_flux_statistics.cc
@@ -184,10 +184,10 @@ namespace aspect
           // dT is only meaningful if boundary temperatures are prescribed, otherwise it is 0
           const double dT = (&this->get_boundary_temperature())
                             ?
-                                this->get_boundary_temperature().maximal_temperature(this->get_fixed_temperature_boundary_indicators())
-                                - this->get_boundary_temperature().minimal_temperature(this->get_fixed_temperature_boundary_indicators())
-                                :
-                                0;
+                            this->get_boundary_temperature().maximal_temperature(this->get_fixed_temperature_boundary_indicators())
+                            - this->get_boundary_temperature().minimal_temperature(this->get_fixed_temperature_boundary_indicators())
+                            :
+                            0;
 
           const double conductive_heatflux = dT/h;
           const double nusselt_outer = global_boundary_fluxes[0]/conductive_heatflux;
diff --git a/source/postprocess/table_velocity_statistics.cc b/source/postprocess/table_velocity_statistics.cc
index 4208b47..6c4a623 100644
--- a/source/postprocess/table_velocity_statistics.cc
+++ b/source/postprocess/table_velocity_statistics.cc
@@ -164,10 +164,10 @@ namespace aspect
           // dT is only meaningful if boundary temperatures are prescribed, otherwise it is 0
           const double dT = (&this->get_boundary_temperature())
                             ?
-                                this->get_boundary_temperature().maximal_temperature(this->get_fixed_temperature_boundary_indicators())
-                                - this->get_boundary_temperature().minimal_temperature(this->get_fixed_temperature_boundary_indicators())
-                                :
-                                0;
+                            this->get_boundary_temperature().maximal_temperature(this->get_fixed_temperature_boundary_indicators())
+                            - this->get_boundary_temperature().minimal_temperature(this->get_fixed_temperature_boundary_indicators())
+                            :
+                            0;
           // we do not compute the compositions but give the functions below the value 0.0 instead
           std::vector<double> composition_values(this->n_compositional_fields(),0.0);
 
diff --git a/source/postprocess/visualization.cc b/source/postprocess/visualization.cc
index 88fb5fb..8fd3159 100644
--- a/source/postprocess/visualization.cc
+++ b/source/postprocess/visualization.cc
@@ -291,9 +291,9 @@ namespace aspect
 
       // now build the patches and see how we can output these
       data_out.build_patches ((interpolate_output) ?
-                               this->get_stokes_velocity_degree()
-                               :
-                               0);
+                              this->get_stokes_velocity_degree()
+                              :
+                              0);
 
       std::string solution_file_prefix = "solution-" + Utilities::int_to_string (output_file_number, 5);
       std::string mesh_file_prefix = "mesh-" + Utilities::int_to_string (output_file_number, 5);
@@ -656,10 +656,10 @@ namespace aspect
                              "\\end{center}"
                              "Here, the left picture shows one visualization cell per "
                              "computational cell (i.e., the option is switch off, as is the "
-			     "default), and the right picture shows the same simulation with the "
-			     "option switched on. The images show the same data, demonstrating "
-			     "that interpolating the solution onto bilinear shape functions as is "
-			     "commonly done in visualizing data loses information."
+                             "default), and the right picture shows the same simulation with the "
+                             "option switched on. The images show the same data, demonstrating "
+                             "that interpolating the solution onto bilinear shape functions as is "
+                             "commonly done in visualizing data loses information."
                              "\n\n"
                              "Of course, activating this option also greatly increases the amount of "
                              "data \\aspect{} will write to disk: approximately by a factor of 4 in 2d, "
diff --git a/source/postprocess/visualization/dynamic_topography.cc b/source/postprocess/visualization/dynamic_topography.cc
index 9872f57..df69f65 100644
--- a/source/postprocess/visualization/dynamic_topography.cc
+++ b/source/postprocess/visualization/dynamic_topography.cc
@@ -82,10 +82,10 @@ namespace aspect
                   bool is_at_top = false;
                   for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
                     if (cell->at_boundary(f) && this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
-                        {
-                          is_at_top = true;
-                          break;
-                        }
+                      {
+                        is_at_top = true;
+                        break;
+                      }
 
                   if (is_at_top == false)
                     {
@@ -151,23 +151,23 @@ namespace aspect
                     // necessary for when a quadrature formula is used that has more than one point.
                     dynamic_topography_x_volume += dynamic_topography * fe_values.JxW(q);
                     volume += fe_values.JxW(q);
-                 }
-       
-                 const double dynamic_topography_cell_average = dynamic_topography_x_volume / volume;
-                 // Compute the associated surface area to later compute the surfaces weighted integral
-                 double surface = 0;
-                 for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
-                   if (cell->at_boundary(f) && this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
-                       {
-                       fe_face_values.reinit(cell,f);
-                       surface = fe_face_values.JxW(0);
-                       }
-
-                 integrated_topography += dynamic_topography_cell_average*surface;
-                 integrated_surface_area += surface;
-       
-                 (*return_value.second)(cell_index) = dynamic_topography_cell_average;
-               }
+                  }
+
+                const double dynamic_topography_cell_average = dynamic_topography_x_volume / volume;
+                // Compute the associated surface area to later compute the surfaces weighted integral
+                double surface = 0;
+                for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
+                  if (cell->at_boundary(f) && this->get_geometry_model().depth (cell->face(f)->center()) < cell->face(f)->minimum_vertex_distance()/3)
+                    {
+                      fe_face_values.reinit(cell,f);
+                      surface = fe_face_values.JxW(0);
+                    }
+
+                integrated_topography += dynamic_topography_cell_average*surface;
+                integrated_surface_area += surface;
+
+                (*return_value.second)(cell_index) = dynamic_topography_cell_average;
+              }
 
         // Calculate surface weighted average 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());
diff --git a/source/simulator/assembly.cc b/source/simulator/assembly.cc
index 3c427dc..f91e595 100644
--- a/source/simulator/assembly.cc
+++ b/source/simulator/assembly.cc
@@ -1352,16 +1352,16 @@ namespace aspect
           0)
          +
          // add the term from adiabatic compression heating
-	 //   + alpha T (u . nabla p)
+         //   + alpha T (u . nabla p)
          // where we use the definition of
          //   alpha = - 1/rho drho/dT
-	 // Note: this term is often simplified using the relationship
-	 //   rho g = -nabla p
-	 // to yield
-	 //   - alpha rho T (u . g)
-	 // However, we do not use this simplification here, see the
-	 // comment in the manual in the section on the governing
-	 // equations
+         // Note: this term is often simplified using the relationship
+         //   rho g = -nabla p
+         // to yield
+         //   - alpha rho T (u . g)
+         // However, we do not use this simplification here, see the
+         // comment in the manual in the section on the governing
+         // equations
          (parameters.include_adiabatic_heating
           ?
           (current_u * current_grad_p) * alpha * current_T
diff --git a/source/simulator/core.cc b/source/simulator/core.cc
index bcbe660..d29136e 100644
--- a/source/simulator/core.cc
+++ b/source/simulator/core.cc
@@ -712,7 +712,7 @@ namespace aspect
         }
     }
 
-      // now do the same for the composition variable:
+    // now do the same for the composition variable:
     {
       // If there are fixed boundary compositions,
       // update the composition boundary condition.
diff --git a/source/velocity_boundary_conditions/gplates.cc b/source/velocity_boundary_conditions/gplates.cc
index ba8cc7f..78688e0 100644
--- a/source/velocity_boundary_conditions/gplates.cc
+++ b/source/velocity_boundary_conditions/gplates.cc
@@ -240,7 +240,7 @@ namespace aspect
             // Currently it would not be necessary to update the grid positions at every timestep
             // since they are not allowed to change. In case we allow this later, do it anyway.
             Tensor<1,3> spherical_position = get_grid_point_position(idx_theta,idx_phi,false);
-            if(idx_theta==0 || idx_theta==n_theta-1)
+            if (idx_theta==0 || idx_theta==n_theta-1)
               // Gplate gpml files set the longitude of all points at poles to zero instead of vary from -180 to 180 degrees,
               // we set this here as well to make sure that we get the correct cartesian velocity.
               spherical_position[1]=0.;



More information about the CIG-COMMITS mailing list