From: David Wells Date: Sat, 9 Jan 2016 19:17:33 +0000 (-0500) Subject: Improve indentation. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0a70a195f64048f7d410ca1471f0f57006ccd7;p=code-gallery.git Improve indentation. --- diff --git a/cdr/common/include/deal.II-cdr/system_matrix.h b/cdr/common/include/deal.II-cdr/system_matrix.h index bb84c0d..4697587 100644 --- a/cdr/common/include/deal.II-cdr/system_matrix.h +++ b/cdr/common/include/deal.II-cdr/system_matrix.h @@ -18,7 +18,7 @@ namespace CDR void create_system_matrix (const DoFHandler &dof_handler, const QGauss &quad, - const std::function(const Point)> convection_function, + const std::function(const Point)> convection_function, const CDR::Parameters ¶meters, const double time_step, MatrixType &system_matrix); @@ -27,9 +27,9 @@ namespace CDR void create_system_matrix (const DoFHandler &dof_handler, const QGauss &quad, - const std::function(const Point)> convection_function, + const std::function(const Point)> convection_function, const CDR::Parameters ¶meters, - const double time_step, + const double time_step, const ConstraintMatrix &constraints, MatrixType &system_matrix); } diff --git a/cdr/common/include/deal.II-cdr/system_matrix.templates.h b/cdr/common/include/deal.II-cdr/system_matrix.templates.h index 6589e83..41f7c4c 100644 --- a/cdr/common/include/deal.II-cdr/system_matrix.templates.h +++ b/cdr/common/include/deal.II-cdr/system_matrix.templates.h @@ -23,10 +23,10 @@ namespace CDR void internal_create_system_matrix (const DoFHandler &dof_handler, const QGauss &quad, - const std::function(const Point)> convection_function, + const std::function(const Point)> convection_function, const CDR::Parameters ¶meters, - 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 &dof_handler, const QGauss &quad, - const std::function(const Point)> convection_function, + const std::function(const Point)> convection_function, const CDR::Parameters ¶meters, - 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 &dof_handler, const QGauss &quad, - const std::function(const Point)> convection_function, + const std::function(const Point)> convection_function, const CDR::Parameters ¶meters, - const double time_step, + const double time_step, MatrixType &system_matrix) { internal_create_system_matrix diff --git a/cdr/common/include/deal.II-cdr/system_rhs.h b/cdr/common/include/deal.II-cdr/system_rhs.h index e3cbd35..96c8cb4 100644 --- a/cdr/common/include/deal.II-cdr/system_rhs.h +++ b/cdr/common/include/deal.II-cdr/system_rhs.h @@ -20,12 +20,12 @@ namespace CDR void create_system_rhs (const DoFHandler &dof_handler, const QGauss &quad, - const std::function(const Point)> convection_function, - const std::function)> forcing_function, + const std::function(const Point)> convection_function, + const std::function)> forcing_function, const CDR::Parameters ¶meters, const VectorType &previous_solution, const ConstraintMatrix &constraints, - const double current_time, + const double current_time, VectorType &system_rhs); } #endif diff --git a/cdr/common/include/deal.II-cdr/system_rhs.templates.h b/cdr/common/include/deal.II-cdr/system_rhs.templates.h index de81e68..efbac5c 100644 --- a/cdr/common/include/deal.II-cdr/system_rhs.templates.h +++ b/cdr/common/include/deal.II-cdr/system_rhs.templates.h @@ -26,12 +26,12 @@ namespace CDR void create_system_rhs (const DoFHandler &dof_handler, const QGauss &quad, - const std::function(const Point)> convection_function, - const std::function)> forcing_function, + const std::function(const Point)> convection_function, + const std::function)> forcing_function, const CDR::Parameters ¶meters, const VectorType &previous_solution, const ConstraintMatrix &constraints, - const double current_time, + const double current_time, VectorType &system_rhs) { auto &fe = dof_handler.get_fe(); diff --git a/cdr/common/include/deal.II-cdr/write_pvtu_output.h b/cdr/common/include/deal.II-cdr/write_pvtu_output.h index 218d9ed..92e793e 100644 --- a/cdr/common/include/deal.II-cdr/write_pvtu_output.h +++ b/cdr/common/include/deal.II-cdr/write_pvtu_output.h @@ -14,8 +14,8 @@ namespace CDR template void write_output(const DoFHandler &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; diff --git a/cdr/common/include/deal.II-cdr/write_pvtu_output.templates.h b/cdr/common/include/deal.II-cdr/write_pvtu_output.templates.h index 6179aca..5f2f63d 100644 --- a/cdr/common/include/deal.II-cdr/write_pvtu_output.templates.h +++ b/cdr/common/include/deal.II-cdr/write_pvtu_output.templates.h @@ -22,8 +22,8 @@ namespace CDR template void WritePVTUOutput::write_output(const DoFHandler &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 data_out; data_out.attach_dof_handler(dof_handler); diff --git a/cdr/common/source/system_matrix.cc b/cdr/common/source/system_matrix.cc index a1934e0..ae90c0b 100644 --- a/cdr/common/source/system_matrix.cc +++ b/cdr/common/source/system_matrix.cc @@ -13,27 +13,27 @@ namespace CDR void create_system_matrix<2, SparseMatrix> (const DoFHandler<2> &dof_handler, const QGauss<2> &quad, - const std::function(const Point<2>)> convection_function, + const std::function(const Point<2>)> convection_function, const CDR::Parameters ¶meters, - const double time_step, + const double time_step, SparseMatrix &system_matrix); template void create_system_matrix<3, SparseMatrix> (const DoFHandler<3> &dof_handler, const QGauss<3> &quad, - const std::function(const Point<3>)> convection_function, + const std::function(const Point<3>)> convection_function, const CDR::Parameters ¶meters, - const double time_step, + const double time_step, SparseMatrix &system_matrix); template void create_system_matrix<2, SparseMatrix> (const DoFHandler<2> &dof_handler, const QGauss<2> &quad, - const std::function(const Point<2>)> convection_function, + const std::function(const Point<2>)> convection_function, const CDR::Parameters ¶meters, - const double time_step, + const double time_step, const ConstraintMatrix &constraints, SparseMatrix &system_matrix); @@ -41,9 +41,9 @@ namespace CDR void create_system_matrix<3, SparseMatrix> (const DoFHandler<3> &dof_handler, const QGauss<3> &quad, - const std::function(const Point<3>)> convection_function, + const std::function(const Point<3>)> convection_function, const CDR::Parameters ¶meters, - const double time_step, + const double time_step, const ConstraintMatrix &constraints, SparseMatrix &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(const Point<2>)> convection_function, + const std::function(const Point<2>)> convection_function, const CDR::Parameters ¶meters, - 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(const Point<3>)> convection_function, + const std::function(const Point<3>)> convection_function, const CDR::Parameters ¶meters, - 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(const Point<2>)> convection_function, + const std::function(const Point<2>)> convection_function, const CDR::Parameters ¶meters, - 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(const Point<3>)> convection_function, + const std::function(const Point<3>)> convection_function, const CDR::Parameters ¶meters, - const double time_step, + const double time_step, const ConstraintMatrix &constraints, TrilinosWrappers::SparseMatrix &system_matrix); } diff --git a/cdr/common/source/system_rhs.cc b/cdr/common/source/system_rhs.cc index 82b286d..4374d73 100644 --- a/cdr/common/source/system_rhs.cc +++ b/cdr/common/source/system_rhs.cc @@ -13,47 +13,47 @@ namespace CDR void create_system_rhs<2, Vector> (const DoFHandler<2> &dof_handler, const QGauss<2> &quad, - const std::function(const Point<2>)> convection_function, - const std::function)> forcing_function, + const std::function(const Point<2>)> convection_function, + const std::function)> forcing_function, const CDR::Parameters ¶meters, const Vector &previous_solution, const ConstraintMatrix &constraints, - const double current_time, + const double current_time, Vector &system_rhs); template void create_system_rhs<3, Vector> (const DoFHandler<3> &dof_handler, const QGauss<3> &quad, - const std::function(const Point<3>)> convection_function, - const std::function)> forcing_function, + const std::function(const Point<3>)> convection_function, + const std::function)> forcing_function, const CDR::Parameters ¶meters, const Vector &previous_solution, const ConstraintMatrix &constraints, - const double current_time, + const double current_time, Vector &system_rhs); template void create_system_rhs<2, TrilinosWrappers::MPI::Vector> (const DoFHandler<2> &dof_handler, const QGauss<2> &quad, - const std::function(const Point<2>)> convection_function, - const std::function)> forcing_function, + const std::function(const Point<2>)> convection_function, + const std::function)> forcing_function, const CDR::Parameters ¶meters, 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(const Point<3>)> convection_function, - const std::function)> forcing_function, + const std::function(const Point<3>)> convection_function, + const std::function)> forcing_function, const CDR::Parameters ¶meters, const TrilinosWrappers::MPI::Vector &previous_solution, const ConstraintMatrix &constraints, - const double current_time, + const double current_time, TrilinosWrappers::MPI::Vector &system_rhs); } diff --git a/cdr/common/source/write_pvtu_output.cc b/cdr/common/source/write_pvtu_output.cc index c98f6a3..4e27847 100644 --- a/cdr/common/source/write_pvtu_output.cc +++ b/cdr/common/source/write_pvtu_output.cc @@ -15,24 +15,24 @@ namespace CDR template void WritePVTUOutput::write_output(const DoFHandler<2> &dof_handler, const 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 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<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); } diff --git a/cdr/solver/cdr.cc b/cdr/solver/cdr.cc index 4de7865..fffb442 100644 --- a/cdr/solver/cdr.cc +++ b/cdr/solver/cdr.cc @@ -103,20 +103,20 @@ CDRProblem::CDRProblem(const CDR::Parameters ¶meters) : Triangulation::smoothing_on_coarsening)), dof_handler(triangulation), convection_function -{ - [](const Point p) -> Tensor<1, dim> - {Tensor<1, dim> v; v[0] = -p[1]; v[1] = p[0]; return v;}}, -forcing_function -{ - [](double t, const Point 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 p) -> Tensor<1, dim> + {Tensor<1, dim> v; v[0] = -p[1]; v[1] = p[0]; return v;} + }, + forcing_function + { + [](double t, const Point 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()); }