Commit cfa53902 authored by Dave Moxey's avatar Dave Moxey
Browse files

Merge branch 'fix/DriverAdaptive' into 'master'

Small fix to make DriverAdaptive more general

This is a small fix to avoid getting an error in DriverAdaptive when there is no NekManager for GlobalLinSys.

I think it is possible that after this change DriverAdaptive will work with solvers other than IncNavierStokes (if they support variable P, of course).

See merge request !618
parents f43d3276 f175f153
Changelog
=========
v4.3.2
------
**Library**:
- Add small optimisation for DriverAdaptive (!618)
v4.3.1
------
**Library**:
......
......@@ -258,6 +258,19 @@ namespace Nektar
}
}
static bool PoolCreated(std::string whichPool)
{
bool value = false;
typename ValueContainerPool::iterator x;
x = m_ValueContainerPool.find(whichPool);
if (x != m_ValueContainerPool.end())
{
value = true;
}
return value;
}
static void EnableManagement(std::string whichPool = "")
{
typename FlagContainerPool::iterator x;
......
......@@ -293,9 +293,14 @@ void DriverAdaptive::v_Execute(ostream &out)
//
// @todo This could be made better by replacing individual matrices
// within the linear system.
LibUtilities::NekManager<MultiRegions::GlobalLinSysKey,
MultiRegions::GlobalLinSys>::
ClearManager(std::string("GlobalLinSys"));
if (LibUtilities::NekManager<MultiRegions::GlobalLinSysKey,
MultiRegions::GlobalLinSys>::
PoolCreated(std::string("GlobalLinSys")))
{
LibUtilities::NekManager<MultiRegions::GlobalLinSysKey,
MultiRegions::GlobalLinSys>::
ClearManager(std::string("GlobalLinSys"));
}
int chkNumber = m_equ[0]->GetCheckpointNumber();
int chkSteps = m_equ[0]->GetCheckpointSteps();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment