]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Improve indentation.
authorDavid Wells <wellsd2@rpi.edu>
Sat, 9 Jan 2016 19:17:33 +0000 (14:17 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 9 Jan 2016 21:46:35 +0000 (16:46 -0500)
cdr/common/include/deal.II-cdr/system_matrix.h
cdr/common/include/deal.II-cdr/system_matrix.templates.h
cdr/common/include/deal.II-cdr/system_rhs.h
cdr/common/include/deal.II-cdr/system_rhs.templates.h
cdr/common/include/deal.II-cdr/write_pvtu_output.h
cdr/common/include/deal.II-cdr/write_pvtu_output.templates.h
cdr/common/source/system_matrix.cc
cdr/common/source/system_rhs.cc
cdr/common/source/write_pvtu_output.cc
cdr/solver/cdr.cc

index bb84c0d438ea588f56787ac5d5a9bb7b6c7bf9fe..4697587fda1d0e590bdabb9466e9e31ec4b2a47c 100644 (file)
@@ -18,7 +18,7 @@ namespace CDR
   void create_system_matrix
   (const DoFHandler<dim>                                 &dof_handler,
    const QGauss<dim>                                     &quad,
-   const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+   const std::function<Tensor<1, dim>(const Point<dim>)>  convection_function,
    const CDR::Parameters                                 &parameters,
    const double                                           time_step,
    MatrixType                                            &system_matrix);
@@ -27,9 +27,9 @@ namespace CDR
   void create_system_matrix
   (const DoFHandler<dim>                                 &dof_handler,
    const QGauss<dim>                                     &quad,
-   const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+   const std::function<Tensor<1, dim>(const Point<dim>)>  convection_function,
    const CDR::Parameters                                 &parameters,
-   const double                                          time_step,
+   const double                                           time_step,
    const ConstraintMatrix                                &constraints,
    MatrixType                                            &system_matrix);
 }
