Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ac9836c
Add separate back optics to Heliostat class
qualand Nov 21, 2025
73d107e
adding off-axis canting
qualand Nov 21, 2025
680f079
Refactor heliostat z-rotation calculation and add test
qualand Nov 21, 2025
10634ad
Fixed python heliostat template test
qualand Nov 21, 2025
d66c5e9
Add single heliostat tests task 1a and 1b of round robin results
qualand Nov 24, 2025
0ec3487
Adding the remaining Phase 1 cases
qualand Nov 25, 2025
e2352af
Fix out-of-bounds access in st_tree_node::m_proc
qualand Dec 2, 2025
8e780d1
adding round robin study files to the repo
qualand Dec 2, 2025
a8c0d9b
updated single heliostat tests to use SimulationResult
qualand Dec 2, 2025
08a057e
Add heliostat field simulation unit test
qualand Dec 3, 2025
28fce30
Add advanced heliostat field simulation tests
qualand Dec 5, 2025
a237eb1
added remaining full field tests
qualand Dec 9, 2025
0df58b3
Merge branch 'develop' into round_robin_validation_tests
qualand Dec 9, 2025
324e9e5
Reset SunRayCount
qualand Dec 10, 2025
e98541c
Refactor heliostat field tests for modularity and reduce duplication
qualand Dec 10, 2025
2ea28a0
Remove unused print_info and print_sun_info parameters
qualand Dec 16, 2025
914874a
Refactor and extend single heliostat simulation tests
qualand Dec 16, 2025
2989ae7
Update single_heliostat_test.cpp
qualand Dec 16, 2025
6e81a0d
Refactor heliostat field test and update efficiency checks
qualand Dec 18, 2025
3f0c248
Set number of threads in heliostat field test
qualand Dec 18, 2025
645ef38
removing unused files
qualand Dec 18, 2025
c719a34
Replace std::exception with std::invalid_argument
qualand Dec 18, 2025
508a5e0
Reduced the number of rays for full field tests
qualand Dec 19, 2025
5886fcd
removing full field tests in debug builds
qualand Dec 19, 2025
2cd331b
Merge branch 'develop' into round_robin_validation_tests
qualand Dec 19, 2025
757aa8e
Update heliostat_field_test.cpp
qualand Dec 19, 2025
96530f7
increase tolerance due to multi-threaded seed number difference results
qualand Dec 19, 2025
9b16246
Merge branch 'develop' into round_robin_validation_tests
qualand Dec 29, 2025
2a630db
Refactor heliostat field test for const reference and result saving
qualand Dec 29, 2025
ec1d673
Clarify flux map calculation comments in test
qualand Dec 29, 2025
47f8b2b
Add .vscode/ to .gitignore
qualand Dec 29, 2025
fa0c343
Add gcov-ignore-parse-errors option to lcov command
qualand Dec 29, 2025
d7a0ce6
Update lcov command for coverage reporting
qualand Dec 29, 2025
a086dc4
Update coverage command to use profile update option
qualand Dec 29, 2025
942062b
Update coverage commands
qualand Dec 29, 2025
77ff637
Update coverage commands for lcov in CI and CMake
qualand Dec 29, 2025
ce20e11
Update coverage settings
qualand Dec 30, 2025
a46595b
Update coverage flags in CMakeLists for coretrace and tests
qualand Dec 30, 2025
2f045b5
Disable several heliostat simulation tests
qualand Dec 30, 2025
451a637
Enable coverage flags in CMake configuration
qualand Jan 20, 2026
b22efae
Fix lcov command to handle coverage info errors
qualand Jan 20, 2026
d114e04
Refactor coverage.yml for improved artifact management
qualand Jan 20, 2026
7a38305
Update test CMakeLists for coverage and test inclusion
qualand Jan 21, 2026
51616b2
Update lcov commands to ignore 'unused' errors
qualand Jan 21, 2026
a8a1ee3
Update lcov commands to handle mismatches
qualand Jan 21, 2026
eea278c
Trying to fix coverage.yml
qualand Jan 21, 2026
d12b089
Trying profile-update=atomic for both C++ and C builds
qualand Jan 21, 2026
cc11fa7
reverting atomic profile update
qualand Jan 21, 2026
ca3789f
Enable round robin tests
qualand Jan 21, 2026
d8d979d
Add option to save ray data in heliostat field tests
qualand Jan 22, 2026
12bedcd
Fixed task 1b focal lengths to canting bands
qualand Jan 22, 2026
0bffb55
Refactor receiver dimensions and output control in tests
qualand Jan 23, 2026
5ffc26b
Merge branch 'develop' into round_robin_validation_tests
qualand Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class HeliostatFieldSimulation : public ::testing::Test {

// Receiver parameters
Vector3d rec_origin = { 0.0, 0.0, 180.33 }; // This is the receiver center
double rec_width = 0.1; // Dummy value for flux map bin size
double rec_radius = 15.45 / 2.0;
double rec_height = 18.59;
double rec_heat_shield_height = 3.2331;
Expand Down Expand Up @@ -587,9 +588,16 @@ class HeliostatFieldSimulation : public ::testing::Test {
double minx, maxx, miny, maxy;
minx = maxx = miny = maxy = 0.0;
Vector3d rec_origin = receiver->get_origin_global();

minx = -rec_width / 2.0;
maxx = rec_width / 2.0;

maxy = rec_height / 2.0;
miny = -rec_height / 2.0;


// Autoscale
if (true) {
if (false) {
minx = miny = 1e199;
maxx = maxy = -1e199;
Vector3d local_position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ using SolTrace::NativeRunner::TRayData;
using SolTrace::NativeRunner::TSystem;
using SolTrace::NativeRunner::TSun;

// TODO: Refactor to remove duplicate code, read in files, create flux maps and compare.

class SingleHeliostatSimulation : public ::testing::Test {
public:
bool high_accuracy = false; // Runs 20 Million rays and tighter tolerance on checks
bool print_info = false; // Prints information on from simulation results (sun calculations, ray counts, flux calculations)
bool save_results = false; // Saves flux map results to CSV files
bool save_raydata = false; // Saves ray data to CSV file

const Vector3d zero = { 0.0, 0.0, 0.0 }; // Global origin
const Vector3d khat = { 0.0, 0.0, 1.0 }; // Global z-axis
Expand All @@ -40,6 +39,8 @@ class SingleHeliostatSimulation : public ::testing::Test {
double solar_elevation = 59.96377;

double rec_radius = 0.0;
double rec_height = 18.0;
double rec_width = 12.0;

std::shared_ptr<SolTrace::Data::Sun> sun;
std::shared_ptr<Heliostat> heliostat;
Expand Down Expand Up @@ -126,7 +127,7 @@ class SingleHeliostatSimulation : public ::testing::Test {
receiver = SolTrace::Data::make_element<SingleElement>();
receiver->get_front_optical_properties()->set_ideal_absorption();
receiver->get_back_optical_properties()->set_ideal_reflection();
receiver->set_aperture(SolTrace::Data::make_aperture<SolTrace::Data::Rectangle>(12.0, 18.0));
receiver->set_aperture(SolTrace::Data::make_aperture<SolTrace::Data::Rectangle>(rec_width, rec_height));
receiver->set_surface(SolTrace::Data::make_surface<SolTrace::Data::Flat>());
Vector3d v1 = { 0.0, 1.0, 0.0 }; // Pointing North TODO: change to point towards heliostat
Vector3d aim_point;
Expand Down Expand Up @@ -374,11 +375,15 @@ class SingleHeliostatSimulation : public ::testing::Test {
reset_flux_map();

double minx, maxx, miny, maxy;
minx = maxx = miny = maxy = 0.0;
minx = -rec_width / 2.0;
maxx = rec_width / 2.0;
miny = -rec_height / 2.0;
maxy = rec_height / 2.0;

Vector3d rec_origin = receiver->get_origin_global();

// Autoscale
if (true) {
if (false) {
minx = miny = 1e199;
maxx = maxy = -1e199;
Vector3d local_position;
Expand Down Expand Up @@ -676,18 +681,22 @@ class SingleHeliostatSimulation : public ::testing::Test {

if (!save_results) return;
std::string filename_postfix = "_Task_" + task_number + "_Position_" + position;
std::string heliostat_filename = "single_heliostat_raydata" + filename_postfix + ".csv";
result.write_csv_file(heliostat_filename);
std::string flux_result_filename = "single_heliostat_fluxmap" + filename_postfix + ".csv";
save_flux_map_to_file(flux_result_filename);
std::string flux_comparison_filename = "single_heliostat_fluxmap_comparison" + filename_postfix + ".csv";
save_flux_comparison_to_file(flux_comparison_filename);

if (print_info) {
std::cout << "Raydata saved to: " << heliostat_filename << std::endl;
std::cout << "Flux map saved to: " << flux_result_filename << std::endl;
std::cout << "Flux comparison results saved to: " << flux_comparison_filename << std::endl;
}

if (!save_raydata) return;
std::string heliostat_filename = "single_heliostat_raydata" + filename_postfix + ".csv";
result.write_csv_file(heliostat_filename);

if (print_info) {
std::cout << "Raydata saved to: " << heliostat_filename << std::endl;
}
}

void TearDown() override {
Expand Down