GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 20.0% 1 / 0 / 5
Functions: 20.0% 1 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/CurveExponentialSkewNormal.hpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #ifndef MODEL_CURVEEXPONENTIALSKEWNORMAL_HPP
7 #define MODEL_CURVEEXPONENTIALSKEWNORMAL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Curve.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class CurveExponentialSkewNormal_Impl;
18
19 } // namespace detail
20
21 /** CurveExponentialSkewNormal is a Curve that wraps the OpenStudio IDD object
22 * 'OS:Curve:ExponentialSkewNormal'. The functional form is \f[\displaystyle f(x) = \frac{{e^{ - 0.5 \cdot {z_1}^2}} \cdot \left( {1 + \frac{z_2}{\left| {z_2} \right|} \cdot erf\left( {\frac{\left| {z_2} \right|}{\sqrt 2 }} \right)} \right)}{{e^{ - 0.5 \cdot {z_3}^2}} \cdot \left( {1 + \frac{z_3}{\left| {z_3} \right|} \cdot erf\left( \frac{\left| {z_3} \right|}{\sqrt 2 } \right)} \right)},\ \text{where}\ {z_1} = \frac{x - {c_1}}{c_2}, {z_2} = \frac{{e^{{c_3} \cdot x}} \cdot {c_4} \cdot x - {c_1}}{c_2},\ \text{and}\ {z_3} = \frac{-{c_1}}{c_2}\f] */
23 class MODEL_API CurveExponentialSkewNormal : public Curve
24 {
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28
29 /** Sets \f$c_1 = c_2 = c_4 = 1.0,\ c_3 = -1.0\f$, x within [-1.0,1.0]. */
30 explicit CurveExponentialSkewNormal(const Model& model);
31
32 49 virtual ~CurveExponentialSkewNormal() override = default;
33 // Default the copy and move operators because the virtual dtor is explicit
34 ✗ CurveExponentialSkewNormal(const CurveExponentialSkewNormal& other) = default;
35 ✗ CurveExponentialSkewNormal(CurveExponentialSkewNormal&& other) = default;
36 ✗ CurveExponentialSkewNormal& operator=(const CurveExponentialSkewNormal&) = default;
37 ✗ CurveExponentialSkewNormal& operator=(CurveExponentialSkewNormal&&) = default;
38
39 //@}
40
41 static IddObjectType iddObjectType();
42
43 static std::vector<std::string> validInputUnitTypeforxValues();
44
45 static std::vector<std::string> validOutputUnitTypeValues();
46
47 /** @name Getters */
48 //@{
49
50 double coefficient1C1() const;
51
52 double coefficient2C2() const;
53
54 double coefficient3C3() const;
55
56 double coefficient4C4() const;
57
58 double minimumValueofx() const;
59
60 double maximumValueofx() const;
61
62 boost::optional<double> minimumCurveOutput() const;
63
64 boost::optional<double> maximumCurveOutput() const;
65
66 std::string inputUnitTypeforx() const;
67
68 bool isInputUnitTypeforxDefaulted() const;
69
70 std::string outputUnitType() const;
71
72 bool isOutputUnitTypeDefaulted() const;
73
74 //@}
75 /** @name Setters */
76 //@{
77
78 bool setCoefficient1C1(double coefficient1C1);
79
80 bool setCoefficient2C2(double coefficient2C2);
81
82 bool setCoefficient3C3(double coefficient3C3);
83
84 bool setCoefficient4C4(double coefficient4C4);
85
86 bool setMinimumValueofx(double minimumValueofx);
87
88 bool setMaximumValueofx(double maximumValueofx);
89
90 bool setMinimumCurveOutput(double minimumCurveOutput);
91
92 void resetMinimumCurveOutput();
93
94 bool setMaximumCurveOutput(double maximumCurveOutput);
95
96 void resetMaximumCurveOutput();
97
98 bool setInputUnitTypeforx(const std::string& inputUnitTypeforx);
99
100 void resetInputUnitTypeforx();
101
102 bool setOutputUnitType(const std::string& outputUnitType);
103
104 void resetOutputUnitType();
105
106 //@}
107 /** @name Other */
108 //@{
109
110 //@}
111 protected:
112 /// @cond
113 using ImplType = detail::CurveExponentialSkewNormal_Impl;
114
115 explicit CurveExponentialSkewNormal(std::shared_ptr<detail::CurveExponentialSkewNormal_Impl> impl);
116
117 friend class detail::CurveExponentialSkewNormal_Impl;
118 friend class Model;
119 friend class IdfObject;
120 friend class openstudio::detail::IdfObject_Impl;
121
122 /// @endcond
123 private:
124 REGISTER_LOGGER("openstudio.model.CurveExponentialSkewNormal");
125 };
126
127 /** \relates CurveExponentialSkewNormal*/
128 using OptionalCurveExponentialSkewNormal = boost::optional<CurveExponentialSkewNormal>;
129
130 /** \relates CurveExponentialSkewNormal*/
131 using CurveExponentialSkewNormalVector = std::vector<CurveExponentialSkewNormal>;
132
133 } // namespace model
134 } // namespace openstudio
135
136 #endif // MODEL_CURVEEXPONENTIALSKEWNORMAL_HPP
137