Skip to content

Commit

Permalink
Operator() for getting material property added.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Jun 6, 2024
1 parent 350ec33 commit ac8d6b7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
6 changes: 6 additions & 0 deletions src/SingleLayerOptics/src/MaterialDescription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ namespace SingleLayerOptics
return m_Surface.at(t_Side)->getProperty(t_Property);
}

double RMaterialProperties::operator()(FenestrationCommon::Property t_Property,
FenestrationCommon::Side t_Side) const
{
return getProperty(t_Property, t_Side);
}

////////////////////////////////////////////////////////////////////////////////////
//// CMaterial
////////////////////////////////////////////////////////////////////////////////////
Expand Down
7 changes: 5 additions & 2 deletions src/SingleLayerOptics/src/MaterialDescription.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ namespace SingleLayerOptics
{
public:
RMaterialProperties(double aTf, double aTb, double aRf, double aRb);
double getProperty(FenestrationCommon::Property t_Property,
FenestrationCommon::Side t_Side) const;
[[nodiscard]] double getProperty(FenestrationCommon::Property t_Property,
FenestrationCommon::Side t_Side) const;
[[nodiscard]] double operator()(FenestrationCommon::Property t_Property,
FenestrationCommon::Side t_Side) const;


private:
std::map<FenestrationCommon::Side, std::shared_ptr<CSurface>> m_Surface;
Expand Down
15 changes: 8 additions & 7 deletions src/SingleLayerOptics/src/VenetianCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ namespace SingleLayerOptics
size_t size = m_Material->getBandSize();
for(size_t i = 0; i < size; ++i)
{
double Tf = aMat[i].getProperty(Property::T, Side::Front);
double Tb = aMat[i].getProperty(Property::T, Side::Back);
double Rf = aMat[i].getProperty(Property::R, Side::Front);
double Rb = aMat[i].getProperty(Property::R, Side::Back);

m_EnergiesBand.emplace_back(
LayerProperties{Tf, Rf, Tb, Rb}, venetianForwardGeometry, m_BackwardFlowCellDescription);
double Tf = aMat[i](Property::T, Side::Front);
double Tb = aMat[i](Property::T, Side::Back);
double Rf = aMat[i](Property::R, Side::Front);
double Rb = aMat[i](Property::R, Side::Back);

m_EnergiesBand.emplace_back(LayerProperties{Tf, Rf, Tb, Rb},
venetianForwardGeometry,
m_BackwardFlowCellDescription);
}
}
}
Expand Down

0 comments on commit ac8d6b7

Please sign in to comment.