Commit 7893f5b8 authored by Aaron Bray's avatar Aaron Bray
Browse files

MVSimulation is working

Cleaned up where things output
parent ec39064b
......@@ -202,7 +202,7 @@ bool SEScenarioExec::ProcessActions(const SEScenario& scenario)
}
m_ss << "It took " << profiler.GetElapsedTime_s("Total") << "s to run this simulation";
profiler.Clear();
Info(m_ss);
Info(m_ss);
return !err;
}
......
......@@ -18,5 +18,5 @@ protected:
virtual void PreProcess() = 0;
// This is where any circuits would be solved or graphs transported
virtual void Process(bool solve_and_transport=true) = 0;
virtual void PostProcess() = 0;
virtual void PostProcess(bool solve_and_transport=true) = 0;
};
......@@ -268,7 +268,7 @@ void Environment::ComputeExposedModelParameters()
/// There is nothing to do here. Postprocessing the combined Energy-Environment circuit is handled by
/// the Energy system.
//--------------------------------------------------------------------------------------------------
void Environment::PostProcess()
void Environment::PostProcess(bool solve_and_transport)
{
}
......
......@@ -36,7 +36,7 @@ public:
void AtSteadyState();
void PreProcess();
void Process(bool solve_and_transport = true);
void PostProcess();
void PostProcess(bool solve_and_transport = true);
void StateChange();
......
......@@ -336,7 +336,7 @@ void AnesthesiaMachine::ComputeExposedModelParameters()
/// circuit during post process.
/// The ventilator volumes are updated based on the previously calculated nodal analysis.
//--------------------------------------------------------------------------------------------------
void AnesthesiaMachine::PostProcess()
void AnesthesiaMachine::PostProcess(bool solve_and_transport)
{
}
......
......@@ -38,7 +38,7 @@ public:
void AtSteadyState() {}
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess();
void PostProcess(bool solve_and_transport=true);
protected:
void ComputeExposedModelParameters() override;
......
......@@ -149,7 +149,7 @@ void ECG::ComputeExposedModelParameters()
/// The PostProcess function is included to preserve our system methodology and as a placeholder for
/// models developed in the future.
//--------------------------------------------------------------------------------------------------
void ECG::PostProcess()
void ECG::PostProcess(bool solve_and_transport)
{
}
\ No newline at end of file
......@@ -33,7 +33,7 @@ public:
void AtSteadyState() {}
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess();
void PostProcess(bool solve_and_transport=true);
protected:
void ComputeExposedModelParameters() override;
......
......@@ -263,7 +263,7 @@ void Inhaler::ComputeExposedModelParameters()
/// \details
/// Currently not used.
//--------------------------------------------------------------------------------------------------
void Inhaler::PostProcess()
void Inhaler::PostProcess(bool solve_and_transport)
{
}
\ No newline at end of file
......@@ -35,7 +35,7 @@ public:
void AtSteadyState() {}
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess();
void PostProcess(bool solve_and_transport=true);
void StateChange();
void Administer();
......
......@@ -418,7 +418,7 @@ void MechanicalVentilator::ComputeExposedModelParameters()
/// circuit during post process.
/// The ventilator volumes are updated based on the previously calculated nodal analysis.
//--------------------------------------------------------------------------------------------------
void MechanicalVentilator::PostProcess()
void MechanicalVentilator::PostProcess(bool solve_and_transport)
{
}
......
......@@ -39,7 +39,7 @@ public:
void AtSteadyState() {}
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess();
void PostProcess(bool solve_and_transport=true);
protected:
void ComputeExposedModelParameters() override;
......
......@@ -316,7 +316,7 @@ void BloodChemistry::ComputeExposedModelParameters()
/// \details
/// The current Pulse implementation has no specific postprocess functionality.
//--------------------------------------------------------------------------------------------------
void BloodChemistry::PostProcess()
void BloodChemistry::PostProcess(bool solve_and_transport)
{
}
......
......@@ -39,7 +39,7 @@ public:
void AtSteadyState();
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess();
void PostProcess(bool solve_and_transport=true);
bool CalculateCompleteBloodCount(SECompleteBloodCount& cbc) const;
bool CalculateComprehensiveMetabolicPanel(SEComprehensiveMetabolicPanel& cmp) const;
......
......@@ -639,9 +639,10 @@ void Cardiovascular::ComputeExposedModelParameters()
/// \details
/// The current time-step's circuit solution is set to the next time-step when it is passed to PostProcess.
//--------------------------------------------------------------------------------------------------
void Cardiovascular::PostProcess()
void Cardiovascular::PostProcess(bool solve_and_transport)
{
m_circuitCalculator->PostProcess(*m_CirculatoryCircuit);
if(solve_and_transport)
m_circuitCalculator->PostProcess(*m_CirculatoryCircuit);
}
//--------------------------------------------------------------------------------------------------
......
......@@ -50,7 +50,7 @@ public:
void AtSteadyState();
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess();
void PostProcess(bool solve_and_transport=true);
protected:
void ComputeExposedModelParameters() override;
......
......@@ -37,7 +37,7 @@ public:
void AtSteadyState();
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess(){}
void PostProcess(bool solve_and_transport=true){}
protected:
void ComputeExposedModelParameters() override;
......
......@@ -35,7 +35,7 @@ public:
void AtSteadyState();
void PreProcess(){}
void Process(bool solve_and_transport=true);
void PostProcess(){}
void PostProcess(bool solve_and_transport=true){}
protected:
void ComputeExposedModelParameters() override;
......
......@@ -467,7 +467,8 @@ void Energy::Exercise()
//--------------------------------------------------------------------------------------------------
void Energy::Process(bool solve_and_transport)
{
m_circuitCalculator->Process(*m_TemperatureCircuit, m_dT_s);
if(solve_and_transport)
m_circuitCalculator->Process(*m_TemperatureCircuit, m_dT_s);
CalculateVitalSigns();
ComputeExposedModelParameters();
}
......@@ -484,9 +485,12 @@ void Energy::ComputeExposedModelParameters()
/// Updates the resulting heat transfer rates, temperatures and nodal heat values; effectively moving
/// the next values to the current ones before time can be advanced.
//--------------------------------------------------------------------------------------------------
void Energy::PostProcess()
void Energy::PostProcess(bool solve_and_transport)
{
m_circuitCalculator->PostProcess(*m_TemperatureCircuit);
if (solve_and_transport)
{
m_circuitCalculator->PostProcess(*m_TemperatureCircuit);
}
}
//--------------------------------------------------------------------------------------------------
......
......@@ -37,7 +37,7 @@ public:
void AtSteadyState();
void PreProcess();
void Process(bool solve_and_transport=true);
void PostProcess();
void PostProcess(bool solve_and_transport=true);
protected:
void ComputeExposedModelParameters() override;
......
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