Skip to content

Commit

Permalink
Some naming and formatting fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidanovic committed Jun 12, 2024
1 parent 5071a00 commit b1e7686
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 39 deletions.
42 changes: 15 additions & 27 deletions src/Tarcog/src/EffectiveOpenness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
namespace EffectiveLayers
{
ShadeOpenness::ShadeOpenness(double ah, double dl, double dr, double dtop, double dbot) :
Ah(ah),
Dl(dl),
Dr(dr),
Dtop(dtop),
Dbot(dbot)
Ah(ah), Dl(dl), Dr(dr), Dtop(dtop), Dbot(dbot)
{}

EffectiveOpenness::EffectiveOpenness(const double ah,
Expand All @@ -18,12 +14,7 @@ namespace EffectiveLayers
const double atop,
const double abot,
const double frontPorosity) :
Ah(ah),
Al(al),
Ar(ar),
Atop(atop),
Abot(abot),
FrontPorosity(frontPorosity)
Ah(ah), Al(al), Ar(ar), Atop(atop), Abot(abot), FrontPorosity(frontPorosity)
{}

bool isClosed(const EffectiveOpenness & effectiveOpenness)
Expand All @@ -47,18 +38,15 @@ namespace EffectiveLayers
{}

Coefficients::Coefficients(double c1, double c2, double c3, double c4) :
C1(c1),
C2(c2),
C3(c3),
C4(c4)
C1(c1), C2(c2), C3(c3), C4(c4)
{}

EffectiveVenetian::EffectiveVenetian(double width,
double height,
double thickness,
const ShadeOpenness & openness,
double slatAngle,
double slatWidth,
const ShadeOpenness & openness,
const Coefficients & coefficients) :
EffectiveLayer(width, height, thickness, openness, coefficients),
m_SlatAngleRad(slatAngle * 2.0 * ConstantsData::WCE_PI / 360.0),
Expand Down Expand Up @@ -94,23 +82,23 @@ namespace EffectiveLayers
double slatAngle,
double slatWidth) :
EffectiveVenetian(
width, height, thickness, openness, slatAngle, slatWidth, {0.016, -0.63, 0.53, 0.043})
width, height, thickness, slatAngle, slatWidth, openness, {0.016, -0.63, 0.53, 0.043})
{}

EffectiveVerticalVenentian::EffectiveVerticalVenentian(double width,
double height,
double thickness,
const ShadeOpenness & openness,
double slatAngle,
double slatWidth) :
EffectiveVerticalVenetian::EffectiveVerticalVenetian(double width,
double height,
double thickness,
const ShadeOpenness & openness,
double slatAngle,
double slatWidth) :
EffectiveVenetian(
width, height, thickness, openness, slatAngle, slatWidth, {0.041, 0.0, 0.27, 0.012})
width, height, thickness, slatAngle, slatWidth, openness, {0.041, 0.0, 0.27, 0.012})
{}

EffectiveLayerCommonType::EffectiveLayerCommonType(double width,
double height,
double thickness,
const ShadeOpenness & openness) :
double height,
double thickness,
const ShadeOpenness & openness) :
EffectiveLayer(width, height, thickness, openness, {0.078, 1.2, 1.0, 1.0})
{}

Expand Down
20 changes: 10 additions & 10 deletions src/Tarcog/src/EffectiveOpenness.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ namespace EffectiveLayers

//! \brief Effective frontOpenness of shading layer that is necessary for thermal calculations.
//!
//! Thermal frontOpenness of shading layer will not match physical frontOpenness and because of that some
//! calculations are required.
//! Thermal frontOpenness of shading layer will not match physical frontOpenness and because of
//! that some calculations are required.
struct EffectiveOpenness
{
EffectiveOpenness(
Expand Down Expand Up @@ -77,9 +77,9 @@ namespace EffectiveLayers
EffectiveVenetian(double width,
double height,
double thickness,
const ShadeOpenness & openness,
double slatAngle,
double slatWidth,
const ShadeOpenness & openness,
const Coefficients & coefficients);

EffectiveOpenness getEffectiveOpenness() override;
Expand All @@ -101,15 +101,15 @@ namespace EffectiveLayers
double SlatWidth);
};

class EffectiveVerticalVenentian : public EffectiveVenetian
class EffectiveVerticalVenetian : public EffectiveVenetian
{
public:
EffectiveVerticalVenentian(double width,
double height,
double thickness,
const ShadeOpenness & openness,
double slatAngle,
double slatWidth);
EffectiveVerticalVenetian(double width,
double height,
double thickness,
const ShadeOpenness & openness,
double slatAngle,
double slatWidth);
};

//! \brief Used for effective calculations for Perforated, Woven, Diffuse shade and BSDF
Expand Down
4 changes: 2 additions & 2 deletions src/Tarcog/tst/units/EffectiveLayers.unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TEST_F(TestEffectiveLayers, TestVenetianVerticalEffectiveLayerWithTopAndBotOpenn

EffectiveLayers::ShadeOpenness openness{0.998224968, 0, 0, 0.01, 0.008};

EffectiveLayers::EffectiveVerticalVenentian venetian{
EffectiveLayers::EffectiveVerticalVenetian venetian{
width, height, materialThickness, openness, slatTiltAngle, slatWidth};

const auto effectiveThickness{venetian.effectiveThickness()};
Expand All @@ -99,7 +99,7 @@ TEST_F(TestEffectiveLayers, TestVenetianVerticalEffectiveLayerWithTopAndBotOpenn

EffectiveLayers::ShadeOpenness openness{0.998224966, 0, 0, 0.01, 0.008};

EffectiveLayers::EffectiveVerticalVenentian venetian{
EffectiveLayers::EffectiveVerticalVenetian venetian{
width, height, materialThickness, openness, slatTiltAngle, slatWidth};

const auto effectiveThickness{venetian.effectiveThickness()};
Expand Down

0 comments on commit b1e7686

Please sign in to comment.