Skip to content

Conversation

@qualand
Copy link
Collaborator

@qualand qualand commented Jan 23, 2026

I should have pushed this before closing last pull request.

qualand and others added 30 commits November 21, 2025 10:55
Introduces a new OpticalProperties member for the back surface of Heliostat and methods to set mirror and back optics independently. Updates usage in tests and simulation logic to use set_mirror_optics instead of set_optics, and ensures back optics are applied correctly in element construction.
initially adding, test is passing with low tolerances. Will revisit.
Updated the z-rotation calculation in heliostat.cpp. Added a comprehensive unit test for a single facet flat heliostat oriented north of receiver, verifying geometry, ray tracing, and power absorption with sunshape and surface errors.
Replaced manual azimuth calculation in heliostat.cpp with atan2 for improved accuracy. Updated tracing_errors.cpp to consistently convert errors from mrad to rad and removed redundant conversions. Moved the SingleFacetFlat_North test from heliostat_test.cpp to a new single_heliostat_test.cpp file, expanding it with additional focused and southeast position tests. Updated CMakeLists.txt to include the new test file. Added a flux binning method for the test environment. This should be standardized.
Added a bounds check before accessing key.at(index) to prevent out-of-range exceptions. The method now returns 'this' if the index is out of bounds.
cmake copies them to the binary build directory.
Introduces heliostat_field_test.cpp to test simulation of a heliostat field, including ray tracing, receiver flux mapping, and validation of power and flux results. Most tests are commented out currently. Updates CMakeLists.txt to include the new test.
Expanded the heliostat field simulation test suite to cover multiple configurations, including slant-focused and band-focused single and multi-facet heliostats, center and scatter aim strategies, and different solar positions. Added methods for reading expected results, checking simulation outputs, and saving flux maps for validation. Also added a get_area() method to the Heliostat class for area calculations.
commented out because native runner is too slow to run as tests.
Added initialization of System->SunRayCount to 0 to ensure correct ray counting at the beginning of each run.
Consolidated and refactored heliostat field test cases to reduce code duplication and improve maintainability. Introduced helper methods for common simulation steps, parameterized test logic for different configurations, and replaced repetitive test cases with more modular and reusable code blocks. Also added TODOs for further refactoring in single heliostat tests.
Eliminated the print_info and print_sun_info parameters from several helper methods in heliostat_field_test.cpp, as they were no longer needed. Updated all method calls accordingly to improve code clarity.
Refactored the test fixture to modularize heliostat setup, simulation, and result checking. Added helper methods for setting up different heliostat configurations, reading expected results, and comparing simulation outputs. Consolidated and parameterized test cases for various heliostat positions and configurations, improving code reuse and maintainability.
Removed per-heliostat ray count vectors in favor of total counters, updated ray counting logic, and adjusted test tolerances and efficiency calculations. Added gap settings for heliostats, included heat shield elements in simulation stages, and improved output information for test diagnostics. Commented out sun size checks and cleaned up test structure.
Added a call to set the number of threads to 10 in the heliostat_field_test.cpp setup.
added multi-threading to the single heliostat tests
Added a flag to include these.
Updated several methods to take SimulationResult as a const reference. Enhanced simulate_check_outputs to optionally save results to files with descriptive filenames when save_results is true, replacing commented-out code with functional file output.
qualand and others added 23 commits December 29, 2025 08:58
Removes redundant lcov ignore pattern in the GitHub Actions workflow and adds '-fprofile-update=atomic' to coverage build flags in CMake.
Removed '-fprofile-update=atomic' from coretrace coverage flags and added it to google-tests coverage link options.
Commented out multiple test cases in heliostat_field_test.cpp and single_heliostat_test.cpp to temporarily disable them. Also updated coverage flags in CMakeLists.txt to use target_compile_options for -fprofile-update=atomic and target_link_options for --coverage. To address coverage issue.
Updated the coverage workflow to clean previous artifacts, adjust installation commands, and improve test execution.
Removed atomic profile update compile option for coverage builds in google-tests/CMakeLists.txt. Adjusted CST test source inclusion logic to only add single_heliostat_test.cpp and heliostat_field_test.cpp for Release or FULL_FIELD_VALIDATION_TEST builds.
Removed mismatch ignore flag and profile-update=atomic"
Removed coverage flags from CMake configuration.
Uncommented and activated previously disabled heliostat field and single heliostat simulation tests. Added save_results flag and logic to optionally save simulation outputs to CSV files. Minor formatting and cleanup in sun position test file.
Introduces a new 'save_raydata' flag to control saving of ray data to CSV files in heliostat_field_test.cpp. Ray data is now only saved if both 'save_results' and 'save_raydata' are true, providing more granular control over test output.
The original round-robin case setup for task 1b used the canting bands for determining the focal length rather than focal bands reported in the paper. This change reduced errors in result comparisons.
Introduced rec_width and rec_height variables for receiver dimensions in both heliostat field and single heliostat tests, replacing hardcoded values. Updated flux map bounds calculation to use these variables and disabled autoscaling by default. Added save_raydata flag to control ray data output separately from flux map results in single_heliostat_test.cpp.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21304476652

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.837%

Totals Coverage Status
Change from base Build 21258149251: 0.0%
Covered Lines: 6153
Relevant Lines: 7005

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants