• 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

72.41
/coretrace/simulation_data/single_element.hpp
1
/**
2
 * @file single_element.hpp
3
 * @brief Single optical element implementation
4
 *
5
 * Defines the SingleElement class for individual optical surfaces
6
 * with associated apertures, surfaces, and optical properties.
7
 * Represents the fundamental building block of optical systems
8
 * in SolTrace ray tracing simulations.
9
 *
10
 * @defgroup elements Optical Elements
11
 * @{
12
 */
13

14
#ifndef SOLTRACE_PLANE_H
15
#define SOLTRACE_PLANE_H
16

17
#include "element.hpp"
18

19
#include <memory>
20

21
#include "aperture.hpp"
22
#include "surface.hpp"
23

24
namespace SolTrace::Data {
25

26
class SingleElement : public ElementBase
27
{
28
public:
29
    SingleElement();
30
    virtual ~SingleElement();
31

32
    virtual bool is_single() const override { return true; }
8,431✔
33

NEW
34
    virtual const aperture_ptr get_aperture() const override
×
35
    {
NEW
36
        return this->aperture;
×
37
    }
38
    virtual aperture_ptr get_aperture() override
8,351✔
39
    {
40
        return this->aperture;
8,351✔
41
    }
42
    virtual void set_aperture(aperture_ptr ap) override
8,573✔
43
    {
44
        this->aperture = ap;
8,573✔
45
        return;
8,573✔
46
    }
47

NEW
48
    virtual const surface_ptr get_surface() const override
×
49
    {
NEW
50
        return this->surface;
×
51
    }
52
    virtual surface_ptr get_surface() override
8,350✔
53
    {
54
        return this->surface;
8,350✔
55
    }
56
    virtual void set_surface(surface_ptr sp) override
8,573✔
57
    {
58
        this->surface = sp;
8,573✔
59
        return;
8,573✔
60
    }
61

NEW
62
    const OpticalProperties *get_front_optical_properties() const override
×
63
    {
NEW
64
        return &(this->optics_front);
×
65
    }
66
    OpticalProperties *get_front_optical_properties() override
14,689✔
67
    {
68
        return &(this->optics_front);
14,689✔
69
    }
70
    void set_front_optical_properties(const OpticalProperties &op) override
8,545✔
71
    {
72
        this->optics_front = op;
8,545✔
73
        return;
8,545✔
74
    }
75

NEW
76
    const OpticalProperties *get_back_optical_properties() const override
×
77
    {
NEW
78
        return &(this->optics_back);
×
79
    }
80
    OpticalProperties *get_back_optical_properties() override
14,666✔
81
    {
82
        return &(this->optics_back);
14,666✔
83
    }
84
    void set_back_optical_properties(const OpticalProperties &op) override
8,442✔
85
    {
86
        this->optics_back = op;
8,442✔
87
    }
8,442✔
88

89
    virtual void enforce_user_fields_set() const override;
90

91
protected:
92
    aperture_ptr aperture;
93
    surface_ptr surface;
94

95
    OpticalProperties optics_front;
96
    OpticalProperties optics_back;
97
};
98

99
using single_element_ptr = typename std::shared_ptr<SingleElement>;
100

101
} // namespace SolTrace::Data
102

103
/**
104
 * @}
105
 */
106

107
#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