diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index c8ca72b8b383adc721b3e37f4ae7c88b5de546f3..7837b432d83cf04564dcbe12df38d3c116c06f99 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -394,8 +394,7 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, } else if (type == "SMALL_DEFORMATION") { - //! \ogs_file_param{prj__processes__process__SMALL_DEFORMATION__dimension} - switch (process_config.getConfigParameter<int>("dimension")) + switch (_mesh_vec[0]->getDimension()) { case 2: process = ProcessLib::SmallDeformation:: diff --git a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h index 9875d721432f3b4826ceca01f1b4c5a6b6979caa..5a39df9f1562881803ed82b5ec892a9c00bbf68c 100644 --- a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h +++ b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h @@ -22,7 +22,7 @@ namespace SmallDeformation { namespace detail { -template <unsigned GlobalDim, int DisplacementDim, +template <int GlobalDim, template <typename, typename, int> class LocalAssemblerImplementation, typename LocalAssemblerInterface, typename... ExtraCtorArgs> void createLocalAssemblers( @@ -35,7 +35,7 @@ void createLocalAssemblers( using LocalDataInitializer = LocalDataInitializer<LocalAssemblerInterface, LocalAssemblerImplementation, GlobalDim, - DisplacementDim, ExtraCtorArgs...>; + ExtraCtorArgs...>; DBUG("Create local assemblers."); // Populate the vector of local assemblers. @@ -64,11 +64,10 @@ void createLocalAssemblers( * The first two template parameters cannot be deduced from the arguments. * Therefore they always have to be provided manually. */ -template <int DisplacementDim, +template <int GlobalDim, template <typename, typename, int> class LocalAssemblerImplementation, typename LocalAssemblerInterface, typename... ExtraCtorArgs> void createLocalAssemblers( - const unsigned dimension, std::vector<MeshLib::Element*> const& mesh_elements, NumLib::LocalToGlobalIndexMap const& dof_table, std::vector<std::unique_ptr<LocalAssemblerInterface>>& local_assemblers, @@ -76,16 +75,7 @@ void createLocalAssemblers( { DBUG("Create local assemblers."); - if (DisplacementDim != 2 || DisplacementDim != 3) - OGS_FATAL( - "Meshes with dimension different than two and three are not " - "supported."); - - if (dimension != DisplacementDim) - return; - - detail::createLocalAssemblers<DisplacementDim, DisplacementDim, - LocalAssemblerImplementation>( + detail::createLocalAssemblers<GlobalDim, LocalAssemblerImplementation>( dof_table, mesh_elements, local_assemblers, std::forward<ExtraCtorArgs>(extra_ctor_args)...); } diff --git a/ProcessLib/SmallDeformation/LocalDataInitializer.h b/ProcessLib/SmallDeformation/LocalDataInitializer.h index baefa052d0f23a52d445899f60ad6c84a05a4690..284373dd68acc47b2ac4616392c5cf36b1d5b7bd 100644 --- a/ProcessLib/SmallDeformation/LocalDataInitializer.h +++ b/ProcessLib/SmallDeformation/LocalDataInitializer.h @@ -112,7 +112,7 @@ namespace ProcessLib template <typename LocalAssemblerInterface, template <typename, typename, int> class SmallDeformationLocalAssembler, - unsigned GlobalDim, int DisplacementDim, typename... ConstructorArgs> + int GlobalDim, typename... ConstructorArgs> class LocalDataInitializer final { public: @@ -247,7 +247,7 @@ private: template <typename ShapeFunction> using LAData = SmallDeformationLocalAssembler< - ShapeFunction, IntegrationMethod<ShapeFunction>, DisplacementDim>; + ShapeFunction, IntegrationMethod<ShapeFunction>, GlobalDim>; /// A helper forwarding to the correct version of makeLocalAssemblerBuilder /// depending whether the global dimension is less than the shape function's diff --git a/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h b/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h index bf943873ed9b03675608042f133afba1859dd27b..a1212b69a419f865ac19ef0c47c70e9a0f54454d 100644 --- a/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h +++ b/ProcessLib/SmallDeformation/SmallDeformationProcess-impl.h @@ -53,7 +53,7 @@ void SmallDeformationProcess<DisplacementDim>::initializeConcreteProcess( { ProcessLib::SmallDeformation::createLocalAssemblers< DisplacementDim, SmallDeformationLocalAssembler>( - mesh.getDimension(), mesh.getElements(), dof_table, _local_assemblers, + mesh.getElements(), dof_table, _local_assemblers, mesh.isAxiallySymmetric(), integration_order, _process_data); // TODO move the two data members somewhere else.