Skip to content
Permalink
Browse files

Simulation support: get a solver to reinitialise itself when one or s…

…everal model parameters have been modified (#1549).
  • Loading branch information...
agarny committed Mar 2, 2018
1 parent 11d48a0 commit 66a77408e4847fa2de289a22f7326833dc9901c7
@@ -399,11 +399,16 @@ void SimulationData::reset(const bool &pInitialize)
memcpy(mInitialStates, mStates, runtime->statesCount()*Solver::SizeOfDouble);
}

// Let people know whether our data is 'cleaned', i.e. not modified
// Let people know whether our data is 'cleaned', i.e. not modified, and ask
// our simulation worker to reset itself
// Note: no point in checking if we are initialising...

if (!pInitialize)
if (!pInitialize) {
emit modified(isModified());

if (mSimulation->worker())
mSimulation->worker()->reset();
}
}

//==============================================================================
@@ -881,6 +886,15 @@ CellMLSupport::CellmlFileRuntime * Simulation::runtime() const

//==============================================================================

SimulationWorker * Simulation::worker() const
{
// Return our worker

return mWorker;
}

//==============================================================================

Simulation::FileType Simulation::fileType() const
{
// Return our file type
@@ -232,6 +232,8 @@ class SIMULATIONSUPPORT_EXPORT Simulation : public QObject

CellMLSupport::CellmlFileRuntime * runtime() const;

SimulationWorker * worker() const;

Simulation::FileType fileType() const;

CellMLSupport::CellmlFile * cellmlFile() const;

0 comments on commit 66a7740

Please sign in to comment.
You can’t perform that action at this time.