GCC Code Coverage Report


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

src/model/CurveTriquadratic.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_CURVETRIQUADRATIC_HPP
7 #define MODEL_CURVETRIQUADRATIC_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Curve.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class CurveTriquadratic_Impl;
18
19 } // namespace detail
20
21 /** CurveTriquadratic is a Curve that wraps the OpenStudio IDD object 'OS:Curve:Triquadratic'. The
22 * functional form is
23 * \f[\displaystyle \begin{array}{ll}
24 f(x) = & c_1 + c_2 \cdot x^2 + c_3 \cdot x + c_4 \cdot y^2 + c_5 \cdot y + c_6 \cdot z^2 + c_7 \cdot z + c_8 \cdot x^2 \cdot y^2 + \\
25 & c_9 \cdot x \cdot y + c_{10} \cdot x \cdot y^2 + c_{11} \cdot x^2 \cdot y + c_{12} \cdot x^2 \cdot z^2 + c_{13} \cdot x \cdot z + c_{14} \cdot x \cdot z^2 + \\
26 & c_{15} \cdot x^2 \cdot z + c_{16} \cdot y^2 \cdot z^2 + c_{17} \cdot y \cdot z + c_{18} \cdot y \cdot z^2 + c_{19} \cdot y^2 \cdot z + \\
27 & c_{20} \cdot x^2 \cdot y^2 \cdot z^2 + c_{21} \cdot z^2 \cdot y^2 \cdot z + c_{22} \cdot x^2 \cdot y \cdot z^2 + c_{23} \cdot x \cdot y^2 \cdot z^2 + \\
28 & c_{24} \cdot x^2 \cdot y \cdot z + c_{25} \cdot x \cdot y^2 \cdot z + c_{26} \cdot x \cdot y \cdot z^2 + c_{27} \cdot x \cdot y \cdot z
29 \end{array}\f] */
30 class MODEL_API CurveTriquadratic : public Curve
31 {
32 public:
33 /** @name Constructors and Destructors */
34 //@{
35
36 explicit CurveTriquadratic(const Model& model);
37
38 34 virtual ~CurveTriquadratic() override = default;
39 // Default the copy and move operators because the virtual dtor is explicit
40 ✗ CurveTriquadratic(const CurveTriquadratic& other) = default;
41 4 CurveTriquadratic(CurveTriquadratic&& other) = default;
42 ✗ CurveTriquadratic& operator=(const CurveTriquadratic&) = default;
43 ✗ CurveTriquadratic& operator=(CurveTriquadratic&&) = default;
44
45 //@}
46
47 static IddObjectType iddObjectType();
48
49 static std::vector<std::string> validInputUnitTypeforXValues();
50
51 static std::vector<std::string> validInputUnitTypeforYValues();
52
53 static std::vector<std::string> validInputUnitTypeforZValues();
54
55 static std::vector<std::string> validOutputUnitTypeValues();
56
57 /** @name Getters */
58 //@{
59
60 // TODO: Instead of having optionals, we could just default them to zero...
61 boost::optional<double> coefficient1Constant() const;
62
63 boost::optional<double> coefficient2xPOW2() const;
64
65 boost::optional<double> coefficient3x() const;
66
67 boost::optional<double> coefficient4yPOW2() const;
68
69 boost::optional<double> coefficient5y() const;
70
71 boost::optional<double> coefficient6zPOW2() const;
72
73 boost::optional<double> coefficient7z() const;
74
75 boost::optional<double> coefficient8xPOW2TIMESYPOW2() const;
76
77 boost::optional<double> coefficient9xTIMESY() const;
78
79 boost::optional<double> coefficient10xTIMESYPOW2() const;
80
81 boost::optional<double> coefficient11xPOW2TIMESY() const;
82
83 boost::optional<double> coefficient12xPOW2TIMESZPOW2() const;
84
85 boost::optional<double> coefficient13xTIMESZ() const;
86
87 boost::optional<double> coefficient14xTIMESZPOW2() const;
88
89 boost::optional<double> coefficient15xPOW2TIMESZ() const;
90
91 boost::optional<double> coefficient16yPOW2TIMESZPOW2() const;
92
93 boost::optional<double> coefficient17yTIMESZ() const;
94
95 boost::optional<double> coefficient18yTIMESZPOW2() const;
96
97 boost::optional<double> coefficient19yPOW2TIMESZ() const;
98
99 boost::optional<double> coefficient20xPOW2TIMESYPOW2TIMESZPOW2() const;
100
101 boost::optional<double> coefficient21xPOW2TIMESYPOW2TIMESZ() const;
102
103 boost::optional<double> coefficient22xPOW2TIMESYTIMESZPOW2() const;
104
105 boost::optional<double> coefficient23xTIMESYPOW2TIMESZPOW2() const;
106
107 boost::optional<double> coefficient24xPOW2TIMESYTIMESZ() const;
108
109 boost::optional<double> coefficient25xTIMESYPOW2TIMESZ() const;
110
111 boost::optional<double> coefficient26xTIMESYTIMESZPOW2() const;
112
113 boost::optional<double> coefficient27xTIMESYTIMESZ() const;
114
115 boost::optional<double> minimumValueofx() const;
116
117 boost::optional<double> maximumValueofx() const;
118
119 boost::optional<double> minimumValueofy() const;
120
121 boost::optional<double> maximumValueofy() const;
122
123 boost::optional<double> minimumValueofz() const;
124
125 boost::optional<double> maximumValueofz() const;
126
127 boost::optional<double> minimumCurveOutput() const;
128
129 boost::optional<double> maximumCurveOutput() const;
130
131 std::string inputUnitTypeforX() const;
132
133 bool isInputUnitTypeforXDefaulted() const;
134
135 std::string inputUnitTypeforY() const;
136
137 bool isInputUnitTypeforYDefaulted() const;
138
139 std::string inputUnitTypeforZ() const;
140
141 bool isInputUnitTypeforZDefaulted() const;
142
143 std::string outputUnitType() const;
144
145 bool isOutputUnitTypeDefaulted() const;
146
147 //@}
148 /** @name Setters */
149 //@{
150
151 bool setCoefficient1Constant(double coefficient1Constant);
152
153 void resetCoefficient1Constant();
154
155 bool setCoefficient2xPOW2(double coefficient2xPOW2);
156
157 void resetCoefficient2xPOW2();
158
159 bool setCoefficient3x(double coefficient3x);
160
161 void resetCoefficient3x();
162
163 bool setCoefficient4yPOW2(double coefficient4yPOW2);
164
165 void resetCoefficient4yPOW2();
166
167 bool setCoefficient5y(double coefficient5y);
168
169 void resetCoefficient5y();
170
171 bool setCoefficient6zPOW2(double coefficient6zPOW2);
172
173 void resetCoefficient6zPOW2();
174
175 bool setCoefficient7z(double coefficient7z);
176
177 void resetCoefficient7z();
178
179 bool setCoefficient8xPOW2TIMESYPOW2(double coefficient8xPOW2TIMESYPOW2);
180
181 void resetCoefficient8xPOW2TIMESYPOW2();
182
183 bool setCoefficient9xTIMESY(double coefficient9xTIMESY);
184
185 void resetCoefficient9xTIMESY();
186
187 bool setCoefficient10xTIMESYPOW2(double coefficient10xTIMESYPOW2);
188
189 void resetCoefficient10xTIMESYPOW2();
190
191 bool setCoefficient11xPOW2TIMESY(double coefficient11xPOW2TIMESY);
192
193 void resetCoefficient11xPOW2TIMESY();
194
195 bool setCoefficient12xPOW2TIMESZPOW2(double coefficient12xPOW2TIMESZPOW2);
196
197 void resetCoefficient12xPOW2TIMESZPOW2();
198
199 bool setCoefficient13xTIMESZ(double coefficient13xTIMESZ);
200
201 void resetCoefficient13xTIMESZ();
202
203 bool setCoefficient14xTIMESZPOW2(double coefficient14xTIMESZPOW2);
204
205 void resetCoefficient14xTIMESZPOW2();
206
207 bool setCoefficient15xPOW2TIMESZ(double coefficient15xPOW2TIMESZ);
208
209 void resetCoefficient15xPOW2TIMESZ();
210
211 bool setCoefficient16yPOW2TIMESZPOW2(double coefficient16yPOW2TIMESZPOW2);
212
213 void resetCoefficient16yPOW2TIMESZPOW2();
214
215 bool setCoefficient17yTIMESZ(double coefficient17yTIMESZ);
216
217 void resetCoefficient17yTIMESZ();
218
219 bool setCoefficient18yTIMESZPOW2(double coefficient18yTIMESZPOW2);
220
221 void resetCoefficient18yTIMESZPOW2();
222
223 bool setCoefficient19yPOW2TIMESZ(double coefficient19yPOW2TIMESZ);
224
225 void resetCoefficient19yPOW2TIMESZ();
226
227 bool setCoefficient20xPOW2TIMESYPOW2TIMESZPOW2(double coefficient20xPOW2TIMESYPOW2TIMESZPOW2);
228
229 void resetCoefficient20xPOW2TIMESYPOW2TIMESZPOW2();
230
231 bool setCoefficient21xPOW2TIMESYPOW2TIMESZ(double coefficient21xPOW2TIMESYPOW2TIMESZ);
232
233 void resetCoefficient21xPOW2TIMESYPOW2TIMESZ();
234
235 bool setCoefficient22xPOW2TIMESYTIMESZPOW2(double coefficient22xPOW2TIMESYTIMESZPOW2);
236
237 void resetCoefficient22xPOW2TIMESYTIMESZPOW2();
238
239 bool setCoefficient23xTIMESYPOW2TIMESZPOW2(double coefficient23xTIMESYPOW2TIMESZPOW2);
240
241 void resetCoefficient23xTIMESYPOW2TIMESZPOW2();
242
243 bool setCoefficient24xPOW2TIMESYTIMESZ(double coefficient24xPOW2TIMESYTIMESZ);
244
245 void resetCoefficient24xPOW2TIMESYTIMESZ();
246
247 bool setCoefficient25xTIMESYPOW2TIMESZ(double coefficient25xTIMESYPOW2TIMESZ);
248
249 void resetCoefficient25xTIMESYPOW2TIMESZ();
250
251 bool setCoefficient26xTIMESYTIMESZPOW2(double coefficient26xTIMESYTIMESZPOW2);
252
253 void resetCoefficient26xTIMESYTIMESZPOW2();
254
255 bool setCoefficient27xTIMESYTIMESZ(double coefficient27xTIMESYTIMESZ);
256
257 void resetCoefficient27xTIMESYTIMESZ();
258
259 bool setMinimumValueofx(double minimumValueofx);
260
261 void resetMinimumValueofx();
262
263 bool setMaximumValueofx(double maximumValueofx);
264
265 void resetMaximumValueofx();
266
267 bool setMinimumValueofy(double minimumValueofy);
268
269 void resetMinimumValueofy();
270
271 bool setMaximumValueofy(double maximumValueofy);
272
273 void resetMaximumValueofy();
274
275 bool setMinimumValueofz(double minimumValueofz);
276
277 void resetMinimumValueofz();
278
279 bool setMaximumValueofz(double maximumValueofz);
280
281 void resetMaximumValueofz();
282
283 bool setMinimumCurveOutput(double minimumCurveOutput);
284
285 void resetMinimumCurveOutput();
286
287 bool setMaximumCurveOutput(double maximumCurveOutput);
288
289 void resetMaximumCurveOutput();
290
291 bool setInputUnitTypeforX(const std::string& inputUnitTypeforX);
292
293 void resetInputUnitTypeforX();
294
295 bool setInputUnitTypeforY(const std::string& inputUnitTypeforY);
296
297 void resetInputUnitTypeforY();
298
299 bool setInputUnitTypeforZ(const std::string& inputUnitTypeforZ);
300
301 void resetInputUnitTypeforZ();
302
303 bool setOutputUnitType(const std::string& outputUnitType);
304
305 void resetOutputUnitType();
306
307 //@}
308 /** @name Other */
309 //@{
310
311 //@}
312 protected:
313 /// @cond
314 using ImplType = detail::CurveTriquadratic_Impl;
315
316 explicit CurveTriquadratic(std::shared_ptr<detail::CurveTriquadratic_Impl> impl);
317
318 friend class detail::CurveTriquadratic_Impl;
319 friend class Model;
320 friend class IdfObject;
321 friend class openstudio::detail::IdfObject_Impl;
322
323 /// @endcond
324 private:
325 REGISTER_LOGGER("openstudio.model.CurveTriquadratic");
326 };
327
328 /** \relates CurveTriquadratic*/
329 using OptionalCurveTriquadratic = boost::optional<CurveTriquadratic>;
330
331 /** \relates CurveTriquadratic*/
332 using CurveTriquadraticVector = std::vector<CurveTriquadratic>;
333
334 } // namespace model
335 } // namespace openstudio
336
337 #endif // MODEL_CURVETRIQUADRATIC_HPP
338