diff --git a/ProcessLib/GroundwaterFlowProcess.h b/ProcessLib/GroundwaterFlowProcess.h index e14f08caa5119aa565bb755e1d9f550e9e377c88..1f6530c42592e9a7e2481125bed8558aff8f875d 100644 --- a/ProcessLib/GroundwaterFlowProcess.h +++ b/ProcessLib/GroundwaterFlowProcess.h @@ -254,9 +254,9 @@ public: } } - bool solve(const double /*delta_t*/) override + bool assemble(const double /*delta_t*/) override { - DBUG("Solve GroundwaterFlowProcess."); + DBUG("Assemble GroundwaterFlowProcess."); this->_A->setZero(); MathLib::setMatrixSparsity(*this->_A, _sparsity_pattern); @@ -273,8 +273,6 @@ public: _dirichlet_bc.global_ids, _dirichlet_bc.values); - this->_linear_solver->solve(*this->_rhs, *this->_x); - return true; } diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index 7844beae1722b7f0af0c001ad8b4bebc7ca12c79..a54dcf5c45d987d4f9ae61fcc508791ccabb9095 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -35,7 +35,7 @@ public: virtual ~Process() = default; virtual void initialize() = 0; - virtual bool solve(const double delta_t) = 0; + virtual bool assemble(const double delta_t) = 0; /// Postprocessing after solve(). /// The file_name is indicating the name of possible output file. @@ -43,6 +43,14 @@ public: virtual void postTimestep(std::string const& file_name, const unsigned timestep) = 0; + bool solve(const double delta_t) + { + bool const result = assemble(delta_t); + + _linear_solver->solve(*_rhs, *_x); + return result; + } + protected: /// Set linear solver options; called by the derived process which is /// parsing the configuration.