GCC Code Coverage Report


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

src/model/InternalMass.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_INTERNALMASS_HPP
7 #define MODEL_INTERNALMASS_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadInstance.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class InternalMassDefinition;
16 class SurfacePropertyConvectionCoefficients;
17
18 namespace detail {
19
20 class InternalMass_Impl;
21
22 } // namespace detail
23
24 /** InternalMass is a SpaceLoadInstance that wraps the OpenStudio IDD object 'OS_InternalMass'.
25 * Its fields are derived from the EnergyPlus IDD object 'InternalMass'.
26 * \sa InternalMassDefinition
27 */
28 class MODEL_API InternalMass : public SpaceLoadInstance
29 {
30 public:
31 /** @name Constructors and Destructors */
32 //@{
33
34 explicit InternalMass(const InternalMassDefinition& internalMassDefinition);
35
36 178 virtual ~InternalMass() override = default;
37 // Default the copy and move operators because the virtual dtor is explicit
38 ✗ InternalMass(const InternalMass& other) = default;
39 66 InternalMass(InternalMass&& other) = default;
40 ✗ InternalMass& operator=(const InternalMass&) = default;
41 2 InternalMass& operator=(InternalMass&&) = default;
42
43 //@}
44
45 static IddObjectType iddObjectType();
46
47 /** @name Getters */
48 //@{
49
50 /** Gets the InternalMassDefinition object. */
51 InternalMassDefinition internalMassDefinition() const;
52
53 /** Returns the SurfacePropertyConvectionCoefficients, if it exists. */
54 boost::optional<SurfacePropertyConvectionCoefficients> surfacePropertyConvectionCoefficients() const;
55
56 //@}
57 /** @name Setters */
58 //@{
59
60 /** Sets the InternalMassDefinition object. */
61 bool setInternalMassDefinition(const InternalMassDefinition& definition);
62
63 bool setMultiplier(double multiplier);
64
65 void resetMultiplier();
66
67 //@}
68 /** @name Other */
69 //@{
70
71 /** Returns the surfaceArea if possible based on the underlying data of
72 * internalMassDefinition(). */
73 boost::optional<double> surfaceArea() const;
74
75 /** Returns the surfaceAreaPerFloorArea if possible based on the underlying data of
76 * internalMassDefinition(). */
77 boost::optional<double> surfaceAreaPerFloorArea() const;
78
79 /** Returns the surfaceAreaPerPerson if possible based on the underlying data of
80 * internalMassDefinition(). */
81 boost::optional<double> surfaceAreaPerPerson() const;
82
83 /** Returns the construction surface area represented by this instance, assuming floorArea (m^2)
84 * and numPeople. */
85 double getSurfaceArea(double floorArea, double numPeople) const;
86
87 /** Returns the m^2/m^2 of construction surface area per floor area represented by this
88 * instance, assuming floorArea (m^2) and numPeople. */
89 double getSurfaceAreaPerFloorArea(double floorArea, double numPeople) const;
90
91 /** Returns the m^2/person of construction surface area represented by this instance, assuming
92 * floorArea (m^2) and numPeople. */
93 double getSurfaceAreaPerPerson(double floorArea, double numPeople) const;
94
95 //@}
96 protected:
97 /// @cond
98 using ImplType = detail::InternalMass_Impl;
99
100 friend class Model;
101 friend class openstudio::IdfObject;
102
103 explicit InternalMass(std::shared_ptr<detail::InternalMass_Impl> impl);
104
105 /// @endcond
106 private:
107 REGISTER_LOGGER("openstudio.model.InternalMass");
108 };
109
110 /** \relates InternalMass*/
111 using OptionalInternalMass = boost::optional<InternalMass>;
112
113 /** \relates InternalMass*/
114 using InternalMassVector = std::vector<InternalMass>;
115
116 } // namespace model
117 } // namespace openstudio
118
119 #endif // MODEL_INTERNALMASS_HPP
120