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

NREL / SolTrace / 21006557699

14 Jan 2026 07:09PM UTC coverage: 88.001% (+0.2%) from 87.815%
21006557699

Pull #96

github

web-flow
Merge 2d2b811d6 into e78d2bfb0
Pull Request #96: 95 implement embree runner

569 of 752 new or added lines in 16 files covered. (75.66%)

13 existing lines in 6 files now uncovered.

6241 of 7092 relevant lines covered (88.0%)

7203590.97 hits per line

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

0.0
/coretrace/simulation_data/utilities.hpp
1

2
#ifndef SOLTRACE_UTILITIES_H
3
#define SOLTRACE_UTILITIES_H
4

5
#include <cstdint>
6
#include <limits>
7

8
#include "vector3d.hpp"
9

10
namespace SolTrace::Data {
11

12
template <typename R>
NEW
13
R abs_min(const R values[], uint_fast64_t size)
×
14
{
NEW
15
    R amin = std::numeric_limits<R>::max();
×
NEW
16
    for (uint_fast64_t k=0; k < size; ++k)
×
17
    {
NEW
18
        amin = std::min(amin, std::abs(values[k]));
×
19
    }
NEW
20
    return amin;
×
21
}
22

23
template <typename R>
NEW
24
R abs_max(const R values[], uint_fast64_t size)
×
25
{
NEW
26
    R amax = 0.0;
×
NEW
27
    for (uint_fast64_t k=0; k < size; ++k)
×
28
    {
NEW
29
        amax = std::max(amax, std::abs(values[k]));
×
30
    }
NEW
31
    return amax;
×
32
}
33

34
template <typename R>
NEW
35
bool is_approx(const R &x, const R &y, const R &atol=1e-6)
×
36
{
NEW
37
    return (fabs(x - y) < atol);
×
38
}
39

40
void project_onto_plane(const Vector3d &n,
41
                        const Vector3d &u,
42
                        Vector3d &uproj);
43

44
void project_onto_plane(const Vector3d &n,
45
                        Vector3d &u);
46

47
void project_onto_vector(const Vector3d &u,
48
                         const Vector3d &v,
49
                         Vector3d &vproj);
50

51
void project_onto_vector(const Vector3d &u,
52
                         Vector3d &v);
53

54
void rotate_vector_degrees(const Vector3d &k,
55
                           const Vector3d &v,
56
                           double theta,
57
                           Vector3d &vrot);
58

59
void rotate_vector_radians(const Vector3d &k,
60
                           const Vector3d &v,
61
                           double theta,
62
                           Vector3d &vrot);
63

64
void sun_position_vector_degrees(Vector3d &sun_pos,
65
                                 double azimuth,
66
                                 double elevation);
67

68
void sun_position_vector_radians(Vector3d &sun_pos,
69
                                 double azimuth,
70
                                 double elevation);
71

72
} // namespace SolTrace::Data
73

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