[cig-commits] r1390 - in trunk/aspect: include/aspect/mesh_refinement source/material_model source/mesh_refinement source/simulator

bangerth at dealii.org bangerth at dealii.org
Wed Nov 28 06:14:20 PST 2012


Author: bangerth
Date: 2012-11-28 07:14:20 -0700 (Wed, 28 Nov 2012)
New Revision: 1390

Modified:
   trunk/aspect/include/aspect/mesh_refinement/interface.h
   trunk/aspect/source/material_model/simple.cc
   trunk/aspect/source/mesh_refinement/interface.cc
   trunk/aspect/source/simulator/assembly.cc
   trunk/aspect/source/simulator/core.cc
Log:
Reindent.

Modified: trunk/aspect/include/aspect/mesh_refinement/interface.h
===================================================================
--- trunk/aspect/include/aspect/mesh_refinement/interface.h	2012-11-28 14:08:16 UTC (rev 1389)
+++ trunk/aspect/include/aspect/mesh_refinement/interface.h	2012-11-28 14:14:20 UTC (rev 1390)
@@ -183,9 +183,9 @@
         static
         void
         register_mesh_refinement_criterion (const std::string &name,
-                                const std::string &description,
-                                void (*declare_parameters_function) (ParameterHandler &),
-                                Interface<dim> *(*factory_function) ());
+                                            const std::string &description,
+                                            void (*declare_parameters_function) (ParameterHandler &),
+                                            Interface<dim> *(*factory_function) ());
 
         /**
          * Exception.

Modified: trunk/aspect/source/material_model/simple.cc
===================================================================
--- trunk/aspect/source/material_model/simple.cc	2012-11-28 14:08:16 UTC (rev 1389)
+++ trunk/aspect/source/material_model/simple.cc	2012-11-28 14:14:20 UTC (rev 1390)
@@ -50,7 +50,7 @@
         {
           //geometric interpolation
           return (pow(10, ((1-composition[0]) * log10(eta*temperature_dependence)
-                         + composition[0] * log10(eta*composition_viscosity_prefactor*temperature_dependence))));
+                           + composition[0] * log10(eta*composition_viscosity_prefactor*temperature_dependence))));
         }
 
       return composition_dependence * temperature_dependence * eta;

Modified: trunk/aspect/source/mesh_refinement/interface.cc
===================================================================
--- trunk/aspect/source/mesh_refinement/interface.cc	2012-11-28 14:08:16 UTC (rev 1389)
+++ trunk/aspect/source/mesh_refinement/interface.cc	2012-11-28 14:14:20 UTC (rev 1390)
@@ -71,8 +71,8 @@
       // 'using' declaration we can promote it to a public member).
       class MySimulatorAccess : public SimulatorAccess<dim>
       {
-      public:
-        using SimulatorAccess<dim>::get_mpi_communicator;
+        public:
+          using SimulatorAccess<dim>::get_mpi_communicator;
       };
       MySimulatorAccess simulator_access;
       simulator_access.initialize (simulator);
@@ -89,25 +89,25 @@
       // here in turns. then normalize the output vector and
       // verify that its values are non-negative numbers
       std::vector<Vector<float> > all_error_indicators (mesh_refinement_objects.size(),
-          Vector<float>(error_indicators.size()));
+                                                        Vector<float>(error_indicators.size()));
       unsigned int index = 0;
       for (typename std::list<std_cxx1x::shared_ptr<Interface<dim> > >::iterator
            p = mesh_refinement_objects.begin();
            p != mesh_refinement_objects.end(); ++p, ++index)
         {
           try
-          {
-           (*p)->execute (all_error_indicators[index]);
+            {
+              (*p)->execute (all_error_indicators[index]);
 
-           for (unsigned int i=0; i<error_indicators.size(); ++i)
-             Assert (all_error_indicators[index](i) >= 0,
-                 ExcMessage ("Error indicators must be non-negative numbers!"));
+              for (unsigned int i=0; i<error_indicators.size(); ++i)
+                Assert (all_error_indicators[index](i) >= 0,
+                        ExcMessage ("Error indicators must be non-negative numbers!"));
 
-           const double global_max = Utilities::MPI::max (all_error_indicators[index].linfty_norm(),
-               mpi_communicator);
-           if (global_max != 0)
-             all_error_indicators[index] /= global_max;
-          }
+              const double global_max = Utilities::MPI::max (all_error_indicators[index].linfty_norm(),
+                                                             mpi_communicator);
+              if (global_max != 0)
+                all_error_indicators[index] /= global_max;
+            }
           // plugins that throw exceptions usually do not result in
           // anything good because they result in an unwinding of the stack
           // and, if only one processor triggers an exception, the
@@ -197,18 +197,18 @@
                           std_cxx1x::get<dim>(registered_plugins).get_description_string());
 
         prm.declare_entry("Merge operation",
-            "plus",
-            Patterns::Selection("plus|max"),
-            "If multiple mesh refinement criteria are computed for each cell, "
-            "then one will have to decide which one should win when deciding "
-            "which cell to refine. The operation that selects from these competing "
-            "criteria is the one that is selected here. The options are:\n\n"
-            "\\begin{itemize}\n"
-            "\\item \\texttt{plus}: Add the various error indicators together and "
-            "refine those cells on which the sum of indicators is largest.\n"
-            "\\item \\texttt{max}: Take the maximum of the various error indicators and "
-            "refine those cells on which the maximal indicators is largest.\n"
-            "\\end{itemize}");
+                          "plus",
+                          Patterns::Selection("plus|max"),
+                          "If multiple mesh refinement criteria are computed for each cell, "
+                          "then one will have to decide which one should win when deciding "
+                          "which cell to refine. The operation that selects from these competing "
+                          "criteria is the one that is selected here. The options are:\n\n"
+                          "\\begin{itemize}\n"
+                          "\\item \\texttt{plus}: Add the various error indicators together and "
+                          "refine those cells on which the sum of indicators is largest.\n"
+                          "\\item \\texttt{max}: Take the maximum of the various error indicators and "
+                          "refine those cells on which the maximal indicators is largest.\n"
+                          "\\end{itemize}");
       }
       prm.leave_subsection();
 
@@ -247,18 +247,18 @@
       // their own parameters
       for (unsigned int name=0; name<plugin_names.size(); ++name)
         mesh_refinement_objects.push_back (std_cxx1x::shared_ptr<Interface<dim> >
-                                  (std_cxx1x::get<dim>(registered_plugins)
-                                   .create_plugin (plugin_names[name],
-                                                   prm)));
+                                           (std_cxx1x::get<dim>(registered_plugins)
+                                            .create_plugin (plugin_names[name],
+                                                            prm)));
     }
 
 
     template <int dim>
     void
     Manager<dim>::register_mesh_refinement_criterion (const std::string &name,
-                                          const std::string &description,
-                                          void (*declare_parameters_function) (ParameterHandler &),
-                                          Interface<dim> *(*factory_function) ())
+                                                      const std::string &description,
+                                                      void (*declare_parameters_function) (ParameterHandler &),
+                                                      Interface<dim> *(*factory_function) ())
     {
       std_cxx1x::get<dim>(registered_plugins).register_plugin (name,
                                                                description,

Modified: trunk/aspect/source/simulator/assembly.cc
===================================================================
--- trunk/aspect/source/simulator/assembly.cc	2012-11-28 14:08:16 UTC (rev 1389)
+++ trunk/aspect/source/simulator/assembly.cc	2012-11-28 14:14:20 UTC (rev 1390)
@@ -1433,8 +1433,8 @@
   template void Simulator<dim>::copy_local_to_global_advection_system ( \
                                                                         const internal::Assembly::CopyData::AdvectionSystem<dim> &data); \
   template void Simulator<dim>::assemble_advection_system (const unsigned int index); \
+   
 
 
-
   ASPECT_INSTANTIATE(INSTANTIATE)
 }

Modified: trunk/aspect/source/simulator/core.cc
===================================================================
--- trunk/aspect/source/simulator/core.cc	2012-11-28 14:08:16 UTC (rev 1389)
+++ trunk/aspect/source/simulator/core.cc	2012-11-28 14:14:20 UTC (rev 1390)
@@ -243,21 +243,21 @@
     // the currently used values into a file
     // Only write the parameter files on the root node to avoid file system conflicts
     if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
-    {
-      std::ofstream prm_out ((parameters.output_directory + "parameters.prm").c_str());
-      AssertThrow (prm_out,
-                   ExcMessage (std::string("Couldn't open file <") +
-                               parameters.output_directory + "parameters.prm>."));
-      prm.print_parameters(prm_out, ParameterHandler::Text);
-    }
+      {
+        std::ofstream prm_out ((parameters.output_directory + "parameters.prm").c_str());
+        AssertThrow (prm_out,
+                     ExcMessage (std::string("Couldn't open file <") +
+                                 parameters.output_directory + "parameters.prm>."));
+        prm.print_parameters(prm_out, ParameterHandler::Text);
+      }
     if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
-    {
-      std::ofstream prm_out ((parameters.output_directory + "parameters.tex").c_str());
-      AssertThrow (prm_out,
-                   ExcMessage (std::string("Couldn't open file <") +
-                               parameters.output_directory + "parameters.tex>."));
-      prm.print_parameters(prm_out, ParameterHandler::LaTeX);
-    }
+      {
+        std::ofstream prm_out ((parameters.output_directory + "parameters.tex").c_str());
+        AssertThrow (prm_out,
+                     ExcMessage (std::string("Couldn't open file <") +
+                                 parameters.output_directory + "parameters.tex>."));
+        prm.print_parameters(prm_out, ParameterHandler::LaTeX);
+      }
     computing_timer.exit_section();
   }
 



More information about the CIG-COMMITS mailing list