From 0c9e5d90daa258cb839e4998abacf4db8c38df20 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Tue, 20 Sep 2016 18:21:38 +0200 Subject: [PATCH] [PL] utils forward axial symmetry --- ProcessLib/Utils/CreateLocalAssemblers.h | 33 ++++++++---------------- ProcessLib/Utils/InitShapeMatrices.h | 6 +++-- ProcessLib/Utils/LocalDataInitializer.h | 10 +++---- 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/ProcessLib/Utils/CreateLocalAssemblers.h b/ProcessLib/Utils/CreateLocalAssemblers.h index e14aae36025..5e96d2f32b2 100644 --- a/ProcessLib/Utils/CreateLocalAssemblers.h +++ b/ProcessLib/Utils/CreateLocalAssemblers.h @@ -31,7 +31,6 @@ template<unsigned GlobalDim, void createLocalAssemblers( NumLib::LocalToGlobalIndexMap const& dof_table, std::vector<MeshLib::Element*> const& mesh_elements, - unsigned const integration_order, std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers, ExtraCtorArgs&&... extra_ctor_args ) @@ -51,11 +50,8 @@ void createLocalAssemblers( DBUG("Calling local assembler builder for all mesh elements."); GlobalExecutor::transformDereferenced( - initializer, - mesh_elements, - local_assemblers, - integration_order, - std::forward<ExtraCtorArgs>(extra_ctor_args)...); + initializer, mesh_elements, local_assemblers, + std::forward<ExtraCtorArgs>(extra_ctor_args)...); } } // namespace detail @@ -80,7 +76,6 @@ void createLocalAssemblers( const unsigned dimension, std::vector<MeshLib::Element*> const& mesh_elements, NumLib::LocalToGlobalIndexMap const& dof_table, - unsigned const integration_order, std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers, ExtraCtorArgs&&... extra_ctor_args ) @@ -90,25 +85,19 @@ void createLocalAssemblers( switch (dimension) { case 1: - detail::createLocalAssemblers< - 1, LocalAssemblerImplementation>( - dof_table, mesh_elements, integration_order, - local_assemblers, - std::forward<ExtraCtorArgs>(extra_ctor_args)...); + detail::createLocalAssemblers<1, LocalAssemblerImplementation>( + dof_table, mesh_elements, local_assemblers, + std::forward<ExtraCtorArgs>(extra_ctor_args)...); break; case 2: - detail::createLocalAssemblers< - 2, LocalAssemblerImplementation>( - dof_table, mesh_elements, integration_order, - local_assemblers, - std::forward<ExtraCtorArgs>(extra_ctor_args)...); + detail::createLocalAssemblers<2, LocalAssemblerImplementation>( + dof_table, mesh_elements, local_assemblers, + std::forward<ExtraCtorArgs>(extra_ctor_args)...); break; case 3: - detail::createLocalAssemblers< - 3, LocalAssemblerImplementation>( - dof_table, mesh_elements, integration_order, - local_assemblers, - std::forward<ExtraCtorArgs>(extra_ctor_args)...); + detail::createLocalAssemblers<3, LocalAssemblerImplementation>( + dof_table, mesh_elements, local_assemblers, + std::forward<ExtraCtorArgs>(extra_ctor_args)...); break; default: OGS_FATAL("Meshes with dimension greater than three are not supported."); diff --git a/ProcessLib/Utils/InitShapeMatrices.h b/ProcessLib/Utils/InitShapeMatrices.h index 6fbf385775f..1ac8556f2d1 100644 --- a/ProcessLib/Utils/InitShapeMatrices.h +++ b/ProcessLib/Utils/InitShapeMatrices.h @@ -20,7 +20,8 @@ namespace ProcessLib template <typename ShapeFunction, typename ShapeMatricesType, typename IntegrationMethod, unsigned GlobalDim> std::vector<typename ShapeMatricesType::ShapeMatrices> initShapeMatrices( - MeshLib::Element const& e, IntegrationMethod const& integration_method) + MeshLib::Element const& e, bool is_axially_symmetric, + IntegrationMethod const& integration_method) { std::vector<typename ShapeMatricesType::ShapeMatrices> shape_matrices; @@ -37,7 +38,8 @@ std::vector<typename ShapeMatricesType::ShapeMatrices> initShapeMatrices( ShapeFunction::NPOINTS); fe.computeShapeFunctions( integration_method.getWeightedPoint(ip).getCoords(), - shape_matrices[ip], GlobalDim); + shape_matrices[ip], GlobalDim/*, is_axially_symmetric*/); + (void) is_axially_symmetric; } return shape_matrices; diff --git a/ProcessLib/Utils/LocalDataInitializer.h b/ProcessLib/Utils/LocalDataInitializer.h index d1818cbcf0d..fe7bdfa2bbd 100644 --- a/ProcessLib/Utils/LocalDataInitializer.h +++ b/ProcessLib/Utils/LocalDataInitializer.h @@ -249,7 +249,6 @@ public: std::size_t const id, MeshLib::Element const& mesh_item, LADataIntfPtr& data_ptr, - unsigned const integration_order, ConstructorArgs&&... args) const { auto const type_idx = std::type_index(typeid(mesh_item)); @@ -257,9 +256,8 @@ public: if (it != _builder.end()) { auto const num_local_dof = _dof_table.getNumberOfElementDOF(id); - data_ptr = it->second( - mesh_item, num_local_dof, integration_order, - std::forward<ConstructorArgs>(args)...); + data_ptr = it->second(mesh_item, num_local_dof, + std::forward<ConstructorArgs>(args)...); } else { OGS_FATAL("You are trying to build a local assembler for an unknown mesh element type (%s)." " Maybe you have disabled this mesh element type in your build configuration.", @@ -271,7 +269,6 @@ private: using LADataBuilder = std::function<LADataIntfPtr( MeshLib::Element const& e, std::size_t const local_matrix_size, - unsigned const integration_order, ConstructorArgs&&... )>; @@ -291,12 +288,11 @@ private: { return [](MeshLib::Element const& e, std::size_t const local_matrix_size, - unsigned const integration_order, ConstructorArgs&&... args) { return LADataIntfPtr{ new LAData<ShapeFct>{ - e, local_matrix_size, integration_order, + e, local_matrix_size, std::forward<ConstructorArgs>(args)... }}; }; -- GitLab