Skip to content

Commit

Permalink
Dual-band materials have ratio as default parameter instead of two ov…
Browse files Browse the repository at this point in the history
…erloaded functions.
  • Loading branch information
vidanovic committed Aug 16, 2022
1 parent a7c0fb2 commit 5c05e6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 30 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)

project(Windows-CalcEngine VERSION 1.0.11 LANGUAGES CXX)
project(Windows-CalcEngine VERSION 1.0.32 LANGUAGES CXX)

set(target_name ${PROJECT_NAME})

Expand Down
19 changes: 0 additions & 19 deletions src/SingleLayerOptics/src/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,6 @@ using SpectralAveraging::CPhotovoltaicSample;

namespace SingleLayerOptics
{
std::shared_ptr<CMaterial> Material::dualBandMaterial(const double Tfsol,
const double Tbsol,
const double Rfsol,
const double Rbsol,
const double Tfvis,
const double Tbvis,
const double Rfvis,
const double Rbvis)
{
auto aSolarRangeMaterial =
std::make_shared<CMaterialSingleBand>(Tfsol, Tbsol, Rfsol, Rbsol);
auto aVisibleRangeMaterial =
std::make_shared<CMaterialSingleBand>(Tfvis, Tbvis, Rfvis, Rbvis);
auto material =
std::make_shared<CMaterialDualBand>(aVisibleRangeMaterial, aSolarRangeMaterial);
material->createRangesFromRatio(ConstantsData::NIRRatio);
return material;
}

std::shared_ptr<CMaterial> Material::dualBandMaterial(const double Tfsol,
const double Tbsol,
const double Rfsol,
Expand Down
12 changes: 2 additions & 10 deletions src/SingleLayerOptics/src/Material.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ namespace SingleLayerOptics
class Material
{
public:
static std::shared_ptr<CMaterial> dualBandMaterial(double Tfsol,
double Tbsol,
double Rfsol,
double Rbsol,
double Tfvis,
double Tbvis,
double Rfvis,
double Rbvis);

static std::shared_ptr<CMaterial> dualBandMaterial(double Tfsol,
double Tbsol,
Expand All @@ -35,7 +27,7 @@ namespace SingleLayerOptics
double Tbvis,
double Rfvis,
double Rbvis,
double ratio);
double ratio = ConstantsData::NIRRatio);

static std::shared_ptr<CMaterial>
dualBandMaterial(double Tfsol,
Expand All @@ -58,7 +50,7 @@ namespace SingleLayerOptics
std::vector<std::vector<double>> const & Rfvis,
std::vector<std::vector<double>> const & Rbvis,
BSDFHemisphere const & hemisphere,
double ratio);
double ratio = ConstantsData::NIRRatio);

static std::shared_ptr<CMaterial>
dualBandBSDFMaterial(std::vector<std::vector<double>> const & Tfsol,
Expand Down

0 comments on commit 5c05e6b

Please sign in to comment.