Skip to content

Commit

Permalink
Fix bugs in tests: add missing HeatSource::update_time
Browse files Browse the repository at this point in the history
  • Loading branch information
Rombur committed Jun 5, 2024
1 parent 0ca1182 commit 2f9d460
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion tests/test_implicit_operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ BOOST_AUTO_TEST_CASE(implicit_operator)
beam_database.put("depth", 0.1);
beam_database.put("absorption_efficiency", 0.1);
beam_database.put("diameter", 1.0);
beam_database.put("max_power", 10.);
beam_database.put("max_power", 0.);
beam_database.put("scan_path_file", "scan_path.txt");
beam_database.put("scan_path_file_format", "segment");
std::vector<std::shared_ptr<adamantine::HeatSource<2>>> heat_sources;
heat_sources.resize(1);
heat_sources[0] =
std::make_shared<adamantine::GoldakHeatSource<2>>(beam_database);
heat_sources[0]->update_time(0.);

// Initialize the ThermalOperator
auto thermal_operator = std::make_shared<
Expand Down
15 changes: 10 additions & 5 deletions tests/test_thermal_operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ BOOST_AUTO_TEST_CASE(thermal_operator, *utf::tolerance(1e-15))
beam_database.put("depth", 0.1);
beam_database.put("absorption_efficiency", 0.1);
beam_database.put("diameter", 1.0);
beam_database.put("max_power", 10.);
beam_database.put("max_power", 0.);
beam_database.put("scan_path_file", "scan_path.txt");
beam_database.put("scan_path_file_format", "segment");
std::vector<std::shared_ptr<adamantine::HeatSource<2>>> heat_sources;
heat_sources.resize(1);
heat_sources[0] =
std::make_shared<adamantine::GoldakHeatSource<2>>(beam_database);
heat_sources[0]->update_time(0.);

// Initialize the ThermalOperator
adamantine::ThermalOperator<2, false, 1, 2, adamantine::SolidLiquidPowder,
Expand Down Expand Up @@ -196,13 +197,14 @@ BOOST_AUTO_TEST_CASE(spmv, *utf::tolerance(1e-12))
beam_database.put("depth", 0.1);
beam_database.put("absorption_efficiency", 0.1);
beam_database.put("diameter", 1.0);
beam_database.put("max_power", 10.);
beam_database.put("max_power", 0.);
beam_database.put("scan_path_file", "scan_path.txt");
beam_database.put("scan_path_file_format", "segment");
std::vector<std::shared_ptr<adamantine::HeatSource<2>>> heat_sources;
heat_sources.resize(1);
heat_sources[0] =
std::make_shared<adamantine::GoldakHeatSource<2>>(beam_database);
heat_sources[0]->update_time(0.);

// Initialize the ThermalOperator
adamantine::ThermalOperator<2, false, 2, 2, adamantine::SolidLiquidPowder,
Expand Down Expand Up @@ -305,13 +307,14 @@ BOOST_AUTO_TEST_CASE(spmv_anisotropic, *utf::tolerance(1e-12))
beam_database.put("depth", 0.1);
beam_database.put("absorption_efficiency", 0.1);
beam_database.put("diameter", 1.0);
beam_database.put("max_power", 10.);
beam_database.put("max_power", 0.);
beam_database.put("scan_path_file", "scan_path.txt");
beam_database.put("scan_path_file_format", "segment");
std::vector<std::shared_ptr<adamantine::HeatSource<2>>> heat_sources;
heat_sources.resize(1);
heat_sources[0] =
std::make_shared<adamantine::GoldakHeatSource<2>>(beam_database);
heat_sources[0]->update_time(0.);

// Initialize the ThermalOperator
adamantine::ThermalOperator<2, false, 2, 2, adamantine::SolidLiquidPowder,
Expand Down Expand Up @@ -612,13 +615,14 @@ BOOST_AUTO_TEST_CASE(spmv_rad, *utf::tolerance(1e-12))
beam_database.put("depth", 0.1);
beam_database.put("absorption_efficiency", 0.1);
beam_database.put("diameter", 1.0);
beam_database.put("max_power", 10.);
beam_database.put("max_power", 0.);
beam_database.put("scan_path_file", "scan_path.txt");
beam_database.put("scan_path_file_format", "segment");
std::vector<std::shared_ptr<adamantine::HeatSource<2>>> heat_sources;
heat_sources.resize(1);
heat_sources[0] =
std::make_shared<adamantine::GoldakHeatSource<2>>(beam_database);
heat_sources[0]->update_time(0.);

// Initialize the ThermalOperator
adamantine::ThermalOperator<2, false, 1, 2, adamantine::SolidLiquidPowder,
Expand Down Expand Up @@ -796,13 +800,14 @@ BOOST_AUTO_TEST_CASE(spmv_conv, *utf::tolerance(1e-12))
beam_database.put("depth", 0.1);
beam_database.put("absorption_efficiency", 0.1);
beam_database.put("diameter", 1.0);
beam_database.put("max_power", 10.);
beam_database.put("max_power", 0.);
beam_database.put("scan_path_file", "scan_path.txt");
beam_database.put("scan_path_file_format", "segment");
std::vector<std::shared_ptr<adamantine::HeatSource<2>>> heat_sources;
heat_sources.resize(1);
heat_sources[0] =
std::make_shared<adamantine::GoldakHeatSource<2>>(beam_database);
heat_sources[0]->update_time(0.);

// Initialize the ThermalOperator
adamantine::ThermalOperator<2, false, 1, 2, adamantine::SolidLiquidPowder,
Expand Down
3 changes: 2 additions & 1 deletion tests/test_thermal_operator_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,14 @@ BOOST_AUTO_TEST_CASE(mf_spmv, *utf::tolerance(1.5e-12))
beam_database.put("depth", 0.1);
beam_database.put("absorption_efficiency", 0.1);
beam_database.put("diameter", 1.0);
beam_database.put("max_power", 10.);
beam_database.put("max_power", 0.);
beam_database.put("scan_path_file", "scan_path.txt");
beam_database.put("scan_path_file_format", "segment");
std::vector<std::shared_ptr<adamantine::HeatSource<2>>> heat_sources;
heat_sources.resize(1);
heat_sources[0] =
std::make_shared<adamantine::GoldakHeatSource<2>>(beam_database);
heat_sources[0]->update_time(0.);

// Initialize the ThermalOperator
adamantine::ThermalOperatorDevice<2, false, 4, 2,
Expand Down

0 comments on commit 2f9d460

Please sign in to comment.