• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NREL / SolTrace / 18544749821

15 Oct 2025 10:47PM UTC coverage: 89.946% (+45.8%) from 44.166%
18544749821

push

github

web-flow
Restructured backend for SolTrace (#63)

* Initial API for refactored SolTrace

* Updates to various APIs; first pass at element/ray source container implementation

* Use existing matrix-vector code as backend for matrix and vector classes; start implementing APIs

* Created new test on power tower example file with 50000 rays. Changed CMake to use cpp 17.

* Added ground results csv to new folder in google-tests directory

* Removed register prefix from variables in mtrand.h. More errors to come.

* Removed lines in CMakeLists causing linux failure, fixed bug in power tower test

* Created parabola.stinput test and a test using powertower optimization on the powertower sample

* Commented out parabola test for now, added nonexistent branch to CI to see how it runs

* Fixed syntax error

* Changed tests based on PR feedback

* Fixed error in CMakeLists that caused failure on windows

* Removed output messages from st_sim_run_test

* Fixed silly mistake in previous commit

* Added comments and removed unused libraries

* Changed naming conventions of tests

* Added high flux solar furnace test changes, changed parabola test file name

* Fixed typo

* Move refactored data to its own directory; add to refactored classes to build

* Add missed files

* Add unit tests for basic linear algebra and container template

* More tests; Start implementation of composite element

* Add more unit tests on element

* Add missed headers

* Remove target from cmake build command in CI

* Initial virtual element implementation; smoke test for virtual element

* Correct aperture spelling; add tests for virtual elements

* Add some unit tests for simulation data

* Move to static library for simulation data (temporary); update cmake files to get correct mac architecture

* Attempt to fix coverage failure

* Attempt to capture inline functions in code coverage; add a few more explicit tests

* Fix build

* Separate storage of CompositeElement and SingleElement; update te... (continued)

4357 of 4844 new or added lines in 62 files covered. (89.95%)

4357 of 4844 relevant lines covered (89.95%)

8565975.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/coretrace/simulation_runner/native_runner/native_runner.hpp
1
#ifndef SOLTRACE_NATIVE_RUNNER_H
2
#define SOLTRACE_NATIVE_RUNNER_H
3

4
#include "native_runner_types.hpp"
5
#include "simulation_runner.hpp"
6
#include "simulation_result.hpp"
7

8
namespace SolTrace::NativeRunner {
9

10
using SolTrace::Runner::RunnerStatus;
11
using SolTrace::Runner::SimulationRunner;
12

13
class NativeRunner : public SimulationRunner
14
{
15
public:
16
    NativeRunner();
17
    ~NativeRunner();
18

19
    virtual RunnerStatus initialize();
20
    virtual RunnerStatus setup_simulation(const SolTrace::Data::SimulationData *data);
21
    virtual RunnerStatus update_simulation(const SolTrace::Data::SimulationData *data);
22
    virtual RunnerStatus run_simulation();
23
    virtual RunnerStatus report_simulation(SolTrace::Result::SimulationResult *result,
24
                                           int level_spec);
25

26
    // Runner options
27
    void disable_power_tower() { this->as_power_tower = false; }
28
    void enable_power_tower() { this->as_power_tower = true; }
29
    void disable_point_focus() { this->tsys.sim_dynamic_group = false; }
30
    void enable_point_focus() { this->tsys.sim_dynamic_group = true; }
31
    void set_newton_tolerance(double tol)
32
    {
33
        this->eparams.newton_tolerance = tol;
34
        return;
35
    }
36

37
    void set_newton_max_iters(uint_fast64_t max_iters)
38
    {
39
        this->eparams.newton_max_iters = max_iters;
40
        return;
41
    }
42

43
    void set_number_of_threads(uint_fast64_t nthr)
44
    {
45
        this->number_of_threads = nthr;
46
        return;
47
    }
48

49
    // Accessors
50
    int_fast64_t get_number_stages() const
51
    {
52
        return this->get_system()->StageList.size();
53
    }
54
    int_fast64_t get_number_elements() const
55
    {
56
        int_fast64_t nelems = 0;
57
        for (auto stage : this->get_system()->StageList)
58
        {
59
            nelems += stage->ElementList.size();
60
        }
61
        return nelems;
62
    }
63

NEW
64
    const TSystem *get_system() const { return &this->tsys; }
×
65

66
    // Helper functions
67
    RunnerStatus setup_parameters(const SolTrace::Data::SimulationData *data);
68
    RunnerStatus setup_sun(const SolTrace::Data::SimulationData *data);
69
    RunnerStatus setup_elements(const SolTrace::Data::SimulationData *data);
70

71
private:
72
    // Use power tower speed ups
73
    bool as_power_tower;
74

75
    // Number of threads to use when tracing
76
    uint_fast64_t number_of_threads;
77

78
    ElementParameters eparams;
79
    
80
    TSystem tsys;
81

82
    bool set_aperture_planes(TSystem *tsys);
83
    bool set_aperture_planes(tstage_ptr stage);
84
    bool aperture_plane(telement_ptr Element);
85
};
86

87
} // namespace SolTrace::NativeRunner
88

89
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc