From bf7ecbc6c152ae5e5fe96356b49c2bc1ff2c9197 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Fri, 10 Jun 2016 08:55:51 +0200 Subject: [PATCH] [NL] renamed get indices method --- NumLib/Assembler/VectorMatrixAssembler.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/NumLib/Assembler/VectorMatrixAssembler.h b/NumLib/Assembler/VectorMatrixAssembler.h index e3bd17e56a1..eefba16d44d 100644 --- a/NumLib/Assembler/VectorMatrixAssembler.h +++ b/NumLib/Assembler/VectorMatrixAssembler.h @@ -13,10 +13,13 @@ #include "NumLib/ODESolver/Types.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" -namespace +namespace NumLib +{ + +namespace detail { inline std::vector<GlobalIndexType> -getRowColumnIndices(std::size_t const id, +getIndices(std::size_t const id, NumLib::LocalToGlobalIndexMap const& dof_table) { assert(dof_table.size() > id); @@ -41,7 +44,7 @@ prepareLocalVector( NumLib::LocalToGlobalIndexMap const& dof_table, GlobalVector const& x) { - auto const indices = getRowColumnIndices(id, dof_table); + auto const indices = getIndices(id, dof_table); std::vector<double> local_x; local_x.reserve(indices.size()); @@ -56,9 +59,6 @@ prepareLocalVector( } } -namespace NumLib -{ - /*! Calls the local assemblers of FEM processes and assembles * \c GlobalMatrix'es and \c GlobalVector's. * @@ -95,7 +95,7 @@ public: const double t, GlobalVector const& x, GlobalMatrix& M, GlobalMatrix& K, GlobalVector& b) const { - auto const x_and_indices = prepareLocalVector(id, _data_pos, x); + auto const x_and_indices = detail::prepareLocalVector(id, _data_pos, x); auto const& local_x = std::get<0>(x_and_indices); auto const& indices = std::get<1>(x_and_indices); auto const r_c_indices = @@ -114,7 +114,7 @@ public: GlobalVector const& x, GlobalMatrix& Jac) const { - auto const x_and_indices = prepareLocalVector(id, _data_pos, x); + auto const x_and_indices = detail::prepareLocalVector(id, _data_pos, x); auto const& local_x = std::get<0>(x_and_indices); auto const& indices = std::get<1>(x_and_indices); auto const r_c_indices = @@ -133,7 +133,7 @@ public: double const t, double const delta_t) const { - auto const x_and_indices = prepareLocalVector(id, _data_pos, x); + auto const x_and_indices = detail::prepareLocalVector(id, _data_pos, x); auto const& local_x = std::get<0>(x_and_indices); local_assembler.preTimestep(local_x, t, delta_t); @@ -146,7 +146,7 @@ public: LocalAssembler& local_assembler, GlobalVector const& x) const { - auto const x_and_indices = prepareLocalVector(id, _data_pos, x); + auto const x_and_indices = detail::prepareLocalVector(id, _data_pos, x); auto const& local_x = std::get<0>(x_and_indices); local_assembler.postTimestep(local_x); @@ -159,7 +159,7 @@ public: void passLocalVector(Callback& cb, std::size_t const id, GlobalVector const& x, Args&&... args) { - auto const x_and_indices = prepareLocalVector(id, _data_pos, x); + auto const x_and_indices = detail::prepareLocalVector(id, _data_pos, x); auto const& local_x = std::get<0>(x_and_indices); auto const& indices = std::get<1>(x_and_indices); auto const r_c_indices = @@ -193,7 +193,7 @@ public: LocalAssembler& local_assembler, const double t, GlobalVector& b) const { - auto const indices = getRowColumnIndices(id, _data_pos); + auto const indices = detail::getIndices(id, _data_pos); auto const r_c_indices = NumLib::LocalToGlobalIndexMap::RowColumnIndices(indices, indices); -- GitLab