Commit 67e0b420 authored by Harald Scheirich's avatar Harald Scheirich
Browse files

Removed unused variable in cdm tests

parent 74c33708
...@@ -323,8 +323,8 @@ void CommonDataModelTest::CombinedCircuitTest(const std::string& sTestDirectory) ...@@ -323,8 +323,8 @@ void CommonDataModelTest::CombinedCircuitTest(const std::string& sTestDirectory)
SEFluidCircuit* CombinedCircuit = &m_Circuits->CreateFluidCircuit("Combined"); SEFluidCircuit* CombinedCircuit = &m_Circuits->CreateFluidCircuit("Combined");
CombinedCircuit->AddCircuit(*MasterCircuit); CombinedCircuit->AddCircuit(*MasterCircuit);
CombinedCircuit->AddCircuit(*SlaveCircuit); CombinedCircuit->AddCircuit(*SlaveCircuit);
SEFluidCircuitPath& GroundPath = CombinedCircuit->CreatePath(MasterNode4, SlaveNode4, "GroundPath"); CombinedCircuit->CreatePath(MasterNode4, SlaveNode4, "GroundPath");
SEFluidCircuitPath& CombinedPath = CombinedCircuit->CreatePath(MasterNode3, SlaveNode3, "CombinedPath"); CombinedCircuit->CreatePath(MasterNode3, SlaveNode3, "CombinedPath");
CombinedCircuit->RemovePath(SlavePath1); CombinedCircuit->RemovePath(SlavePath1);
CombinedCircuit->StateChange(); CombinedCircuit->StateChange();
...@@ -379,7 +379,6 @@ void CommonDataModelTest::CircuitErrorTest(const std::string& sTestDirectory) ...@@ -379,7 +379,6 @@ void CommonDataModelTest::CircuitErrorTest(const std::string& sTestDirectory)
std::cout << "CircuitErrorTest\n"; std::cout << "CircuitErrorTest\n";
//Setup a basic circuit //Setup a basic circuit
m_Logger->SetLogFile(sTestDirectory + "/CombinedCircuitTest.log"); m_Logger->SetLogFile(sTestDirectory + "/CombinedCircuitTest.log");
double timeStep_s = 1.0 / 165.0;
SEFluidCircuitCalculator fluidCalculator(m_Logger); SEFluidCircuitCalculator fluidCalculator(m_Logger);
SEFluidCircuit* fluidCircuit = &m_Circuits->CreateFluidCircuit("Fluid"); SEFluidCircuit* fluidCircuit = &m_Circuits->CreateFluidCircuit("Fluid");
//----------------------------------------------------------- //-----------------------------------------------------------
...@@ -487,9 +486,7 @@ void CommonDataModelTest::DynamicallyChangingCircuitTest(const std::string& sTes ...@@ -487,9 +486,7 @@ void CommonDataModelTest::DynamicallyChangingCircuitTest(const std::string& sTes
fluidCircuit->GetPath("Path4")->GetResistanceBaseline().SetValue(50, PressureTimePerVolumeUnit::Pa_s_Per_m3); fluidCircuit->GetPath("Path4")->GetResistanceBaseline().SetValue(50, PressureTimePerVolumeUnit::Pa_s_Per_m3);
//Add a new Path //Add a new Path
SEFluidCircuitNode* Node2 = fluidCircuit->GetNode("Node2"); SEFluidCircuitPath& Path5 = fluidCircuit->CreatePath(Node2, Node4, "Path5");
SEFluidCircuitNode* Node4 = fluidCircuit->GetNode("Node4");
SEFluidCircuitPath& Path5 = fluidCircuit->CreatePath(*Node2, *Node4, "Path5");
Path5.GetNextResistance().SetValue(25, PressureTimePerVolumeUnit::Pa_s_Per_m3); Path5.GetNextResistance().SetValue(25, PressureTimePerVolumeUnit::Pa_s_Per_m3);
//Reset the baselines //Reset the baselines
fluidCircuit->StateChange(); fluidCircuit->StateChange();
...@@ -715,7 +712,6 @@ void CommonDataModelTest::PolarizedCapacitorTest(const std::string& sTestDirecto ...@@ -715,7 +712,6 @@ void CommonDataModelTest::PolarizedCapacitorTest(const std::string& sTestDirecto
fluidCircuit->StateChange(); fluidCircuit->StateChange();
bool serialized = false; bool serialized = false;
double sample = 0;
while (currentTime_s < 150) while (currentTime_s < 150)
{ {
if (currentTime_s > 100) if (currentTime_s > 100)
...@@ -871,7 +867,7 @@ void CommonDataModelTest::ComplianceVolumeChange(const std::string& sTestDirecto ...@@ -871,7 +867,7 @@ void CommonDataModelTest::ComplianceVolumeChange(const std::string& sTestDirecto
SEFluidCircuitPath* groundTonode2 = &fluidCircuit->CreatePath(*ground, *node2, "groundTonode2"); SEFluidCircuitPath* groundTonode2 = &fluidCircuit->CreatePath(*ground, *node2, "groundTonode2");
groundTonode2->GetPressureSourceBaseline().SetValue(0.0, PressureUnit::cmH2O); groundTonode2->GetPressureSourceBaseline().SetValue(0.0, PressureUnit::cmH2O);
SEFluidCircuitPath* node2Tonode3 = &fluidCircuit->CreatePath(*node2, *node3, "node2Tonode3"); SEFluidCircuitPath* node2Tonode3 = &fluidCircuit->CreatePath(*node2, *node3, "node2Tonode3");
SEFluidCircuitPath* node3Toground = &fluidCircuit->CreatePath(*node3, *ground, "node3Toground"); fluidCircuit->CreatePath(*node3, *ground, "node3Toground");
node2Tonode3->GetComplianceBaseline().SetValue(1.0, VolumePerPressureUnit::L_Per_cmH2O); node2Tonode3->GetComplianceBaseline().SetValue(1.0, VolumePerPressureUnit::L_Per_cmH2O);
fluidCircuit->SetNextAndCurrentFromBaselines(); fluidCircuit->SetNextAndCurrentFromBaselines();
fluidCircuit->StateChange(); fluidCircuit->StateChange();
...@@ -962,7 +958,7 @@ void CommonDataModelTest::CircuitLockingTest(const std::string& sOutputDirectory ...@@ -962,7 +958,7 @@ void CommonDataModelTest::CircuitLockingTest(const std::string& sOutputDirectory
flowSource.GetFlowSourceBaseline().SetValue(0.1, VolumePerTimeUnit::m3_Per_s); flowSource.GetFlowSourceBaseline().SetValue(0.1, VolumePerTimeUnit::m3_Per_s);
SEFluidCircuitPath& potentialSource = fluidCircuit->CreatePath(Node5, Node1, "Potential Source"); SEFluidCircuitPath& potentialSource = fluidCircuit->CreatePath(Node5, Node1, "Potential Source");
potentialSource.GetPotentialSourceBaseline().SetValue(10, PressureUnit::Pa); potentialSource.GetPotentialSourceBaseline().SetValue(10, PressureUnit::Pa);
SEFluidCircuitPath& dummyPath = fluidCircuit->CreatePath(Node1, Node3, "Short"); fluidCircuit->CreatePath(Node1, Node3, "Short");
fluidCircuit->SetNextAndCurrentFromBaselines(); fluidCircuit->SetNextAndCurrentFromBaselines();
fluidCircuit->StateChange(); fluidCircuit->StateChange();
......
...@@ -4138,7 +4138,6 @@ void CommonDataModelTest::TestPreProcess2(double dT, int i) ...@@ -4138,7 +4138,6 @@ void CommonDataModelTest::TestPreProcess2(double dT, int i)
// Never change "current" values, only next. // Never change "current" values, only next.
// ALL PRESSURE SOURCES MUST EXIST ON PATH 1 UNTIL THIS IS CHANGED TO BE MORE FLEXIBLE // ALL PRESSURE SOURCES MUST EXIST ON PATH 1 UNTIL THIS IS CHANGED TO BE MORE FLEXIBLE
double ONE = 1;
bool FLOWSOURCE = false; bool FLOWSOURCE = false;
bool SWITCHPRESENT = false; bool SWITCHPRESENT = false;
bool PRESSURESOURCE = false; bool PRESSURESOURCE = false;
...@@ -4384,7 +4383,6 @@ void CommonDataModelTest::TestPreProcess4(double dT, int i) ...@@ -4384,7 +4383,6 @@ void CommonDataModelTest::TestPreProcess4(double dT, int i)
// Never change "current" values, only next. // Never change "current" values, only next.
// ALL PRESSURE SOURCES MUST EXIST ON PATH 1 UNTIL THIS IS CHANGED TO BE MORE FLEXIBLE // ALL PRESSURE SOURCES MUST EXIST ON PATH 1 UNTIL THIS IS CHANGED TO BE MORE FLEXIBLE
double ONE = 1;
bool FLOWSOURCE = false; bool FLOWSOURCE = false;
bool SWITCHPRESENT = false; bool SWITCHPRESENT = false;
bool PRESSURESOURCE = false; bool PRESSURESOURCE = false;
...@@ -5252,7 +5250,6 @@ void CommonDataModelTest::RunTest(const std::string& outputDirectory, const std: ...@@ -5252,7 +5250,6 @@ void CommonDataModelTest::RunTest(const std::string& outputDirectory, const std:
fluidCircuit->SetNextAndCurrentFromBaselines(); fluidCircuit->SetNextAndCurrentFromBaselines();
fluidCircuit->StateChange(); fluidCircuit->StateChange();
double sample = 0;
bool serialized = false; bool serialized = false;
double outputTime_s = 0; double outputTime_s = 0;
while (currentTime_s < 10) // Run for 10 secs while (currentTime_s < 10) // Run for 10 secs
......
...@@ -344,8 +344,6 @@ void CommonDataModelTest::TestGasHierarchy(SETestSuite& testSuite, SESubstanceMa ...@@ -344,8 +344,6 @@ void CommonDataModelTest::TestGasHierarchy(SETestSuite& testSuite, SESubstanceMa
double L2C3_mL = 12; double L2C3_mL = 12;
double L2C3_mmHg = 12; double L2C3_mmHg = 12;
double L2C3_H20 = 0.5;
double L2C3_pH = 7.38;
SEGasCompartment* L2C3 = &cmptMgr.CreateGasCompartment("L2C3"); SEGasCompartment* L2C3 = &cmptMgr.CreateGasCompartment("L2C3");
L2C3->GetVolume().SetValue(L2C3_mL, VolumeUnit::mL); L2C3->GetVolume().SetValue(L2C3_mL, VolumeUnit::mL);
L2C3->GetPressure().SetValue(L2C3_mmHg, PressureUnit::mmHg); L2C3->GetPressure().SetValue(L2C3_mmHg, PressureUnit::mmHg);
......
...@@ -187,24 +187,24 @@ void CommonDataModelTest::LiquidTransportTest(const std::string& rptDirectory) ...@@ -187,24 +187,24 @@ void CommonDataModelTest::LiquidTransportTest(const std::string& rptDirectory)
SEFluidCircuitPath& groundToNode6 = circuit.CreatePath(Ground,Node6,"GroundToNode6"); SEFluidCircuitPath& groundToNode6 = circuit.CreatePath(Ground,Node6,"GroundToNode6");
groundToNode6.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s); groundToNode6.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s);
SEFluidCircuitPath& Node1ToNode7 = circuit.CreatePath(Node1,Node7,"Node1ToNode7"); circuit.CreatePath(Node1,Node7,"Node1ToNode7");
SEFluidCircuitPath& Node2ToNode7 = circuit.CreatePath(Node2,Node7,"Node2ToNode7"); circuit.CreatePath(Node2,Node7,"Node2ToNode7");
SEFluidCircuitPath& Node3ToNode8 = circuit.CreatePath(Node3,Node8,"Node3ToNode8"); circuit.CreatePath(Node3,Node8,"Node3ToNode8");
SEFluidCircuitPath& Node4ToNode8 = circuit.CreatePath(Node4,Node8,"Node4ToNode8"); circuit.CreatePath(Node4,Node8,"Node4ToNode8");
SEFluidCircuitPath& Node5ToNode9 = circuit.CreatePath(Node5,Node9,"Node5ToNode9"); circuit.CreatePath(Node5,Node9,"Node5ToNode9");
SEFluidCircuitPath& Node6ToNode9 = circuit.CreatePath(Node6,Node9,"Node6ToNode9"); circuit.CreatePath(Node6,Node9,"Node6ToNode9");
SEFluidCircuitPath& Node7ToNode10 = circuit.CreatePath(Node7,Node10,"Node7ToNode10"); circuit.CreatePath(Node7,Node10,"Node7ToNode10");
SEFluidCircuitPath& Node8ToNode10 = circuit.CreatePath(Node8,Node10,"Node8ToNode10"); circuit.CreatePath(Node8,Node10,"Node8ToNode10");
SEFluidCircuitPath& Node9ToNode10 = circuit.CreatePath(Node9,Node10,"Node9ToNode10"); circuit.CreatePath(Node9,Node10,"Node9ToNode10");
SEFluidCircuitPath& Node10ToNode11 = circuit.CreatePath(Node10,Node11,"Node10ToNode11"); circuit.CreatePath(Node10,Node11,"Node10ToNode11");
SEFluidCircuitPath& Node10ToNode12 = circuit.CreatePath(Node10,Node12,"Node10ToNode12"); circuit.CreatePath(Node10,Node12,"Node10ToNode12");
SEFluidCircuitPath& Node10ToNode13 = circuit.CreatePath(Node10,Node13,"Node10ToNode13"); circuit.CreatePath(Node10,Node13,"Node10ToNode13");
SEFluidCircuitPath& Node11ToNode14 = circuit.CreatePath(Node11,Node14,"Node11ToNode14"); circuit.CreatePath(Node11,Node14,"Node11ToNode14");
SEFluidCircuitPath& Node11ToNode15 = circuit.CreatePath(Node11,Node15,"Node11ToNode15"); circuit.CreatePath(Node11,Node15,"Node11ToNode15");
SEFluidCircuitPath& Node12ToNode16 = circuit.CreatePath(Node12,Node16,"Node12ToNode16"); circuit.CreatePath(Node12,Node16,"Node12ToNode16");
SEFluidCircuitPath& Node12ToNode17 = circuit.CreatePath(Node12,Node17,"Node12ToNode17"); circuit.CreatePath(Node12,Node17,"Node12ToNode17");
SEFluidCircuitPath& Node13ToNode18 = circuit.CreatePath(Node13,Node18,"Node13ToNode18"); circuit.CreatePath(Node13,Node18,"Node13ToNode18");
SEFluidCircuitPath& Node13ToNode19 = circuit.CreatePath(Node13,Node19,"Node13ToNode19"); circuit.CreatePath(Node13,Node19,"Node13ToNode19");
SEFluidCircuitPath& Node14ToGround = circuit.CreatePath(Node14,Ground,"Node14ToGround"); SEFluidCircuitPath& Node14ToGround = circuit.CreatePath(Node14,Ground,"Node14ToGround");
Node14ToGround.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s); Node14ToGround.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s);
...@@ -370,24 +370,24 @@ void CommonDataModelTest::GasTransportTest(const std::string& rptDirectory) ...@@ -370,24 +370,24 @@ void CommonDataModelTest::GasTransportTest(const std::string& rptDirectory)
SEFluidCircuitPath& groundToNode6 = circuit.CreatePath(Ground,Node6,"GroundToNode6"); SEFluidCircuitPath& groundToNode6 = circuit.CreatePath(Ground,Node6,"GroundToNode6");
groundToNode6.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s); groundToNode6.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s);
SEFluidCircuitPath& Node1ToNode7 = circuit.CreatePath(Node1,Node7,"Node1ToNode7"); circuit.CreatePath(Node1,Node7,"Node1ToNode7");
SEFluidCircuitPath& Node2ToNode7 = circuit.CreatePath(Node2,Node7,"Node2ToNode7"); circuit.CreatePath(Node2,Node7,"Node2ToNode7");
SEFluidCircuitPath& Node3ToNode8 = circuit.CreatePath(Node3,Node8,"Node3ToNode8"); circuit.CreatePath(Node3,Node8,"Node3ToNode8");
SEFluidCircuitPath& Node4ToNode8 = circuit.CreatePath(Node4,Node8,"Node4ToNode8"); circuit.CreatePath(Node4,Node8,"Node4ToNode8");
SEFluidCircuitPath& Node5ToNode9 = circuit.CreatePath(Node5,Node9,"Node5ToNode9"); circuit.CreatePath(Node5,Node9,"Node5ToNode9");
SEFluidCircuitPath& Node6ToNode9 = circuit.CreatePath(Node6,Node9,"Node6ToNode9"); circuit.CreatePath(Node6,Node9,"Node6ToNode9");
SEFluidCircuitPath& Node7ToNode10 = circuit.CreatePath(Node7,Node10,"Node7ToNode10"); circuit.CreatePath(Node7,Node10,"Node7ToNode10");
SEFluidCircuitPath& Node8ToNode10 = circuit.CreatePath(Node8,Node10,"Node8ToNode10"); circuit.CreatePath(Node8,Node10,"Node8ToNode10");
SEFluidCircuitPath& Node9ToNode10 = circuit.CreatePath(Node9,Node10,"Node9ToNode10"); circuit.CreatePath(Node9,Node10,"Node9ToNode10");
SEFluidCircuitPath& Node10ToNode11 = circuit.CreatePath(Node10,Node11,"Node10ToNode11"); circuit.CreatePath(Node10,Node11,"Node10ToNode11");
SEFluidCircuitPath& Node10ToNode12 = circuit.CreatePath(Node10,Node12,"Node10ToNode12"); circuit.CreatePath(Node10,Node12,"Node10ToNode12");
SEFluidCircuitPath& Node10ToNode13 = circuit.CreatePath(Node10,Node13,"Node10ToNode13"); circuit.CreatePath(Node10,Node13,"Node10ToNode13");
SEFluidCircuitPath& Node11ToNode14 = circuit.CreatePath(Node11,Node14,"Node11ToNode14"); circuit.CreatePath(Node11,Node14,"Node11ToNode14");
SEFluidCircuitPath& Node11ToNode15 = circuit.CreatePath(Node11,Node15,"Node11ToNode15"); circuit.CreatePath(Node11,Node15,"Node11ToNode15");
SEFluidCircuitPath& Node12ToNode16 = circuit.CreatePath(Node12,Node16,"Node12ToNode16"); circuit.CreatePath(Node12,Node16,"Node12ToNode16");
SEFluidCircuitPath& Node12ToNode17 = circuit.CreatePath(Node12,Node17,"Node12ToNode17"); circuit.CreatePath(Node12,Node17,"Node12ToNode17");
SEFluidCircuitPath& Node13ToNode18 = circuit.CreatePath(Node13,Node18,"Node13ToNode18"); circuit.CreatePath(Node13,Node18,"Node13ToNode18");
SEFluidCircuitPath& Node13ToNode19 = circuit.CreatePath(Node13,Node19,"Node13ToNode19"); circuit.CreatePath(Node13,Node19,"Node13ToNode19");
SEFluidCircuitPath& Node14ToGround = circuit.CreatePath(Node14,Ground,"Node14ToGround"); SEFluidCircuitPath& Node14ToGround = circuit.CreatePath(Node14,Ground,"Node14ToGround");
Node14ToGround.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s); Node14ToGround.GetFlowSourceBaseline().SetValue(0.5, VolumePerTimeUnit::mL_Per_s);
......
...@@ -294,8 +294,6 @@ void CommonDataModelTest::TestThermalHierarchy(SETestSuite& testSuite, SESubstan ...@@ -294,8 +294,6 @@ void CommonDataModelTest::TestThermalHierarchy(SETestSuite& testSuite, SESubstan
SETestCase& testCase = testSuite.CreateTestCase(); SETestCase& testCase = testSuite.CreateTestCase();
testCase.SetName("HierarchyHeatTemperatureFlows"); testCase.SetName("HierarchyHeatTemperatureFlows");
SESubstance* N2 = subMgr.GetSubstance("Nitrogen");
SEScalarTemperature partialTemperature; SEScalarTemperature partialTemperature;
TimingProfile pTimer; TimingProfile pTimer;
......
...@@ -52,14 +52,7 @@ void CommonDataModelTest::TissueCompartmentTest(const std::string& rptDirectory) ...@@ -52,14 +52,7 @@ void CommonDataModelTest::TissueCompartmentTest(const std::string& rptDirectory)
double TissueToPlasmaAlbuminRatio = 1.0; double TissueToPlasmaAlbuminRatio = 1.0;
double TissueToPlasmaAlphaAcidGlycoproteinRatio = 0.8; double TissueToPlasmaAlphaAcidGlycoproteinRatio = 0.8;
double TissueToPlasmaLipoproteinRatio = 0.54; double TissueToPlasmaLipoproteinRatio = 0.54;
//double TotalMass_mg = 333;
double ec_pH = 7.14;
double ec_WaterVolumeFraction = 0.67;
double ic_pH = 7.42;
double ic_WaterVolumeFraction = 0.76;
SECompartmentManager cmptMgr(subMgr); SECompartmentManager cmptMgr(subMgr);
SETissueCompartment* tissue = &cmptMgr.CreateTissueCompartment("Tissue"); SETissueCompartment* tissue = &cmptMgr.CreateTissueCompartment("Tissue");
tissue->GetAcidicPhospohlipidConcentration().SetValue(AcidicPhospohlipidConcentration_mg_Per_g, MassPerMassUnit::mg_Per_g); tissue->GetAcidicPhospohlipidConcentration().SetValue(AcidicPhospohlipidConcentration_mg_Per_g, MassPerMassUnit::mg_Per_g);
......
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