index 6589e83bed7dbe3b17e9083ac3d270975820cf73..41f7c4c381e0c4bfdc8e0edef7be8eedf6b0b880 100644 (file)
@@ -23,10 +23,10 @@ namespace CDR
   void internal_create_system_matrix
   (const DoFHandler<dim>                                 &dof_handler,
    const QGauss<dim>                                     &quad,
-   const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+   const std::function<Tensor<1, dim>(const Point<dim>)>  convection_function,
    const CDR::Parameters                                 &parameters,
-   const double                                          time_step,
-   UpdateFunction                                        update_system_matrix)
+   const double                                           time_step,
+   UpdateFunction                                         update_system_matrix)
   {
     auto &fe = dof_handler.get_fe();
     const auto dofs_per_cell = fe.dofs_per_cell;
@@ -77,9 +77,9 @@ namespace CDR
   void create_system_matrix
   (const DoFHandler<dim>                                 &dof_handler,
    const QGauss<dim>                                     &quad,
-   const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+   const std::function<Tensor<1, dim>(const Point<dim>)>  convection_function,
    const CDR::Parameters                                 &parameters,
-   const double                                          time_step,
+   const double                                           time_step,
    const ConstraintMatrix                                &constraints,
    MatrixType                                            &system_matrix)
   {
@@ -97,9 +97,9 @@ namespace CDR
   void create_system_matrix
   (const DoFHandler<dim>                                 &dof_handler,
    const QGauss<dim>                                     &quad,
-   const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+   const std::function<Tensor<1, dim>(const Point<dim>)>  convection_function,
    const CDR::Parameters                                 &parameters,
-   const double                                          time_step,
+   const double                                           time_step,
    MatrixType                                            &system_matrix)
   {
     internal_create_system_matrix<dim>
index e3cbd3588d42c477ed75604f9c85d4c18e37a758..96c8cb4db533abd732525c4a443bc8a9bcf20586 100644 (file)
@@ -20,12 +20,12 @@ namespace CDR
   void create_system_rhs
   (const DoFHandler<dim>                                 &dof_handler,
    const QGauss<dim>                                     &quad,
-   const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
-   const std::function<double(double, const Point<dim>)> forcing_function,
+   const std::function<Tensor<1, dim>(const Point<dim>)>  convection_function,
+   const std::function<double(double, const Point<dim>)>  forcing_function,
    const CDR::Parameters                                 &parameters,
    const VectorType                                      &previous_solution,
    const ConstraintMatrix                                &constraints,
-   const double                                          current_time,
+   const double                                           current_time,
    VectorType                                            &system_rhs);
 }
 #endif
index de81e6829e69d101b8742b43dafa6cdd7aa47bb8..efbac5c4bba145e28750aee3c454575c9f5a84a9 100644 (file)
@@ -26,12 +26,12 @@ namespace CDR
   void create_system_rhs
   (const DoFHandler<dim>                                 &dof_handler,
    const QGauss<dim>                                     &quad,
-   const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
-   const std::function<double(double, const Point<dim>)> forcing_function,
+   const std::function<Tensor<1, dim>(const Point<dim>)>  convection_function,
+   const std::function<double(double, const Point<dim>)>  forcing_function,
    const CDR::Parameters                                 &parameters,
    const VectorType                                      &previous_solution,
    const ConstraintMatrix                                &constraints,
-   const double                                          current_time,
+   const double                                           current_time,
    VectorType                                            &system_rhs)
   {
     auto &fe = dof_handler.get_fe();
index 218d9ed856cb9a2a6f3b5eb874b08272f02bf50e..92e793eed5dbe0ea0499bbef8123cd671da73b86 100644 (file)
@@ -14,8 +14,8 @@ namespace CDR
     template<int dim, typename VectorType>
     void write_output(const DoFHandler<dim> &dof_handler,
                       const VectorType      &solution,
-                      const unsigned int    time_step_n,
-                      const double          current_time);
+                      const unsigned int     time_step_n,
+                      const double           current_time);
   private:
     const unsigned int patch_level;
     const unsigned int this_mpi_process;
index 6179aca37e8cf9d5fb1731ee64def44779b03ca6..5f2f63dcbe3ea0feb87bc51da7b5548cc785410e 100644 (file)
@@ -22,8 +22,8 @@ namespace CDR
   template<int dim, typename VectorType>
   void WritePVTUOutput::write_output(const DoFHandler<dim> &dof_handler,
                                      const VectorType      &solution,
-                                     const unsigned int    time_step_n,
-                                     const double          current_time)
+                                     const unsigned int     time_step_n,
+                                     const double           current_time)
   {
     DataOut<dim> data_out;
     data_out.attach_dof_handler(dof_handler);
index a1934e011090467d3a7baa8727ccc592e16a38a7..ae90c0b58044ef873df6defac71d23ba25d1488c 100644 (file)
@@ -13,27 +13,27 @@ namespace CDR
   void create_system_matrix<2, SparseMatrix<double>>
   (const DoFHandler<2>                               &dof_handler,
    const QGauss<2>                                   &quad,
-   const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+   const std::function<Tensor<1, 2>(const Point<2>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    SparseMatrix<double>                              &system_matrix);
 
   template
   void create_system_matrix<3, SparseMatrix<double>>
   (const DoFHandler<3>                               &dof_handler,
    const QGauss<3>                                   &quad,
-   const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+   const std::function<Tensor<1, 3>(const Point<3>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    SparseMatrix<double>                              &system_matrix);
 
   template
   void create_system_matrix<2, SparseMatrix<double>>
   (const DoFHandler<2>                               &dof_handler,
    const QGauss<2>                                   &quad,
-   const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+   const std::function<Tensor<1, 2>(const Point<2>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    const ConstraintMatrix                            &constraints,
    SparseMatrix<double>                              &system_matrix);
 
@@ -41,9 +41,9 @@ namespace CDR
   void create_system_matrix<3, SparseMatrix<double>>
   (const DoFHandler<3>                               &dof_handler,
    const QGauss<3>                                   &quad,
-   const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+   const std::function<Tensor<1, 3>(const Point<3>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    const ConstraintMatrix                            &constraints,
    SparseMatrix<double>                              &system_matrix);
 
@@ -51,27 +51,27 @@ namespace CDR
   void create_system_matrix<2, TrilinosWrappers::SparseMatrix>
   (const DoFHandler<2>                               &dof_handler,
    const QGauss<2>                                   &quad,
-   const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+   const std::function<Tensor<1, 2>(const Point<2>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    TrilinosWrappers::SparseMatrix                    &system_matrix);
 
   template
   void create_system_matrix<3, TrilinosWrappers::SparseMatrix>
   (const DoFHandler<3>                               &dof_handler,
    const QGauss<3>                                   &quad,
-   const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+   const std::function<Tensor<1, 3>(const Point<3>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    TrilinosWrappers::SparseMatrix                    &system_matrix);
 
   template
   void create_system_matrix<2, TrilinosWrappers::SparseMatrix>
   (const DoFHandler<2>                               &dof_handler,
    const QGauss<2>                                   &quad,
-   const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+   const std::function<Tensor<1, 2>(const Point<2>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    const ConstraintMatrix                            &constraints,
    TrilinosWrappers::SparseMatrix                    &system_matrix);
 
@@ -79,9 +79,9 @@ namespace CDR
   void create_system_matrix<3, TrilinosWrappers::SparseMatrix>
   (const DoFHandler<3>                               &dof_handler,
    const QGauss<3>                                   &quad,
-   const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+   const std::function<Tensor<1, 3>(const Point<3>)>  convection_function,
    const CDR::Parameters                             &parameters,
-   const double                                      time_step,
+   const double                                       time_step,
    const ConstraintMatrix                            &constraints,
    TrilinosWrappers::SparseMatrix                    &system_matrix);
 }
index 82b286d53f19c031e40467193a6b4afb66691fd3..4374d734634bf195e9e727ffb06d26c3e6fd89e6 100644 (file)
@@ -13,47 +13,47 @@ namespace CDR
   void create_system_rhs<2, Vector<double>>
   (const DoFHandler<2>                                 &dof_handler,
    const QGauss<2>                                     &quad,
-   const std::function<Tensor<1, 2>(const Point<2>)>   convection_function,
-   const std::function<double(double, const Point<2>)> forcing_function,
+   const std::function<Tensor<1, 2>(const Point<2>)>    convection_function,
+   const std::function<double(double, const Point<2>)>  forcing_function,
    const CDR::Parameters                               &parameters,
    const Vector<double>                                &previous_solution,
    const ConstraintMatrix                              &constraints,
-   const double                                        current_time,
+   const double                                         current_time,
    Vector<double>                                      &system_rhs);
 
   template
   void create_system_rhs<3, Vector<double>>
   (const DoFHandler<3>                                 &dof_handler,
    const QGauss<3>                                     &quad,
-   const std::function<Tensor<1, 3>(const Point<3>)>   convection_function,
-   const std::function<double(double, const Point<3>)> forcing_function,
+   const std::function<Tensor<1, 3>(const Point<3>)>    convection_function,
+   const std::function<double(double, const Point<3>)>  forcing_function,
    const CDR::Parameters                               &parameters,
    const Vector<double>                                &previous_solution,
    const ConstraintMatrix                              &constraints,
-   const double                                        current_time,
+   const double                                         current_time,
    Vector<double>                                      &system_rhs);
 
   template
   void create_system_rhs<2, TrilinosWrappers::MPI::Vector>
   (const DoFHandler<2>                                 &dof_handler,
    const QGauss<2>                                     &quad,
-   const std::function<Tensor<1, 2>(const Point<2>)>   convection_function,
-   const std::function<double(double, const Point<2>)> forcing_function,
+   const std::function<Tensor<1, 2>(const Point<2>)>    convection_function,
+   const std::function<double(double, const Point<2>)>  forcing_function,
    const CDR::Parameters                               &parameters,
    const TrilinosWrappers::MPI::Vector                 &previous_solution,
    const ConstraintMatrix                              &constraints,
-   const double                                        current_time,
+   const double                                         current_time,
    TrilinosWrappers::MPI::Vector                       &system_rhs);
 
   template
   void create_system_rhs<3, TrilinosWrappers::MPI::Vector>
   (const DoFHandler<3>                                 &dof_handler,
    const QGauss<3>                                     &quad,
-   const std::function<Tensor<1, 3>(const Point<3>)>   convection_function,
-   const std::function<double(double, const Point<3>)> forcing_function,
+   const std::function<Tensor<1, 3>(const Point<3>)>    convection_function,
+   const std::function<double(double, const Point<3>)>  forcing_function,
    const CDR::Parameters                               &parameters,
    const TrilinosWrappers::MPI::Vector                 &previous_solution,
    const ConstraintMatrix                              &constraints,
-   const double                                        current_time,
+   const double                                         current_time,
    TrilinosWrappers::MPI::Vector                       &system_rhs);
 }
index c98f6a3a77b824d07c7d6b242fac14cc52b26458..4e27847d9f3d45ab85e2e6aa16ab64573ce17bbd 100644 (file)
@@ -15,24 +15,24 @@ namespace CDR
   template
   void WritePVTUOutput::write_output(const DoFHandler<2>  &dof_handler,
                                      const Vector<double> &solution,
-                                     const unsigned int   time_step_n,
-                                     const double         current_time);
+                                     const unsigned int    time_step_n,
+                                     const double          current_time);
 
   template
   void WritePVTUOutput::write_output(const DoFHandler<3>  &dof_handler,
                                      const Vector<double> &solution,
-                                     const unsigned int   time_step_n,
-                                     const double         current_time);
+                                     const unsigned int    time_step_n,
+                                     const double          current_time);
 
   template
   void WritePVTUOutput::write_output(const DoFHandler<2>                 &dof_handler,
                                      const TrilinosWrappers::MPI::Vector &solution,
-                                     const unsigned int                  time_step_n,
-                                     const double                        current_time);
+                                     const unsigned int                   time_step_n,
+                                     const double                         current_time);
 
   template
   void WritePVTUOutput::write_output(const DoFHandler<3>                 &dof_handler,
                                      const TrilinosWrappers::MPI::Vector &solution,
-                                     const unsigned int                  time_step_n,
-                                     const double                        current_time);
+                                     const unsigned int                   time_step_n,
+                                     const double                         current_time);
 }
index 4de786506ab18f490dd65f876586887072532ef8..fffb44275d934a183c051eb1c5ed09f7eb95bfec 100644 (file)
@@ -103,20 +103,20 @@ CDRProblem<dim>::CDRProblem(const CDR::Parameters &parameters) :
                  Triangulation<dim>::smoothing_on_coarsening)),
   dof_handler(triangulation),
   convection_function
-{
-  [](const Point<dim> p) -> Tensor<1, dim>
-  {Tensor<1, dim> v; v[0] = -p[1]; v[1] = p[0]; return v;}},
-forcing_function
-{
-  [](double t, const Point<dim> p) -> double
   {
-    return std::exp(-8*t)*std::exp(-40*Utilities::fixed_power<6>(p[0] - 1.5))
-    *std::exp(-40*Utilities::fixed_power<6>(p[1]));
-  }},
-first_run {true},
-          pcout (std::cout,
-                 (Utilities::MPI::this_mpi_process(mpi_communicator)
-                  == 0))
+    [](const Point<dim> p) -> Tensor<1, dim>
+      {Tensor<1, dim> v; v[0] = -p[1]; v[1] = p[0]; return v;}
+  },
+  forcing_function
+  {
+    [](double t, const Point<dim> p) -> double
+      {
+        return std::exp(-8*t)*std::exp(-40*Utilities::fixed_power<6>(p[0] - 1.5))
+          *std::exp(-40*Utilities::fixed_power<6>(p[1]));
+      }
+  },
+  first_run {true},
+  pcout (std::cout, this_mpi_process == 0)
 {
   Assert(dim == 2, ExcNotImplemented());
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.