Skip to content

Commit

Permalink
Unit test for SHGC added. Gap deflection renamed to deflection width.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Aug 24, 2023
1 parent 0941dfd commit 0633110
Show file tree
Hide file tree
Showing 9 changed files with 202 additions and 114 deletions.
16 changes: 8 additions & 8 deletions src/Tarcog/src/IGU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,28 +256,28 @@ namespace Tarcog
return aMeanDeflections;
}

std::vector<double> CIGU::getMaxGapDeflections() const
std::vector<double> CIGU::getMaxGapWidth() const
{
std::vector<double> aMaxDeflections;
std::vector<double> aMaxWidths;

for(auto const & layer : getGapLayers())
{
aMaxDeflections.push_back(layer->getMaxDeflection());
aMaxWidths.push_back(layer->getMaxDeflection());
}

return aMaxDeflections;
return aMaxWidths;
}

std::vector<double> CIGU::getMeanGapDeflections() const
std::vector<double> CIGU::getMeanGapWidth() const
{
std::vector<double> aMeanDeflections;
std::vector<double> aMeanWidths;

for(auto const & layer : getGapLayers())
{
aMeanDeflections.push_back(layer->getMeanDeflection());
aMeanWidths.push_back(layer->getMeanDeflection());
}

return aMeanDeflections;
return aMeanWidths;
}

std::vector<double> CIGU::getGapPressures() const
Expand Down
4 changes: 2 additions & 2 deletions src/Tarcog/src/IGU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ namespace Tarcog

[[nodiscard]] std::vector<double> getMaxLayerDeflections() const;
[[nodiscard]] std::vector<double> getMeanLayerDeflections() const;
[[nodiscard]] std::vector<double> getMaxGapDeflections() const;
[[nodiscard]] std::vector<double> getMeanGapDeflections() const;
[[nodiscard]] std::vector<double> getMaxGapWidth() const;
[[nodiscard]] std::vector<double> getMeanGapWidth() const;

[[nodiscard]] std::vector<double> getGapPressures() const;

Expand Down
8 changes: 4 additions & 4 deletions src/Tarcog/src/SingleSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ namespace Tarcog
return m_IGU.getMeanLayerDeflections();
}

std::vector<double> CSingleSystem::getMaxGapDeflections() const
std::vector<double> CSingleSystem::getMaxGapWidth() const
{
return m_IGU.getMaxGapDeflections();
return m_IGU.getMaxGapWidth();
}

std::vector<double> CSingleSystem::getMeanGapDeflections() const
std::vector<double> CSingleSystem::getMeanGapWidth() const
{
return m_IGU.getMeanGapDeflections();
return m_IGU.getMeanGapWidth();
}

std::vector<double> CSingleSystem::getPanesLoad()
Expand Down
4 changes: 2 additions & 2 deletions src/Tarcog/src/SingleSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ namespace Tarcog

[[nodiscard]] std::vector<double> getMaxLayerDeflections() const;
[[nodiscard]] std::vector<double> getMeanLayerDeflections() const;
[[nodiscard]] std::vector<double> getMaxGapDeflections() const;
[[nodiscard]] std::vector<double> getMeanGapDeflections() const;
[[nodiscard]] std::vector<double> getMaxGapWidth() const;
[[nodiscard]] std::vector<double> getMeanGapWidth() const;
[[nodiscard]] std::vector<double> getPanesLoad();
void setAppliedLoad(std::vector<double> load);

Expand Down
8 changes: 4 additions & 4 deletions src/Tarcog/src/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ namespace Tarcog
return m_System.at(t_System)->getMeanLayerDeflections();
}

std::vector<double> CSystem::getMaxGapDeflections(System t_System)
std::vector<double> CSystem::getMaxGapWidth(System t_System)
{
checkSolved();
return m_System.at(t_System)->getMaxGapDeflections();
return m_System.at(t_System)->getMaxGapWidth();
}

std::vector<double> CSystem::getMeanGapDeflections(System t_System)
std::vector<double> CSystem::getMeanGapWidth(System t_System)
{
checkSolved();
return m_System.at(t_System)->getMeanGapDeflections();
return m_System.at(t_System)->getMeanGapWidth();
}

std::vector<double> CSystem::getPanesLoad(System t_System)
Expand Down
4 changes: 2 additions & 2 deletions src/Tarcog/src/System.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace Tarcog

[[nodiscard]] std::vector<double> getMaxLayerDeflections(System t_System);
[[nodiscard]] std::vector<double> getMeanLayerDeflections(System t_System);
[[nodiscard]] std::vector<double> getMaxGapDeflections(System t_System);
[[nodiscard]] std::vector<double> getMeanGapDeflections(System t_System);
[[nodiscard]] std::vector<double> getMaxGapWidth(System t_System);
[[nodiscard]] std::vector<double> getMeanGapWidth(System t_System);
[[nodiscard]] std::vector<double> getPanesLoad(System t_System);
void setAppliedLoad(const std::vector<double> & load);

Expand Down
8 changes: 4 additions & 4 deletions src/Tarcog/tst/units/DoubleClearDeflectionTPDefault.unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ TEST_F(DoubleClearDeflectionTPDefault, U_ValueRun)
testVectors(
"Mean layer deflection", correctMeanLayerDeflection, MeanLayerDeflection, Tolerance);

const auto MaxGapDeflection = tarcogSystem.getMaxGapDeflections();
const auto MaxGapDeflection = tarcogSystem.getMaxGapWidth();
std::vector correctMaxGapDeflection{9.930646e-3};
testVectors("Maximum gap deflection", correctMaxGapDeflection, MaxGapDeflection, 1e-8);

const auto MeanGapDeflection = tarcogSystem.getMeanGapDeflections();
const auto MeanGapDeflection = tarcogSystem.getMeanGapWidth();
std::vector correctMeanGapDeflection{11.539846e-3};
testVectors("Mean gap deflection", correctMeanGapDeflection, MeanGapDeflection, Tolerance);

Expand Down Expand Up @@ -192,11 +192,11 @@ TEST_F(DoubleClearDeflectionTPDefault, SHGC_ValueRun)
testVectors(
"Mean layer deflection", correctMeanLayerDeflection, MeanLayerDeflection, Tolerance);

const auto MaxGapDeflection = tarcogSystem.getMaxGapDeflections();
const auto MaxGapDeflection = tarcogSystem.getMaxGapWidth();
std::vector correctMaxGapDeflection{0.013286};
testVectors("Maximum gap deflection", correctMaxGapDeflection, MaxGapDeflection, Tolerance);

const auto MeanGapDeflection = tarcogSystem.getMeanGapDeflections();
const auto MeanGapDeflection = tarcogSystem.getMeanGapWidth();
std::vector correctMeanGapDeflection{0.012945};
testVectors("Mean gap deflection", correctMeanGapDeflection, MeanGapDeflection, Tolerance);

Expand Down
Loading

0 comments on commit 0633110

Please sign in to comment.