GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 67.5% 135 / 0 / 200
Functions: 80.0% 16 / 0 / 20
Branches: 58.6% 140 / 0 / 239

src/airflow/contam/PrjModelImpl.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 AIRFLOW_CONTAM_PRJMODELIMPL_HPP
7 #define AIRFLOW_CONTAM_PRJMODELIMPL_HPP
8
9 #include "PrjDefines.hpp"
10 #include "PrjReader.hpp"
11 #include "PrjObjects.hpp"
12 #include "PrjAirflowElements.hpp"
13
14 #include "../../utilities/core/Path.hpp"
15 #include "../../utilities/data/TimeSeries.hpp"
16
17 #include "../AirflowAPI.hpp"
18
19 namespace openstudio {
20 namespace contam {
21
22 class SimFile;
23
24 namespace detail {
25
26 class IndexModelImpl
27 {
28 public:
29 IndexModelImpl();
30 explicit IndexModelImpl(openstudio::path path);
31 explicit IndexModelImpl(std::string filename);
32 explicit IndexModelImpl(Reader& input);
33 bool read(openstudio::path path);
34 bool read(std::string filename);
35 bool read(Reader& input);
36 std::string toString();
37
38 /** Returns the program name, should be "ContamW". */
39 std::string programName() const;
40 /** Sets the program name. */
41 void setProgramName(const std::string& name);
42 /** Returns the CONTAM version. */
43 std::string version() const;
44 /** Sets the CONTAM version. */
45 void setVersion(const std::string& version);
46 /** Returns the input echo flag: 0 - no echo, 1 - echo input files to the log file. */
47 int echo() const;
48 /** Sets the input echo flag: 0 - no echo, 1 - echo input files to the log file. */
49 void setEcho(const int echo);
50 /** Returns the project description. */
51 std::string desc() const;
52 /** Sets the project description. */
53 void setDesc(const std::string& prjdesc);
54 /** Returns the SketchPad height [cells]. */
55 int skheight() const;
56 /** Sets the SketchPad height [cells]. */
57 void setSkheight(const int skheight);
58 /** Returns the SketchPad width [cells]. */
59 int skwidth() const;
60 /** Sets the SketchPad width [cells]. */
61 void setSkwidth(const int skwidth);
62 /** Returns the default display units: 0 = SI, 1 = US. */
63 int def_units() const;
64 /** Sets the default display units: 0 = SI, 1 = US. */
65 void setDef_units(const int def_units);
66 /** Returns the default flows: 0 = mass, 1 = volume. */
67 int def_flows() const;
68 /** Sets the default flows: 0 = mass, 1 = volume. */
69 void setDef_flows(const int def_flows);
70 /** Returns the default temperature for zones [K]. */
71 double def_T() const;
72 /** Sets the default temperature for zones [K]. */
73 bool setDef_T(const double def_T);
74 /** Sets the default temperature for zones [K]. */
75 bool setDef_T(const std::string& def_T);
76 /** Returns the display units for temperature. */
77 int udefT() const;
78 /** Sets the display units for temperature. */
79 void setUdefT(const int udefT);
80 /** Returns the angle to true north [degrees]. */
81 double rel_N() const;
82 /** Sets the angle to true north [degrees]. */
83 bool setRel_N(const double rel_N);
84 /** Sets the angle to true north [degrees]. */
85 bool setRel_N(const std::string& rel_N);
86 /** Returns the elevation for reference wind speed [m]. */
87 double wind_H() const;
88 /** Sets the elevation for reference wind speed [m]. */
89 bool setWind_H(const double wind_H);
90 /** Sets the elevation for reference wind speed [m]. */
91 bool setWind_H(const std::string& wind_H);
92 /** Returns the display units for elevation for reference wind speed. */
93 int uwH() const;
94 /** Sets the display units for elevation for reference wind speed. */
95 void setUwH(const int uwH);
96 /** Returns the local terrain constant for wind. */
97 double wind_Ao() const;
98 /** Sets the local terrain constant for wind. */
99 bool setWind_Ao(const double wind_Ao);
100 /** Sets the local terrain constant for wind. */
101 bool setWind_Ao(const std::string& wind_Ao);
102 /** Returns the velocity profile exponent for wind. */
103 double wind_a() const;
104 /** Sets the velocity profile exponent for wind. */
105 bool setWind_a(const double wind_a);
106 /** Sets the velocity profile exponent for wind. */
107 bool setWind_a(const std::string& wind_a); /** Returns the cell scaling factor. */
108 double scale() const;
109 /** Sets the cell scaling factor. */
110 bool setScale(const double scale);
111 /** Sets the cell scaling factor. */
112 bool setScale(const std::string& scale);
113 /** Returns the units of scaling factor: 0 = m, 1 = ft. */
114 int uScale() const;
115 /** Sets the units of scaling factor: 0 = m, 1 = ft. */
116 void setUScale(const int uScale);
117 /** Returns the row of the origin. */
118 int orgRow() const;
119 /** Sets the row of the origin. */
120 void setOrgRow(const int orgRow);
121 /** Returns the column of the origin. */
122 int orgCol() const;
123 /** Sets the column of the origin. */
124 void setOrgCol(const int orgCol);
125 /** Returns the y-axis inversion flag: 0 = positive above origin, 1 = negative above origin. */
126 int invYaxis() const;
127 /** Sets the y-axis inversion flag: 0 = positive above origin, 1 = negative above origin. */
128 void setInvYaxis(const int invYaxis);
129 /** Returns the pseudo-geometry display flag: 0 = don't show, 1 = show in status bar. */
130 int showGeom() const;
131 /** Sets the pseudo-geometry display flag: 0 = don't show, 1 = show in status bar. */
132 void setShowGeom(const int showGeom);
133 /** Returns the weather data for steady-state simulation. */
134 WeatherData ssWeather() const;
135 /** Sets the weather data for steady-state simulation. */
136 void setSsWeather(const WeatherData& ssWeather);
137 /** Returns the weather data the wind pressure test. */
138 WeatherData wptWeather() const;
139 /** Sets the weather data the wind pressure test. */
140 void setWptWeather(const WeatherData& wptWeather);
141 /** Returns the full name of weather file. */
142 std::string WTHpath() const;
143 /** Sets the full name of weather file. */
144 void setWTHpath(const std::string& WTHpath);
145 /** Returns the full name of contaminant file. */
146 std::string CTMpath() const;
147 /** Sets the full name of contaminant file. */
148 void setCTMpath(const std::string& CTMpath);
149 /** Returns the full name of continuous values file. */
150 std::string CVFpath() const;
151 /** Sets the full name of continuous values file. */
152 void setCVFpath(const std::string& CVFpath);
153 /** Returns the full name of discrete values file. */
154 std::string DVFpath() const;
155 /** Sets the full name of discrete values file. */
156 void setDVFpath(const std::string& DVFpath);
157 /** Returns the full name of WPC file. */
158 std::string WPCfile() const;
159 /** Sets the full name of WPC file. */
160 void setWPCfile(const std::string& WPCfile);
161 /** Returns the full name of EWC data source file. */
162 std::string EWCfile() const;
163 /** Sets the full name of EWC data source file. */
164 void setEWCfile(const std::string& EWCfile);
165 /** Returns the WPC description. */
166 std::string WPCdesc() const;
167 /** Sets the WPC description. */
168 void setWPCdesc(const std::string& WPCdesc);
169 /** Returns the X-value of ContamW origin in EWC coordinates [m]. */
170 double X0() const;
171 /** Sets the X-value of ContamW origin in EWC coordinates [m]. */
172 bool setX0(const double X0);
173 /** Sets the X-value of ContamW origin in EWC coordinates [m]. */
174 bool setX0(const std::string& X0);
175 /** Returns the Y-value of ContamW origin in EWC coordinates [m]. */
176 double Y0() const;
177 /** Sets the Y-value of ContamW origin in EWC coordinates [m]. */
178 bool setY0(const double Y0);
179 /** Sets the Y-value of ContamW origin in EWC coordinates [m]. */
180 bool setY0(const std::string& Y0);
181 /** Returns the Z-value of ContamW origin in EWC coordinates [m]. */
182 double Z0() const;
183 /** Sets the Z-value of ContamW origin in EWC coordinates [m]. */
184 bool setZ0(const double Z0);
185 /** Sets the Z-value of ContamW origin in EWC coordinates [m]. */
186 bool setZ0(const std::string& Z0);
187 /** Returns the rotation of ContamW relative to EWC coordinates. */
188 double angle() const;
189 /** Sets the rotation of ContamW relative to EWC coordinates. */
190 bool setAngle(const double angle);
191 /** Sets the rotation of ContamW relative to EWC coordinates. */
192 bool setAngle(const std::string& angle);
193 /** Returns the units of coordinates. */
194 int u_XYZ() const;
195 /** Sets the units of coordinates. */
196 void setU_XYZ(const int u_XYZ);
197 /** Returns the tolerance for matching path locations. */
198 double epsPath() const;
199 /** Sets the tolerance for matching path locations. */
200 bool setEpsPath(const double epsPath);
201 /** Sets the tolerance for matching path locations. */
202 bool setEpsPath(const std::string& epsPath);
203 /** Returns the tolerance for matching species. */
204 double epsSpcs() const;
205 /** Sets the tolerance for matching species. */
206 bool setEpsSpcs(const double epsSpcs);
207 /** Sets the tolerance for matching species. */
208 bool setEpsSpcs(const std::string& epsSpcs);
209 /** Returns the time shift of EWC data [hh:mm:ss]. */
210 std::string tShift() const;
211 /** Sets the time shift of EWC data [hh:mm:ss]. */
212 void setTShift(const std::string& tShift);
213 /** Returns the date WPC data starts [mm/dd]. */
214 std::string dStart() const;
215 /** Sets the date WPC data starts [mm/dd]. */
216 void setDStart(const std::string& dStart);
217 /** Returns the date WPC data ends [mm/dd]. */
218 std::string dEnd() const;
219 /** Sets the date WPC data ends [mm/dd]. */
220 void setDEnd(const std::string& dEnd);
221 /** Returns the WPC file wind pressure flag: 0 = don't use, 1 = use. */
222 int useWPCwp() const;
223 /** Sets the WPC file wind pressure flag: 0 = don't use, 1 = use. */
224 void setUseWPCwp(const int useWPCwp);
225 /** Returns the WPC file mass fraction flag: 0 = don't use, 1 = use. */
226 int useWPCmf() const;
227 /** Sets the WPC file mass fraction flag: 0 = don't use, 1 = use. */
228 void setUseWPCmf(const int useWPCmf);
229 /** Returns the WPC trigger flag: 0 = don't trigger, 1 = trigger airflow calculation by WPC data. */
230 int wpctrig() const;
231 /** Setss the WPC trigger flag: 0 = don't trigger, 1 = trigger airflow calculation by WPC data. */
232 void setWpctrig(const int wpctrig);
233 /** Returns the latitude (degrees: north +, south -). */
234 double latd() const;
235 /** Sets the latitude (degrees: north +, south -). */
236 bool setLatd(const double latd);
237 /** Sets the latitude (degrees: north +, south -). */
238 bool setLatd(const std::string& latd);
239 /** Returns the longitude (degrees: east +, west -). */
240 double lgtd() const;
241 /** Sets the longitude (degrees: east +, west -). */
242 bool setLgtd(const double lgtd);
243 /** Sets the longitude (degrees: east +, west -). */
244 bool setLgtd(const std::string& lgtd);
245 /** Returns the time zone (Greenwich = 0, Eastern = -5, etc.). */
246 double Tznr() const;
247 /** Sets the time zone (Greenwich = 0, Eastern = -5, etc.). */
248 bool setTznr(const double Tznr);
249 /** Sets the time zone (Greenwich = 0, Eastern = -5, etc.). */
250 bool setTznr(const std::string& Tznr);
251 /** Returns the elevation above sea level [m]. */
252 double altd() const;
253 /** Sets the elevation above sea level [m]. */
254 bool setAltd(const double altd);
255 /** Sets the elevation above sea level [m]. */
256 bool setAltd(const std::string& altd);
257 /** Returns the ground temperature [K]. */
258 double Tgrnd() const;
259 /** Sets the ground temperature [K]. */
260 bool setTgrnd(const double Tgrnd);
261 /** Sets the ground temperature [K]. */
262 bool setTgrnd(const std::string& Tgrnd);
263 /** Returns the display units for ground temperatures. */
264 int utg() const;
265 /** Sets the display units for ground temperatures. */
266 void setUtg(const int utg);
267 /** Returns the display units for elevation. */
268 int u_a() const;
269 /** Sets the display units for elevation. */
270 void setU_a(const int u_a);
271
272 RunControl rc() const;
273 void setRc(const RunControl& rc);
274
275 std::vector<int> contaminants();
276 std::vector<Species> species() const;
277 void setSpecies(const std::vector<Species>& species);
278 void addSpecies(Species& species);
279 bool removeSpecies(const Species& species);
280
281 std::vector<Level> levels() const;
282 void setLevels(const std::vector<Level>& levels);
283 void addLevel(Level& level);
284
285 std::vector<DaySchedule> daySchedules() const;
286 void setDaySchedules(const std::vector<DaySchedule>& daySchedules);
287
288 std::vector<WeekSchedule> weekSchedules() const;
289 void setWeekSchedules(const std::vector<WeekSchedule>& weekSchedules);
290
291 std::vector<WindPressureProfile> windPressureProfiles() const;
292 void setWindPressureProfiles(const std::vector<WindPressureProfile>& windPressureProfiles);
293
294 template <class T>
295 6 std::vector<T> getAirflowElements() {
296 6 std::vector<T> afe;
297
4/6
std::vector<openstudio::contam::PlrLeak2, std::allocator<openstudio::contam::PlrLeak2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrLeak2>():
✓ Branch 5 taken 6 times.
✓ Branch 6 taken 2 times.
std::vector<openstudio::contam::PlrTest1, std::allocator<openstudio::contam::PlrTest1> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest1>():
✓ Branch 5 taken 9 times.
✓ Branch 6 taken 4 times.
std::vector<openstudio::contam::PlrTest2, std::allocator<openstudio::contam::PlrTest2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest2>():
✗ Branch 5 not taken.
✗ Branch 6 not taken.
21 for (const std::shared_ptr<AirflowElement>& el : m_airflowElements) {
298
2/6
std::vector<openstudio::contam::PlrLeak2, std::allocator<openstudio::contam::PlrLeak2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrLeak2>():
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
std::vector<openstudio::contam::PlrTest1, std::allocator<openstudio::contam::PlrTest1> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest1>():
✓ Branch 1 taken 9 times.
✗ Branch 2 not taken.
std::vector<openstudio::contam::PlrTest2, std::allocator<openstudio::contam::PlrTest2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest2>():
✗ Branch 1 not taken.
✗ Branch 2 not taken.
15 if (el.get()) {
299
2/6
std::vector<openstudio::contam::PlrLeak2, std::allocator<openstudio::contam::PlrLeak2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrLeak2>():
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
std::vector<openstudio::contam::PlrTest1, std::allocator<openstudio::contam::PlrTest1> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest1>():
✓ Branch 1 taken 9 times.
✗ Branch 2 not taken.
std::vector<openstudio::contam::PlrTest2, std::allocator<openstudio::contam::PlrTest2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest2>():
✗ Branch 1 not taken.
✗ Branch 2 not taken.
15 T* derived = dynamic_cast<T*>(el.get());
300
4/6
std::vector<openstudio::contam::PlrLeak2, std::allocator<openstudio::contam::PlrLeak2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrLeak2>():
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 4 times.
std::vector<openstudio::contam::PlrTest1, std::allocator<openstudio::contam::PlrTest1> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest1>():
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 3 times.
std::vector<openstudio::contam::PlrTest2, std::allocator<openstudio::contam::PlrTest2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest2>():
✗ Branch 0 not taken.
✗ Branch 1 not taken.
15 if (derived) {
301
2/3
std::vector<openstudio::contam::PlrLeak2, std::allocator<openstudio::contam::PlrLeak2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrLeak2>():
✓ Branch 1 taken 2 times.
std::vector<openstudio::contam::PlrTest1, std::allocator<openstudio::contam::PlrTest1> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest1>():
✓ Branch 1 taken 6 times.
std::vector<openstudio::contam::PlrTest2, std::allocator<openstudio::contam::PlrTest2> > openstudio::contam::detail::IndexModelImpl::getAirflowElements<openstudio::contam::PlrTest2>():
✗ Branch 1 not taken.
8 afe.push_back(*derived);
302 }
303 }
304 }
305 6 return afe;
306 ✗ }
307
308 template <class T>
309 3 bool addAirflowElement(T element) {
310
2/6
bool openstudio::contam::detail::IndexModelImpl::addAirflowElement<openstudio::contam::PlrLeak2>(openstudio::contam::PlrLeak2):
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
bool openstudio::contam::detail::IndexModelImpl::addAirflowElement<openstudio::contam::PlrTest1>(openstudio::contam::PlrTest1):
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
3 auto copy = new T;
311 3 *copy = element;
312 3 auto* pointer = dynamic_cast<AirflowElement*>(copy);
313
2/4
bool openstudio::contam::detail::IndexModelImpl::addAirflowElement<openstudio::contam::PlrLeak2>(openstudio::contam::PlrLeak2):
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
bool openstudio::contam::detail::IndexModelImpl::addAirflowElement<openstudio::contam::PlrTest1>(openstudio::contam::PlrTest1):
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
3 if (pointer) {
314 3 copy->setNr(m_airflowElements.size() + 1);
315
4/4
bool openstudio::contam::detail::IndexModelImpl::addAirflowElement<openstudio::contam::PlrLeak2>(openstudio::contam::PlrLeak2):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
bool openstudio::contam::detail::IndexModelImpl::addAirflowElement<openstudio::contam::PlrTest1>(openstudio::contam::PlrTest1):
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
3 m_airflowElements.push_back(std::shared_ptr<AirflowElement>(pointer));
316 3 return true;
317 }
318 ✗ return false;
319 }
320
321 int airflowElementNrByName(std::string name) const;
322
323 template <class T>
324 ✗ bool replaceAirflowElement(int nr, T element) {
325 ✗ if (nr > 0 && (unsigned)nr <= m_airflowElements.size()) {
326 ✗ auto copy = new T;
327 ✗ *copy = element;
328 ✗ auto* pointer = dynamic_cast<AirflowElement*>(copy);
329 ✗ if (pointer) {
330 ✗ copy->setNr(nr);
331 //m_airflowElements.replace(nr - 1, std::shared_ptr<AirflowElement>(pointer));
332 ✗ return true;
333 }
334 }
335 ✗ return false;
336 }
337
338 template <class T>
339 ✗ std::vector<T> getControlNodes() {
340 ✗ std::vector<T> nodes;
341 ✗ for (const std::shared_ptr<ControlNode>& el : m_controlNodes) {
342 ✗ if (el.get()) {
343 ✗ T* derived = dynamic_cast<T*>(el.get());
344 ✗ if (derived) {
345 ✗ nodes.push_back(*derived);
346 }
347 }
348 }
349 ✗ return nodes;
350 ✗ }
351
352 template <class T>
353 ✗ bool addControlNode(T element, bool sequence = true) {
354 ✗ auto copy = new T;
355 ✗ *copy = element;
356 ✗ auto* pointer = dynamic_cast<ControlNode*>(copy);
357 ✗ if (pointer) {
358 ✗ copy->setNr(m_controlNodes.size() + 1);
359 ✗ if (sequence) {
360 ✗ copy->setSeqnr(copy->nr());
361 }
362 ✗ m_controlNodes.push_back(std::shared_ptr<ControlNode>(pointer));
363 ✗ return true;
364 }
365 ✗ return false;
366 }
367
368 std::vector<Ahs> ahs() const;
369 void setAhs(const std::vector<Ahs>& ahs);
370 void addAhs(Ahs& ahs);
371
372 std::vector<Zone> zones() const;
373 void setZones(const std::vector<Zone>& zones);
374 void addZone(Zone& zone);
375
376 std::vector<AirflowPath> airflowPaths() const;
377 void setAirflowPaths(const std::vector<AirflowPath>& paths);
378 void addAirflowPath(AirflowPath& path);
379
380 bool valid() const;
381
382 std::vector<std::vector<int>> zoneExteriorFlowPaths();
383 std::vector<TimeSeries> zoneInfiltration(SimFile* sim);
384 std::vector<TimeSeries> pathInfiltration(std::vector<int> pathNrs, SimFile* sim);
385
386 private:
387 void setDefaults();
388 void readZoneIc(Reader& input);
389 std::string writeZoneIc(int start = 0);
390 template <class T>
391 std::string writeSectionVector(std::vector<T> vector, std::string label = std::string(), int start = 0);
392 template <class T>
393 std::string writeSectionVector(std::vector<std::shared_ptr<T>> vector, std::string label = std::string(), int start = 0);
394 template <class T>
395 std::string writeArray(std::vector<T> vector, std::string label = std::string(), int start = 0);
396 template <class T>
397 void renumberVector(std::vector<T>& vector);
398
399 bool m_valid;
400
401 std::map<std::string, std::string> m_unsupported;
402
403 std::string m_programName; // program name "ContamW" (I1)
404 std::string m_programVersion; // program version "3.1" (I1)
405 int m_echo; // (0/1) echo input files to the log file (I2)
406 std::string m_desc; // project description (I1) {W}
407 int m_skheight; // total SketchPad height [cells] (I2) {W}
408 int m_skwidth; // total SketchPad width [cells] (I2) {W}
409 int m_def_units; // default units: 0 = SI, 1 = US (I2) {W}
410 int m_def_flows; // default flows: 0 = mass, 1 = volume (I2) {W}
411 PRJFLOAT m_def_T; // default temperature for zones [K] (R4) {W}
412 int m_udefT; // units for temperature (I2) {W}
413 PRJFLOAT m_rel_N; // angle to true north [degrees] (R4) {W}
414 PRJFLOAT m_wind_H; // elevation for reference wind speed [m] (R4) {W}
415 int m_uwH; // units for _wind_H (I2) {W}
416 PRJFLOAT m_wind_Ao; // local terrain constant (R4) {W}
417 PRJFLOAT m_wind_a; // velocity profile exponent (R4) {W}
418 PRJFLOAT m_scale; // cell scaling factor (R4)
419 int m_uScale; // units of scaling factor: 0 = m, 1 = ft (I2)
420 int m_orgRow; // row of origin (I2)
421 int m_orgCol; // column of origin (I2)
422 int m_invYaxis; // 0 = positive above origin, 1 = negative above origin (I2)
423 int m_showGeom; // 0/1 = show pseudo-geometry info in status bar (I2)
424 WeatherData m_ssWeather; // weather data for steady-state simulation (WeatherData)
425 WeatherData m_wptWeather; // weather data the wind pressure test (WeatherData)
426 std::string m_WTHpath; // full name of weather file (CS)
427 std::string m_CTMpath; // full name of contaminant file (CS)
428 std::string m_CVFpath; // full name of continuous values file (CS)
429 std::string m_DVFpath; // full name of discrete values file (CS)
430 std::string m_WPCfile; // full name of WPC file (CS)
431 std::string m_EWCfile; // full name of EWC data source file (CS) {W}
432 std::string m_WPCdesc; // WPC description (CS) {W}
433 PRJFLOAT m_X0; // X-value of ContamW origin in EWC coordinates [m] (R4) {W}
434 PRJFLOAT m_Y0; // Y-value of ContamW origin in EWC coordinates [m] (R4) {W}
435 PRJFLOAT m_Z0; // Z-value of ContamW origin in EWC coordinates [m] (R4) {W}
436 PRJFLOAT m_angle; // Rotation of ContamW relative to EWC coordinates (R4) {W}
437 int m_u_XYZ; // units of coordinates (I2) {W}
438 PRJFLOAT m_epsPath; // tolerance for matching path locations [-] (R4) {W}
439 PRJFLOAT m_epsSpcs; // tolerance for matching species [-] (R4) {W}
440 std::string m_tShift; // time shift of EWC data {W} [s] (hh:mm:ss) {W}
441 std::string m_dStart; // date WPC data starts (mm/dd) {W}
442 std::string m_dEnd; // date WPC data ends (mm/dd) {W}
443 int m_useWPCwp; // if true, use WPC file wind pressures (I2)
444 int m_useWPCmf; // if true, use WPC file mass fractions (I2)
445 int m_wpctrig; // 0/1 = trigger airflow calculation by WPC data (I2)
446 PRJFLOAT m_latd; // latitude (degrees: north +, south -) (R4)
447 PRJFLOAT m_lgtd; // longitude (degrees: east +, west -) (R4)
448 PRJFLOAT m_Tznr; // time zone (Greenwich = 0, Eastern = -5, etc.) (R4)
449 PRJFLOAT m_altd; // elevation above sea level [m] (R4)
450 PRJFLOAT m_Tgrnd; // ground temperature [K] (R4)
451 int m_utg; // units for ground temperatures (I2)
452 int m_u_a; // units for elevation (I2)
453
454 RunControl m_rc;
455 //std::vector<int> m_contaminants;
456 std::vector<Species> m_species;
457 std::vector<Level> m_levels;
458 std::vector<DaySchedule> m_daySchedules;
459 std::vector<WeekSchedule> m_weekSchedules;
460 std::vector<WindPressureProfile> m_windPressureProfiles;
461 std::vector<std::shared_ptr<AirflowElement>> m_airflowElements;
462 std::vector<std::shared_ptr<ControlNode>> m_controlNodes;
463 std::vector<Ahs> m_ahs;
464 std::vector<Zone> m_zones;
465 std::vector<AirflowPath> m_paths;
466 };
467
468 template <class T>
469 8 std::string IndexModelImpl::writeSectionVector(std::vector<T> vector, std::string label, int start) {
470 8 std::string string;
471 8 int number = vector.size() - start;
472
8/16
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Ahs>(std::vector<openstudio::contam::Ahs, std::allocator<openstudio::contam::Ahs> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowPath>(std::vector<openstudio::contam::AirflowPath, std::allocator<openstudio::contam::AirflowPath> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::DaySchedule>(std::vector<openstudio::contam::DaySchedule, std::allocator<openstudio::contam::DaySchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Level>(std::vector<openstudio::contam::Level, std::allocator<openstudio::contam::Level> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Species>(std::vector<openstudio::contam::Species, std::allocator<openstudio::contam::Species> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WeekSchedule>(std::vector<openstudio::contam::WeekSchedule, std::allocator<openstudio::contam::WeekSchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WindPressureProfile>(std::vector<openstudio::contam::WindPressureProfile, std::allocator<openstudio::contam::WindPressureProfile> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Zone>(std::vector<openstudio::contam::Zone, std::allocator<openstudio::contam::Zone> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
8 if (label.empty()) {
473 ✗ string += openstudio::toString(number) + '\n';
474 } else {
475
40/40
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Ahs>(std::vector<openstudio::contam::Ahs, std::allocator<openstudio::contam::Ahs> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowPath>(std::vector<openstudio::contam::AirflowPath, std::allocator<openstudio::contam::AirflowPath> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::DaySchedule>(std::vector<openstudio::contam::DaySchedule, std::allocator<openstudio::contam::DaySchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Level>(std::vector<openstudio::contam::Level, std::allocator<openstudio::contam::Level> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Species>(std::vector<openstudio::contam::Species, std::allocator<openstudio::contam::Species> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WeekSchedule>(std::vector<openstudio::contam::WeekSchedule, std::allocator<openstudio::contam::WeekSchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WindPressureProfile>(std::vector<openstudio::contam::WindPressureProfile, std::allocator<openstudio::contam::WindPressureProfile> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Zone>(std::vector<openstudio::contam::Zone, std::allocator<openstudio::contam::Zone> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
8 string += openstudio::toString(number) + " ! " + label + '\n';
476 }
477
16/16
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Ahs>(std::vector<openstudio::contam::Ahs, std::allocator<openstudio::contam::Ahs> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowPath>(std::vector<openstudio::contam::AirflowPath, std::allocator<openstudio::contam::AirflowPath> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 17 times.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::DaySchedule>(std::vector<openstudio::contam::DaySchedule, std::allocator<openstudio::contam::DaySchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 21 times.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Level>(std::vector<openstudio::contam::Level, std::allocator<openstudio::contam::Level> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Species>(std::vector<openstudio::contam::Species, std::allocator<openstudio::contam::Species> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WeekSchedule>(std::vector<openstudio::contam::WeekSchedule, std::allocator<openstudio::contam::WeekSchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 21 times.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WindPressureProfile>(std::vector<openstudio::contam::WindPressureProfile, std::allocator<openstudio::contam::WindPressureProfile> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 5 times.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Zone>(std::vector<openstudio::contam::Zone, std::allocator<openstudio::contam::Zone> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 1 time.
79 for (unsigned int i = start; i < vector.size(); i++) {
478
16/16
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Ahs>(std::vector<openstudio::contam::Ahs, std::allocator<openstudio::contam::Ahs> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 1 time.
✓ Branch 5 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowPath>(std::vector<openstudio::contam::AirflowPath, std::allocator<openstudio::contam::AirflowPath> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 17 times.
✓ Branch 5 taken 17 times.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::DaySchedule>(std::vector<openstudio::contam::DaySchedule, std::allocator<openstudio::contam::DaySchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 21 times.
✓ Branch 5 taken 21 times.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Level>(std::vector<openstudio::contam::Level, std::allocator<openstudio::contam::Level> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 1 time.
✓ Branch 5 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Species>(std::vector<openstudio::contam::Species, std::allocator<openstudio::contam::Species> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 2 times.
✓ Branch 5 taken 2 times.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WeekSchedule>(std::vector<openstudio::contam::WeekSchedule, std::allocator<openstudio::contam::WeekSchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 21 times.
✓ Branch 5 taken 21 times.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WindPressureProfile>(std::vector<openstudio::contam::WindPressureProfile, std::allocator<openstudio::contam::WindPressureProfile> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 5 times.
✓ Branch 5 taken 5 times.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Zone>(std::vector<openstudio::contam::Zone, std::allocator<openstudio::contam::Zone> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 2 taken 3 times.
✓ Branch 5 taken 3 times.
71 string += vector[i].write();
479 }
480
8/8
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Ahs>(std::vector<openstudio::contam::Ahs, std::allocator<openstudio::contam::Ahs> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowPath>(std::vector<openstudio::contam::AirflowPath, std::allocator<openstudio::contam::AirflowPath> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::DaySchedule>(std::vector<openstudio::contam::DaySchedule, std::allocator<openstudio::contam::DaySchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Level>(std::vector<openstudio::contam::Level, std::allocator<openstudio::contam::Level> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Species>(std::vector<openstudio::contam::Species, std::allocator<openstudio::contam::Species> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WeekSchedule>(std::vector<openstudio::contam::WeekSchedule, std::allocator<openstudio::contam::WeekSchedule> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::WindPressureProfile>(std::vector<openstudio::contam::WindPressureProfile, std::allocator<openstudio::contam::WindPressureProfile> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::Zone>(std::vector<openstudio::contam::Zone, std::allocator<openstudio::contam::Zone> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
8 string += "-999\n";
481 8 return string;
482 ✗ }
483
484 template <class T>
485 2 std::string IndexModelImpl::writeSectionVector(std::vector<std::shared_ptr<T>> vector, std::string label, int start) {
486 2 std::string string;
487 2 int number = vector.size() - start;
488
2/4
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowElement>(std::vector<std::shared_ptr<openstudio::contam::AirflowElement>, std::allocator<std::shared_ptr<openstudio::contam::AirflowElement> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::ControlNode>(std::vector<std::shared_ptr<openstudio::contam::ControlNode>, std::allocator<std::shared_ptr<openstudio::contam::ControlNode> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
2 if (label.empty()) {
489 ✗ string += openstudio::toString(number) + '\n';
490 } else {
491
10/10
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowElement>(std::vector<std::shared_ptr<openstudio::contam::AirflowElement>, std::allocator<std::shared_ptr<openstudio::contam::AirflowElement> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::ControlNode>(std::vector<std::shared_ptr<openstudio::contam::ControlNode>, std::allocator<std::shared_ptr<openstudio::contam::ControlNode> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
2 string += openstudio::toString(number) + " ! " + label + '\n';
492 }
493
3/4
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowElement>(std::vector<std::shared_ptr<openstudio::contam::AirflowElement>, std::allocator<std::shared_ptr<openstudio::contam::AirflowElement> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 21 times.
✓ Branch 2 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::ControlNode>(std::vector<std::shared_ptr<openstudio::contam::ControlNode>, std::allocator<std::shared_ptr<openstudio::contam::ControlNode> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
23 for (unsigned int i = start; i < vector.size(); i++) {
494
2/4
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowElement>(std::vector<std::shared_ptr<openstudio::contam::AirflowElement>, std::allocator<std::shared_ptr<openstudio::contam::AirflowElement> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 3 taken 21 times.
✓ Branch 6 taken 21 times.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::ControlNode>(std::vector<std::shared_ptr<openstudio::contam::ControlNode>, std::allocator<std::shared_ptr<openstudio::contam::ControlNode> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✗ Branch 3 not taken.
✗ Branch 6 not taken.
21 string += vector[i]->write();
495 }
496
2/2
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::AirflowElement>(std::vector<std::shared_ptr<openstudio::contam::AirflowElement>, std::allocator<std::shared_ptr<openstudio::contam::AirflowElement> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > openstudio::contam::detail::IndexModelImpl::writeSectionVector<openstudio::contam::ControlNode>(std::vector<std::shared_ptr<openstudio::contam::ControlNode>, std::allocator<std::shared_ptr<openstudio::contam::ControlNode> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int):
✓ Branch 1 taken 1 time.
2 string += "-999\n";
497 2 return string;
498 ✗ }
499
500 template <class T>
501 1 std::string IndexModelImpl::writeArray(std::vector<T> vector, std::string label, int start) {
502 1 std::string string;
503 1 int number = vector.size() - start;
504
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (label.empty()) {
505 ✗ string += openstudio::toString(number) + '\n';
506 } else {
507
5/5
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
1 string += openstudio::toString(number) + " ! " + label + '\n';
508 }
509
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 for (unsigned int i = start; i < vector.size(); i++) {
510 ✗ string += ' ' + openstudio::toString(vector[i]);
511 }
512
1/1
✓ Branch 1 taken 1 time.
2 return string + '\n';
513 1 }
514
515 template <class T>
516 2 void IndexModelImpl::renumberVector(std::vector<T>& vector) {
517 2 int nr = 1;
518
2/2
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 2 times.
3 for (T& t : vector) {
519
1/1
✓ Branch 1 taken 1 time.
1 t.setNr(nr);
520 1 nr++;
521 }
522 2 }
523
524 } // namespace detail
525 } // namespace contam
526 } // namespace openstudio
527
528 #endif // AIRFLOW_CONTAM_PRJMODELIMPL_HPP
529