GCC Code Coverage Report


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

src/model/MaterialPropertyPhaseChange.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_MATERIALPROPERTYPHASECHANGE_HPP
7 #define MODEL_MATERIALPROPERTYPHASECHANGE_HPP
8
9 #include <vector>
10 #include "ModelAPI.hpp"
11 #include "ModelObject.hpp"
12
13 namespace openstudio {
14 namespace model {
15
16 class Material;
17 class StandardOpaqueMaterial;
18 class MasslessOpaqueMaterial;
19
20 namespace detail {
21
22 class MaterialPropertyPhaseChange_Impl;
23
24 } // namespace detail
25
26 /** This class implements a temperature enthalpy */
27 class MODEL_API TemperatureEnthalpy
28 {
29 public:
30 TemperatureEnthalpy(double temperature, double enthalpy);
31
32 double temperature() const;
33 double enthalpy() const;
34
35 private:
36 double m_temperature;
37 double m_enthalpy;
38 REGISTER_LOGGER("openstudio.model.TemperatureEnthalpy");
39 };
40
41 // Overload operator<<
42 MODEL_API std::ostream& operator<<(std::ostream& out, const openstudio::model::TemperatureEnthalpy& temperatureEnthalpy);
43
44 /** MaterialPropertyPhaseChange is a ModelObject that wraps the OpenStudio IDD object 'OS:MaterialProperty:PhaseChange'. */
45 class MODEL_API MaterialPropertyPhaseChange : public ModelObject
46 {
47 public:
48 /** @name Constructors and Destructors */
49 //@{
50
51 explicit MaterialPropertyPhaseChange(StandardOpaqueMaterial& material);
52
53 explicit MaterialPropertyPhaseChange(MasslessOpaqueMaterial& material);
54
55 explicit MaterialPropertyPhaseChange(StandardOpaqueMaterial& material, const std::vector<TemperatureEnthalpy>& temperatureEnthalpys);
56
57 explicit MaterialPropertyPhaseChange(MasslessOpaqueMaterial& material, const std::vector<TemperatureEnthalpy>& temperatureEnthalpys);
58
59 46 virtual ~MaterialPropertyPhaseChange() override = default;
60
61 //@}
62
63 static IddObjectType iddObjectType();
64
65 /** @name Getters */
66 //@{
67
68 std::string materialName() const;
69
70 Material material() const;
71
72 double temperatureCoefficientforThermalConductivity() const;
73
74 bool isTemperatureCoefficientforThermalConductivityDefaulted() const;
75
76 std::vector<TemperatureEnthalpy> temperatureEnthalpys() const;
77
78 unsigned int numberofTemperatureEnthalpys() const;
79
80 //@}
81 /** @name Setters */
82 //@{
83
84 bool setTemperatureCoefficientforThermalConductivity(double temperatureCoefficientforThermalConductivity);
85
86 void resetTemperatureCoefficientforThermalConductivity();
87
88 bool addTemperatureEnthalpy(const TemperatureEnthalpy& temperatureEnthalpy);
89
90 bool addTemperatureEnthalpy(double temperature, double enthalpy);
91
92 bool addTemperatureEnthalpys(const std::vector<TemperatureEnthalpy>& temperatureEnthalpys);
93
94 void removeTemperatureEnthalpy(unsigned groupIndex);
95
96 void removeAllTemperatureEnthalpys();
97
98 //@}
99 /** @name Other */
100 //@{
101
102 //@}
103 protected:
104 /// @cond
105 using ImplType = detail::MaterialPropertyPhaseChange_Impl;
106
107 explicit MaterialPropertyPhaseChange(std::shared_ptr<detail::MaterialPropertyPhaseChange_Impl> impl);
108
109 friend class detail::MaterialPropertyPhaseChange_Impl;
110 friend class Model;
111 friend class IdfObject;
112 friend class openstudio::detail::IdfObject_Impl;
113 /// @endcond
114 private:
115 − REGISTER_LOGGER("openstudio.model.MaterialPropertyPhaseChange");
116 };
117
118 /** \relates MaterialPropertyPhaseChange*/
119 using OptionalMaterialPropertyPhaseChange = boost::optional<MaterialPropertyPhaseChange>;
120
121 /** \relates MaterialPropertyPhaseChange*/
122 using MaterialPropertyPhaseChangeVector = std::vector<MaterialPropertyPhaseChange>;
123
124 } // namespace model
125 } // namespace openstudio
126
127 #endif // MODEL_MATERIALPROPERTYPHASECHANGE_HPP
128