Commit 91da7763 authored by Philipp Schäfer's avatar Philipp Schäfer

ART - Tests

- now use shared pointers during creation of atmospheres
parent 5dc24f4a
......@@ -97,18 +97,18 @@ void TestReceiverNearGround(const CStratifiedAtmosphere& atmosphere, const strin
CStratifiedAtmosphere GetHomogeneousAtmosphere()
{
auto humidProfile = std::make_unique<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_unique<TemperatureProfiles::CRoom>();
auto windProfile = std::make_unique<WindProfiles::CZero>();
return CStratifiedAtmosphere(std::move(tempProfile), std::move(windProfile), std::move(humidProfile));
auto humidProfile = std::make_shared<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_shared<TemperatureProfiles::CRoom>();
auto windProfile = std::make_shared<WindProfiles::CZero>();
return CStratifiedAtmosphere(tempProfile, windProfile, humidProfile);
}
CStratifiedAtmosphere GetInhomogeneousAtmosphere()
{
auto humidProfile = std::make_unique<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_unique<TemperatureProfiles::CISA>();
auto windProfile = std::make_unique<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
return CStratifiedAtmosphere(std::move(tempProfile), std::move(windProfile), std::move(humidProfile));
auto humidProfile = std::make_shared<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_shared<TemperatureProfiles::CISA>();
auto windProfile = std::make_shared<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
return CStratifiedAtmosphere(tempProfile, windProfile, humidProfile);
}
......
......@@ -82,15 +82,15 @@ void runTest(const CStratifiedAtmosphere& atmosphere, const string& fileSuffix)
int main(int iNumInArgs, char* pcInArgs[])
{
auto humidProfile = std::make_unique<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_unique<TemperatureProfiles::CRoom>();
auto windProfile = std::make_unique<WindProfiles::CZero>();
auto homogeneousAtmosphere = CStratifiedAtmosphere(std::move(tempProfile), std::move(windProfile), std::move(humidProfile));
auto humidProfile2 = std::make_unique<HumidityProfiles::CConstant>(50);
auto tempProfile2 = std::make_unique<TemperatureProfiles::CISA>();
auto windProfile2 = std::make_unique<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
auto inhomogeneousAtmosphere = CStratifiedAtmosphere(std::move(tempProfile2), std::move(windProfile2), std::move(humidProfile2));
auto humidProfile = std::make_shared<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_shared<TemperatureProfiles::CRoom>();
auto windProfile = std::make_shared<WindProfiles::CZero>();
auto homogeneousAtmosphere = CStratifiedAtmosphere(tempProfile, windProfile, humidProfile);
auto humidProfile2 = std::make_shared<HumidityProfiles::CConstant>(50);
auto tempProfile2 = std::make_shared<TemperatureProfiles::CISA>();
auto windProfile2 = std::make_shared<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
auto inhomogeneousAtmosphere = CStratifiedAtmosphere(tempProfile2, windProfile2, humidProfile2);
runTest(homogeneousAtmosphere, "Homogeneous");
runTest(inhomogeneousAtmosphere, "Inhomogeneous");
......
......@@ -79,30 +79,30 @@ void runTest(const CStratifiedAtmosphere& atmosphere, const double& sourceAltitu
void TestHomogeneousAtmosphere(const double& sourceAltitude, const VistaVector3D& rayDirection, const string& fileSuffix)
{
auto humidProfile = std::make_unique<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_unique<TemperatureProfiles::CRoom>();
auto windProfile = std::make_unique<WindProfiles::CZero>();
auto homogeneousAtmosphere = CStratifiedAtmosphere(std::move(tempProfile), std::move(windProfile), std::move(humidProfile));
auto humidProfile = std::make_shared<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_shared<TemperatureProfiles::CRoom>();
auto windProfile = std::make_shared<WindProfiles::CZero>();
auto homogeneousAtmosphere = CStratifiedAtmosphere(tempProfile, windProfile, humidProfile);
runTest(homogeneousAtmosphere, sourceAltitude, rayDirection, fileSuffix);
}
void TestInhomogeneousAtmosphere(const double& sourceAltitude, const VistaVector3D& rayDirection, const string& fileSuffix)
{
auto humidProfile = std::make_unique<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_unique<TemperatureProfiles::CISA>();
auto windProfile = std::make_unique<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
auto inhomogeneousAtmosphere = CStratifiedAtmosphere(std::move(tempProfile), std::move(windProfile), std::move(humidProfile));
auto humidProfile = std::make_shared<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_shared<TemperatureProfiles::CISA>();
auto windProfile = std::make_shared<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
auto inhomogeneousAtmosphere = CStratifiedAtmosphere(tempProfile, windProfile, humidProfile);
runTest(inhomogeneousAtmosphere, sourceAltitude, rayDirection, fileSuffix);
}
void TestTraceMultipleRays()
{
auto humidProfile = std::make_unique<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_unique<TemperatureProfiles::CISA>();
auto windProfile = std::make_unique<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
auto atmosphere = CStratifiedAtmosphere(std::move(tempProfile), std::move(windProfile), std::move(humidProfile));
auto humidProfile = std::make_shared<HumidityProfiles::CConstant>(50);
auto tempProfile = std::make_shared<TemperatureProfiles::CISA>();
auto windProfile = std::make_shared<WindProfiles::CLog>(0.6, 0.1, VistaVector3D(1, 0, 0));
auto atmosphere = CStratifiedAtmosphere(tempProfile, windProfile, humidProfile);
auto engine = Simulation::CEngine();
VistaVector3D sourcePosition = VistaVector3D(0, 0, 1000);
......
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