From 44b9c38de20949e5275405190458c50282cda72e Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Thu, 21 Jan 2016 17:15:16 +0100 Subject: [PATCH] [PL] Move up initializeMeshSubsets(). Small cleanups. --- ProcessLib/GroundwaterFlowProcess.h | 11 ----------- ProcessLib/Process.h | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/ProcessLib/GroundwaterFlowProcess.h b/ProcessLib/GroundwaterFlowProcess.h index a0111498e18..0b3967bced8 100644 --- a/ProcessLib/GroundwaterFlowProcess.h +++ b/ProcessLib/GroundwaterFlowProcess.h @@ -149,17 +149,6 @@ public: this->_integration_order); } - void initializeMeshSubsets(MeshLib::Mesh const& mesh) override - { - // Create single component dof in every of the mesh's nodes. - this->_mesh_subset_all_nodes = - new MeshLib::MeshSubset(mesh, &mesh.getNodes()); - - // Collect the mesh subsets in a vector. - this->_all_mesh_subsets.push_back( - new MeshLib::MeshSubsets(this->_mesh_subset_all_nodes)); - } - std::string getLinearSolverName() const override { return "gw_"; diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index 7e19c2c3db6..94df85a1513 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -60,15 +60,12 @@ public: virtual void postTimestep(std::string const& file_name, const unsigned timestep) = 0; - /// Creates mesh subsets, i.e. components, for given mesh. - virtual void initializeMeshSubsets(MeshLib::Mesh const& mesh) = 0; - void initialize() { DBUG("Initialize process."); DBUG("Construct dof mappings."); - initializeMeshSubsets(_mesh); + initializeMeshSubsets(); _local_to_global_index_map.reset( new AssemblerLib::LocalToGlobalIndexMap( @@ -132,6 +129,18 @@ protected: } private: + /// Creates mesh subsets, i.e. components, for given mesh. + void initializeMeshSubsets() + { + // Create single component dof in every of the mesh's nodes. + _mesh_subset_all_nodes = + new MeshLib::MeshSubset(_mesh, &_mesh.getNodes()); + + // Collect the mesh subsets in a vector. + _all_mesh_subsets.push_back( + new MeshLib::MeshSubsets(_mesh_subset_all_nodes)); + } + /// Sets the initial condition values in the solution vector x for a given /// process variable and component. void setInitialConditions(ProcessVariable const& variable, -- GitLab