Skip to content
Snippets Groups Projects
Commit cbe61984 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[NL] NLS; Release non-equilibrium rhs if used.

This avoids a warning at the end for unused vectors.
parent 11105d1e
No related branches found
No related tags found
No related merge requests found
......@@ -448,4 +448,21 @@ createNonlinearSolver(GlobalLinearSolver& linear_solver,
#endif
OGS_FATAL("Unsupported nonlinear solver type '{:s}'.", type.c_str());
}
NonlinearSolver<NonlinearSolverTag::Picard>::~NonlinearSolver()
{
if (_r_neq != nullptr)
{
NumLib::GlobalVectorProvider::provider.releaseVector(*_r_neq);
}
}
NonlinearSolver<NonlinearSolverTag::Newton>::~NonlinearSolver()
{
if (_r_neq != nullptr)
{
NumLib::GlobalVectorProvider::provider.releaseVector(*_r_neq);
}
}
} // namespace NumLib
......@@ -94,6 +94,8 @@ public:
{
}
~NonlinearSolver();
//! Set the nonlinear equation system that will be solved.
//! TODO doc
void setEquationSystem(System& eq, ConvergenceCriterion& conv_crit)
......@@ -172,6 +174,8 @@ public:
{
}
~NonlinearSolver();
//! Set the nonlinear equation system that will be solved.
//! TODO doc
void setEquationSystem(System& eq, ConvergenceCriterion& conv_crit)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment