libraryfemtherm 0.18.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. libraryfemtherm-0.18.0/.clang-format +86 -0
  2. libraryfemtherm-0.18.0/.github/workflows/build.yml +133 -0
  3. libraryfemtherm-0.18.0/.github/workflows/workflow.yml +69 -0
  4. libraryfemtherm-0.18.0/CMakeLists.txt +159 -0
  5. libraryfemtherm-0.18.0/CMakePresets.json +23 -0
  6. libraryfemtherm-0.18.0/LICENSE +44 -0
  7. libraryfemtherm-0.18.0/PKG-INFO +185 -0
  8. libraryfemtherm-0.18.0/README.md +121 -0
  9. libraryfemtherm-0.18.0/cmake/LibraryFEMTHERMCompilerFlags.cmake +52 -0
  10. libraryfemtherm-0.18.0/cmake/LibraryFEMTHERMProjectMacros.cmake +261 -0
  11. libraryfemtherm-0.18.0/cmake/LibraryFEMTHERMinternal_utils.cmake +216 -0
  12. libraryfemtherm-0.18.0/doc/LibraryFEMTHERM.md +17 -0
  13. libraryfemtherm-0.18.0/doc/LibraryFEMTHERM.md.in +17 -0
  14. libraryfemtherm-0.18.0/doc/python.md +573 -0
  15. libraryfemtherm-0.18.0/pyproject.toml +52 -0
  16. libraryfemtherm-0.18.0/python/CMakeLists.txt +22 -0
  17. libraryfemtherm-0.18.0/python/__init__.py +2 -0
  18. libraryfemtherm-0.18.0/python/src/bind_bc.cxx +116 -0
  19. libraryfemtherm-0.18.0/python/src/bind_cma.cxx +58 -0
  20. libraryfemtherm-0.18.0/python/src/bind_enums.cxx +246 -0
  21. libraryfemtherm-0.18.0/python/src/bind_gases.cxx +76 -0
  22. libraryfemtherm-0.18.0/python/src/bind_geometry.cxx +107 -0
  23. libraryfemtherm-0.18.0/python/src/bind_glazing_system.cxx +117 -0
  24. libraryfemtherm-0.18.0/python/src/bind_materials.cxx +124 -0
  25. libraryfemtherm-0.18.0/python/src/bind_mesh.cxx +188 -0
  26. libraryfemtherm-0.18.0/python/src/bind_mesh_results.cxx +135 -0
  27. libraryfemtherm-0.18.0/python/src/bind_model.cxx +50 -0
  28. libraryfemtherm-0.18.0/python/src/bind_preferences.cxx +48 -0
  29. libraryfemtherm-0.18.0/python/src/bind_properties.cxx +123 -0
  30. libraryfemtherm-0.18.0/python/src/bind_steady_state_results.cxx +129 -0
  31. libraryfemtherm-0.18.0/python/src/bind_zip.cxx +46 -0
  32. libraryfemtherm-0.18.0/python/src/module.cxx +38 -0
  33. libraryfemtherm-0.18.0/python/tests/conftest.py +59 -0
  34. libraryfemtherm-0.18.0/python/tests/test_bc_db.py +111 -0
  35. libraryfemtherm-0.18.0/python/tests/test_cru_properties.py +35 -0
  36. libraryfemtherm-0.18.0/python/tests/test_enums.py +118 -0
  37. libraryfemtherm-0.18.0/python/tests/test_gases_db.py +98 -0
  38. libraryfemtherm-0.18.0/python/tests/test_materials_db.py +118 -0
  39. libraryfemtherm-0.18.0/python/tests/test_mesh.py +122 -0
  40. libraryfemtherm-0.18.0/python/tests/test_mesh_results.py +88 -0
  41. libraryfemtherm-0.18.0/python/tests/test_steady_state_results.py +97 -0
  42. libraryfemtherm-0.18.0/python/tests/test_struct_creation.py +132 -0
  43. libraryfemtherm-0.18.0/python/tests/test_thmz_load_save.py +110 -0
  44. libraryfemtherm-0.18.0/python/tests/test_zip_module.py +167 -0
  45. libraryfemtherm-0.18.0/src/BCSteadyState/DB.cxx +237 -0
  46. libraryfemtherm-0.18.0/src/BCSteadyState/DB.hxx +93 -0
  47. libraryfemtherm-0.18.0/src/BCSteadyState/Operators.cxx +142 -0
  48. libraryfemtherm-0.18.0/src/BCSteadyState/Operators.hxx +41 -0
  49. libraryfemtherm-0.18.0/src/BCSteadyState/Serializers.hxx +260 -0
  50. libraryfemtherm-0.18.0/src/BCSteadyState/SteadyState.hxx +85 -0
  51. libraryfemtherm-0.18.0/src/BCSteadyState/Tags.cxx +147 -0
  52. libraryfemtherm-0.18.0/src/BCSteadyState/Tags.hxx +83 -0
  53. libraryfemtherm-0.18.0/src/BCSteadyState/Utils.cxx +650 -0
  54. libraryfemtherm-0.18.0/src/BCSteadyState/Utils.hxx +48 -0
  55. libraryfemtherm-0.18.0/src/BCTransient/Definitions.hxx +40 -0
  56. libraryfemtherm-0.18.0/src/BCTransient/Timestep.cxx +67 -0
  57. libraryfemtherm-0.18.0/src/BCTransient/Timestep.hxx +210 -0
  58. libraryfemtherm-0.18.0/src/BCTransient/TimestepSerializers.hxx +333 -0
  59. libraryfemtherm-0.18.0/src/BCTransient/TypeOperators.cxx +54 -0
  60. libraryfemtherm-0.18.0/src/BCTransient/TypeOperators.hxx +18 -0
  61. libraryfemtherm-0.18.0/src/BCTransient/Types.cxx +163 -0
  62. libraryfemtherm-0.18.0/src/BCTransient/Types.hxx +130 -0
  63. libraryfemtherm-0.18.0/src/BCTransient/TypesSerializers.hxx +220 -0
  64. libraryfemtherm-0.18.0/src/BCTransient/TypesTags.cxx +97 -0
  65. libraryfemtherm-0.18.0/src/BCTransient/TypesTags.hxx +62 -0
  66. libraryfemtherm-0.18.0/src/CMA/CMA.cxx +14 -0
  67. libraryfemtherm-0.18.0/src/CMA/CMA.hxx +72 -0
  68. libraryfemtherm-0.18.0/src/CMA/DB.cxx +21 -0
  69. libraryfemtherm-0.18.0/src/CMA/DB.hxx +11 -0
  70. libraryfemtherm-0.18.0/src/CMA/Definitions.cxx +26 -0
  71. libraryfemtherm-0.18.0/src/CMA/Definitions.hxx +19 -0
  72. libraryfemtherm-0.18.0/src/CMA/Serializers.hxx +194 -0
  73. libraryfemtherm-0.18.0/src/CMA/Tags.cxx +109 -0
  74. libraryfemtherm-0.18.0/src/CMA/Tags.hxx +72 -0
  75. libraryfemtherm-0.18.0/src/Common/Common.cxx +41 -0
  76. libraryfemtherm-0.18.0/src/Common/Common.hxx +16 -0
  77. libraryfemtherm-0.18.0/src/Common/DB.hxx +43 -0
  78. libraryfemtherm-0.18.0/src/Common/GenericFunctions.hxx +16 -0
  79. libraryfemtherm-0.18.0/src/Common/GeometryDefinitions.cxx +9 -0
  80. libraryfemtherm-0.18.0/src/Common/GeometryDefinitions.hxx +13 -0
  81. libraryfemtherm-0.18.0/src/Gases/DB.cxx +381 -0
  82. libraryfemtherm-0.18.0/src/Gases/DB.hxx +82 -0
  83. libraryfemtherm-0.18.0/src/Gases/Gases.cxx +23 -0
  84. libraryfemtherm-0.18.0/src/Gases/Gases.hxx +67 -0
  85. libraryfemtherm-0.18.0/src/Gases/Operators.cxx +135 -0
  86. libraryfemtherm-0.18.0/src/Gases/Operators.hxx +36 -0
  87. libraryfemtherm-0.18.0/src/Gases/Serializers.hxx +161 -0
  88. libraryfemtherm-0.18.0/src/Gases/Tags.cxx +99 -0
  89. libraryfemtherm-0.18.0/src/Gases/Tags.hxx +66 -0
  90. libraryfemtherm-0.18.0/src/GeometryForResults/DB.cxx +132 -0
  91. libraryfemtherm-0.18.0/src/GeometryForResults/DB.hxx +38 -0
  92. libraryfemtherm-0.18.0/src/GeometryForResults/Geometry.hxx +41 -0
  93. libraryfemtherm-0.18.0/src/GeometryForResults/Serializers.hxx +177 -0
  94. libraryfemtherm-0.18.0/src/LibraryUtilities/Common.hxx +118 -0
  95. libraryfemtherm-0.18.0/src/LibraryUtilities/Exceptions.cxx +12 -0
  96. libraryfemtherm-0.18.0/src/LibraryUtilities/Exceptions.hxx +19 -0
  97. libraryfemtherm-0.18.0/src/LibraryUtilities/FileManipulation.cxx +63 -0
  98. libraryfemtherm-0.18.0/src/LibraryUtilities/FileManipulation.hxx +24 -0
  99. libraryfemtherm-0.18.0/src/LibraryUtilities/StringRoutines.cxx +72 -0
  100. libraryfemtherm-0.18.0/src/LibraryUtilities/StringRoutines.hxx +21 -0
  101. libraryfemtherm-0.18.0/src/LibraryUtilities/TimeRoutines.cxx +28 -0
  102. libraryfemtherm-0.18.0/src/LibraryUtilities/TimeRoutines.hxx +11 -0
  103. libraryfemtherm-0.18.0/src/LibraryUtilities/Util.cxx +14 -0
  104. libraryfemtherm-0.18.0/src/LibraryUtilities/Util.hxx +8 -0
  105. libraryfemtherm-0.18.0/src/Materials/Common.cxx +62 -0
  106. libraryfemtherm-0.18.0/src/Materials/Common.hxx +15 -0
  107. libraryfemtherm-0.18.0/src/Materials/DB.cxx +225 -0
  108. libraryfemtherm-0.18.0/src/Materials/DB.hxx +101 -0
  109. libraryfemtherm-0.18.0/src/Materials/Definitions.hxx +41 -0
  110. libraryfemtherm-0.18.0/src/Materials/Materials.cxx +141 -0
  111. libraryfemtherm-0.18.0/src/Materials/Materials.hxx +196 -0
  112. libraryfemtherm-0.18.0/src/Materials/Operators.cxx +155 -0
  113. libraryfemtherm-0.18.0/src/Materials/Operators.hxx +45 -0
  114. libraryfemtherm-0.18.0/src/Materials/Serializers.hxx +319 -0
  115. libraryfemtherm-0.18.0/src/Materials/Tags.cxx +147 -0
  116. libraryfemtherm-0.18.0/src/Materials/Tags.hxx +36 -0
  117. libraryfemtherm-0.18.0/src/Schemas/Attributes.thml +6 -0
  118. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Steady State/BC Steady State.xsd +111 -0
  119. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Steady State/BoundaryConditionsSteadyState.xml +231 -0
  120. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_ASHRAEInside.xml +35 -0
  121. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_ASHRAEOutside.xml +40 -0
  122. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_BoundaryConditionsASHRAE.xml +25 -0
  123. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_BoundaryConditionsFixedFilmExterior.xml +35 -0
  124. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_BoundaryConditionsFixedFilmExterior20.xml +110 -0
  125. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_BoundaryConditionsFixedFilmFixed20Steps.xml +110 -0
  126. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_BoundaryConditionsFixedFilmInterior.xml +35 -0
  127. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_BoundaryConditionsFixedFilmInterior20.xml +110 -0
  128. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_FixedFilmExterior.xml +35 -0
  129. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_FixedFilmInterior.xml +35 -0
  130. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_FixedHeatFluxExterior.xml +23 -0
  131. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_FixedHeatFluxInterior.xml +23 -0
  132. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_FixedTemperatureAndHumidityInside.xml +68 -0
  133. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_FixedTemperatureAndHumidityOutside.xml +68 -0
  134. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_Fixed_T_RH_HC_120 steps-Exterior.xml +730 -0
  135. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_Fixed_T_RH_HC_120 steps-Interior.xml +730 -0
  136. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_Kimura.xml +40 -0
  137. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_TARPFilmExterior.xml +30 -0
  138. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_TARPFilmInterior.xml +30 -0
  139. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BC_TS_YazdanianKlems.xml +40 -0
  140. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Timestep/BoundaryConditionsTimestep.xsd +0 -0
  141. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Transient/BoundaryConditionsTransient.xml +170 -0
  142. libraryfemtherm-0.18.0/src/Schemas/Boundary Conditions Transient/BoundaryConditionsTransient.xsd +0 -0
  143. libraryfemtherm-0.18.0/src/Schemas/CMA Schema/CMALibrary.xml +91 -0
  144. libraryfemtherm-0.18.0/src/Schemas/CMA Schema/CMALibrary.xsd +80 -0
  145. libraryfemtherm-0.18.0/src/Schemas/Gases Schema/Gases.xml +184 -0
  146. libraryfemtherm-0.18.0/src/Schemas/Gases Schema/Gases.xsd +71 -0
  147. libraryfemtherm-0.18.0/src/Schemas/Materials Schema/Materials.xml +2974 -0
  148. libraryfemtherm-0.18.0/src/Schemas/Materials Schema/Materials.xsd +0 -0
  149. libraryfemtherm-0.18.0/src/Schemas/Materials Schema/Materials_Full.xml +61721 -0
  150. libraryfemtherm-0.18.0/src/Schemas/Model Geometry For Results Schema/ModelGeometryForResults.xsd +78 -0
  151. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/CMA.xsd +70 -0
  152. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/Common.xsd +52 -0
  153. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/FileProperties.xsd +252 -0
  154. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/Geometry.xsd +172 -0
  155. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/GlazingSystem.xsd +175 -0
  156. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/Mesh.xsd +131 -0
  157. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/Preferences.xsd +96 -0
  158. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/SteadyStateMeshResults.xsd +84 -0
  159. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/SteadyStateResults.xsd +58 -0
  160. libraryfemtherm-0.18.0/src/Schemas/THMX Schema/Therm.xsd +55 -0
  161. libraryfemtherm-0.18.0/src/Schemas/UFactors.thml +8 -0
  162. libraryfemtherm-0.18.0/src/THMZ/CMA/CMA.hxx +58 -0
  163. libraryfemtherm-0.18.0/src/THMZ/CMA/EnumSerializers.hxx +47 -0
  164. libraryfemtherm-0.18.0/src/THMZ/CMA/Enumerators.cxx +45 -0
  165. libraryfemtherm-0.18.0/src/THMZ/CMA/Enumerators.hxx +34 -0
  166. libraryfemtherm-0.18.0/src/THMZ/CMA/Serializers.hxx +165 -0
  167. libraryfemtherm-0.18.0/src/THMZ/Common/EnumSerializers.hxx +34 -0
  168. libraryfemtherm-0.18.0/src/THMZ/Common/Enumerators.cxx +42 -0
  169. libraryfemtherm-0.18.0/src/THMZ/Common/Enumerators.hxx +31 -0
  170. libraryfemtherm-0.18.0/src/THMZ/Geometry/EnumSerializers.hxx +78 -0
  171. libraryfemtherm-0.18.0/src/THMZ/Geometry/Enumerators.cxx +83 -0
  172. libraryfemtherm-0.18.0/src/THMZ/Geometry/Enumerators.hxx +108 -0
  173. libraryfemtherm-0.18.0/src/THMZ/Geometry/Geometry.hxx +176 -0
  174. libraryfemtherm-0.18.0/src/THMZ/Geometry/Serializers.hxx +279 -0
  175. libraryfemtherm-0.18.0/src/THMZ/GlazingSystem/EnumSerializers.hxx +50 -0
  176. libraryfemtherm-0.18.0/src/THMZ/GlazingSystem/Enumerators.cxx +51 -0
  177. libraryfemtherm-0.18.0/src/THMZ/GlazingSystem/Enumerators.hxx +66 -0
  178. libraryfemtherm-0.18.0/src/THMZ/GlazingSystem/GlazingSystem.hxx +131 -0
  179. libraryfemtherm-0.18.0/src/THMZ/GlazingSystem/Serializers.hxx +383 -0
  180. libraryfemtherm-0.18.0/src/THMZ/Mesh/DB.cxx +48 -0
  181. libraryfemtherm-0.18.0/src/THMZ/Mesh/DB.hxx +26 -0
  182. libraryfemtherm-0.18.0/src/THMZ/Mesh/Mesh.hxx +103 -0
  183. libraryfemtherm-0.18.0/src/THMZ/Mesh/Serializers.hxx +258 -0
  184. libraryfemtherm-0.18.0/src/THMZ/Model/DB.cxx +48 -0
  185. libraryfemtherm-0.18.0/src/THMZ/Model/DB.hxx +24 -0
  186. libraryfemtherm-0.18.0/src/THMZ/Model/Serializers.hxx +70 -0
  187. libraryfemtherm-0.18.0/src/THMZ/Model/THMX.hxx +36 -0
  188. libraryfemtherm-0.18.0/src/THMZ/Preferences/EnumSerializers.hxx +64 -0
  189. libraryfemtherm-0.18.0/src/THMZ/Preferences/Enumerators.cxx +65 -0
  190. libraryfemtherm-0.18.0/src/THMZ/Preferences/Enumerators.hxx +76 -0
  191. libraryfemtherm-0.18.0/src/THMZ/Preferences/Preferences.hxx +52 -0
  192. libraryfemtherm-0.18.0/src/THMZ/Preferences/Serializers.hxx +123 -0
  193. libraryfemtherm-0.18.0/src/THMZ/Properties/EnumSerializers.hxx +186 -0
  194. libraryfemtherm-0.18.0/src/THMZ/Properties/Enumerators.cxx +241 -0
  195. libraryfemtherm-0.18.0/src/THMZ/Properties/Enumerators.hxx +243 -0
  196. libraryfemtherm-0.18.0/src/THMZ/Properties/GravityProperties.cxx +70 -0
  197. libraryfemtherm-0.18.0/src/THMZ/Properties/GravityProperties.hxx +44 -0
  198. libraryfemtherm-0.18.0/src/THMZ/Properties/Properties.cxx +22 -0
  199. libraryfemtherm-0.18.0/src/THMZ/Properties/Properties.hxx +223 -0
  200. libraryfemtherm-0.18.0/src/THMZ/Properties/Serializers.hxx +332 -0
  201. libraryfemtherm-0.18.0/src/THMZ/Properties/Utilities.cxx +49 -0
  202. libraryfemtherm-0.18.0/src/THMZ/Properties/Utilities.hxx +25 -0
  203. libraryfemtherm-0.18.0/src/THMZ/SteadyStateMeshResults/DB.cxx +41 -0
  204. libraryfemtherm-0.18.0/src/THMZ/SteadyStateMeshResults/DB.hxx +18 -0
  205. libraryfemtherm-0.18.0/src/THMZ/SteadyStateMeshResults/Results.hxx +61 -0
  206. libraryfemtherm-0.18.0/src/THMZ/SteadyStateMeshResults/Serializers.hxx +146 -0
  207. libraryfemtherm-0.18.0/src/THMZ/SteadyStateResults/DB.cxx +54 -0
  208. libraryfemtherm-0.18.0/src/THMZ/SteadyStateResults/DB.hxx +24 -0
  209. libraryfemtherm-0.18.0/src/THMZ/SteadyStateResults/EnumSerializers.hxx +22 -0
  210. libraryfemtherm-0.18.0/src/THMZ/SteadyStateResults/Enumerators.cxx +28 -0
  211. libraryfemtherm-0.18.0/src/THMZ/SteadyStateResults/Enumerators.hxx +21 -0
  212. libraryfemtherm-0.18.0/src/THMZ/SteadyStateResults/Results.hxx +46 -0
  213. libraryfemtherm-0.18.0/src/THMZ/SteadyStateResults/Serializers.hxx +107 -0
  214. libraryfemtherm-0.18.0/src/THMZ/ZipModule/ZipModule.cxx +278 -0
  215. libraryfemtherm-0.18.0/src/THMZ/ZipModule/ZipModule.hxx +82 -0
  216. libraryfemtherm-0.18.0/tst/CMakeLists.txt +30 -0
  217. libraryfemtherm-0.18.0/tst/helper/BoundaryConditionsSteadyStateTestUtils.cxx +125 -0
  218. libraryfemtherm-0.18.0/tst/helper/BoundaryConditionsSteadyStateTestUtils.hxx +77 -0
  219. libraryfemtherm-0.18.0/tst/helper/GlazingSystemHelper.cxx +448 -0
  220. libraryfemtherm-0.18.0/tst/helper/GlazingSystemHelper.hxx +239 -0
  221. libraryfemtherm-0.18.0/tst/helper/HelperUtility.hxx +144 -0
  222. libraryfemtherm-0.18.0/tst/helper/InputFileTestDatabase.cxx +545 -0
  223. libraryfemtherm-0.18.0/tst/helper/InputFileTestDatabase.hxx +20 -0
  224. libraryfemtherm-0.18.0/tst/helper/MaterialsHelper.cxx +182 -0
  225. libraryfemtherm-0.18.0/tst/helper/MaterialsHelper.hxx +117 -0
  226. libraryfemtherm-0.18.0/tst/helper/MockNodeAdapter.cxx +231 -0
  227. libraryfemtherm-0.18.0/tst/helper/MockNodeAdapter.hxx +70 -0
  228. libraryfemtherm-0.18.0/tst/helper/PreferencesHelper.cxx +153 -0
  229. libraryfemtherm-0.18.0/tst/helper/PreferencesHelper.hxx +101 -0
  230. libraryfemtherm-0.18.0/tst/helper/PropertiesHelper.cxx +478 -0
  231. libraryfemtherm-0.18.0/tst/helper/PropertiesHelper.hxx +270 -0
  232. libraryfemtherm-0.18.0/tst/helper/THMXGeometryHelper.cxx +493 -0
  233. libraryfemtherm-0.18.0/tst/helper/THMXGeometryHelper.hxx +256 -0
  234. libraryfemtherm-0.18.0/tst/helper/THMXHelper.cxx +37 -0
  235. libraryfemtherm-0.18.0/tst/helper/THMXHelper.hxx +15 -0
  236. libraryfemtherm-0.18.0/tst/helper/THMXMeshHelper.cxx +391 -0
  237. libraryfemtherm-0.18.0/tst/helper/THMXMeshHelper.hxx +222 -0
  238. libraryfemtherm-0.18.0/tst/helper/THMXSteadyStateMeshResultsHelper.cxx +199 -0
  239. libraryfemtherm-0.18.0/tst/helper/THMXSteadyStateMeshResultsHelper.hxx +108 -0
  240. libraryfemtherm-0.18.0/tst/helper/THMXSteadyStateResultsHelper.cxx +172 -0
  241. libraryfemtherm-0.18.0/tst/helper/THMXSteadyStateResultsHelper.hxx +87 -0
  242. libraryfemtherm-0.18.0/tst/helper/TestExamples.cxx +400 -0
  243. libraryfemtherm-0.18.0/tst/helper/TestExamples.hxx +23 -0
  244. libraryfemtherm-0.18.0/tst/helper/Utility.hxx +67 -0
  245. libraryfemtherm-0.18.0/tst/helper/bcsteadyState1.cxx +81 -0
  246. libraryfemtherm-0.18.0/tst/helper/bcsteadyState1.hxx +11 -0
  247. libraryfemtherm-0.18.0/tst/helper/bctype1.cxx +80 -0
  248. libraryfemtherm-0.18.0/tst/helper/bctype1.hxx +12 -0
  249. libraryfemtherm-0.18.0/tst/helper/cma1.cxx +122 -0
  250. libraryfemtherm-0.18.0/tst/helper/cma1.hxx +13 -0
  251. libraryfemtherm-0.18.0/tst/helper/gases1.cxx +130 -0
  252. libraryfemtherm-0.18.0/tst/helper/gases1.hxx +12 -0
  253. libraryfemtherm-0.18.0/tst/helper/geometry1.cxx +244 -0
  254. libraryfemtherm-0.18.0/tst/helper/geometry1.hxx +8 -0
  255. libraryfemtherm-0.18.0/tst/helper/material1.cxx +338 -0
  256. libraryfemtherm-0.18.0/tst/helper/material1.hxx +16 -0
  257. libraryfemtherm-0.18.0/tst/main.cxx +12 -0
  258. libraryfemtherm-0.18.0/tst/products/ID50_CS_single.thmz +0 -0
  259. libraryfemtherm-0.18.0/tst/products/SteadyStateBC.xml +39 -0
  260. libraryfemtherm-0.18.0/tst/products/sample-sill-no-results.thmz +0 -0
  261. libraryfemtherm-0.18.0/tst/products/sample-sill.thmz +0 -0
  262. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCSteadyStateLibraryXMLLoading.unit.cxx +188 -0
  263. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCSteadyStateLibraryXMLSaving.unit.cxx +163 -0
  264. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCSteadyStateOperators.unit.cxx +139 -0
  265. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCSteadyStateTypes.unit.cxx +232 -0
  266. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCSteadyStateUtility.unit.cxx +247 -0
  267. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCTypeLibraryXMLReading.unit.cxx +77 -0
  268. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCTypeLibraryXMLSaving.unit.cxx +64 -0
  269. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/BCTypeXMLEnumerators.unit.cxx +154 -0
  270. libraryfemtherm-0.18.0/tst/units/Boundary Conditions/InputFileXMLReading.unit.cxx +305 -0
  271. libraryfemtherm-0.18.0/tst/units/CMA/CMA.unit.cxx +303 -0
  272. libraryfemtherm-0.18.0/tst/units/CMA/CMAXMLReading.unit.cxx +84 -0
  273. libraryfemtherm-0.18.0/tst/units/Common/DisplayName.unit.cxx +28 -0
  274. libraryfemtherm-0.18.0/tst/units/Common/ImportExportFile.unit.cxx +132 -0
  275. libraryfemtherm-0.18.0/tst/units/Common/StringConversion.unit.cxx +101 -0
  276. libraryfemtherm-0.18.0/tst/units/Common/ToScientific.unit.cxx +45 -0
  277. libraryfemtherm-0.18.0/tst/units/Common/Trimming.unit.cxx +35 -0
  278. libraryfemtherm-0.18.0/tst/units/Common/ZippingStringToFile.unit.cxx +84 -0
  279. libraryfemtherm-0.18.0/tst/units/Gases/Gases.unit.cxx +313 -0
  280. libraryfemtherm-0.18.0/tst/units/Gases/GasesXMLOperators.unit.cxx +187 -0
  281. libraryfemtherm-0.18.0/tst/units/Gases/GasesXMLReading.unit.cxx +442 -0
  282. libraryfemtherm-0.18.0/tst/units/Gases/GasesXMLTags.unit.cxx +111 -0
  283. libraryfemtherm-0.18.0/tst/units/Gases/GasesXMLWriting.unit.cxx +114 -0
  284. libraryfemtherm-0.18.0/tst/units/Geometry/GeometryXMLReading.unit.cxx +46 -0
  285. libraryfemtherm-0.18.0/tst/units/Geometry/GeometryXMLSaving.unit.cxx +61 -0
  286. libraryfemtherm-0.18.0/tst/units/Materials/MaterialComponents.unit.cxx +411 -0
  287. libraryfemtherm-0.18.0/tst/units/Materials/MaterialXMLDisplays.unit.cxx +38 -0
  288. libraryfemtherm-0.18.0/tst/units/Materials/MaterialXMLTags.unit.cxx +146 -0
  289. libraryfemtherm-0.18.0/tst/units/Materials/Materials.unit.cxx +315 -0
  290. libraryfemtherm-0.18.0/tst/units/Materials/MaterialsXMLOperators.unit.cxx +136 -0
  291. libraryfemtherm-0.18.0/tst/units/Materials/MaterialsXMLReading.unit.cxx +243 -0
  292. libraryfemtherm-0.18.0/tst/units/Materials/MaterialsXMLSaving.unit.cxx +166 -0
  293. libraryfemtherm-0.18.0/tst/units/THMZ/CMA/CMA.unit.cxx +227 -0
  294. libraryfemtherm-0.18.0/tst/units/THMZ/CMA/CMAEnumerators.unit.cxx +86 -0
  295. libraryfemtherm-0.18.0/tst/units/THMZ/Common/Common.unit.cxx +48 -0
  296. libraryfemtherm-0.18.0/tst/units/THMZ/Geometry/THMXGeometry.unit.cxx +522 -0
  297. libraryfemtherm-0.18.0/tst/units/THMZ/Geometry/THMXGeometryEnumerators.unit.cxx +162 -0
  298. libraryfemtherm-0.18.0/tst/units/THMZ/GlazingSystem/CRUDeserialization.unit.cxx +35 -0
  299. libraryfemtherm-0.18.0/tst/units/THMZ/GlazingSystem/GlazingSystem.unit.cxx +451 -0
  300. libraryfemtherm-0.18.0/tst/units/THMZ/GlazingSystem/GlazingSystemEnumerators.unit.cxx +89 -0
  301. libraryfemtherm-0.18.0/tst/units/THMZ/GravityProperties.unit.cxx +111 -0
  302. libraryfemtherm-0.18.0/tst/units/THMZ/Mesh/Mesh.unit.cxx +334 -0
  303. libraryfemtherm-0.18.0/tst/units/THMZ/Preferences/Preferences.unit.cxx +125 -0
  304. libraryfemtherm-0.18.0/tst/units/THMZ/Preferences/PreferencesEnumerators.unit.cxx +166 -0
  305. libraryfemtherm-0.18.0/tst/units/THMZ/Properties/FileProperties.unit.cxx +489 -0
  306. libraryfemtherm-0.18.0/tst/units/THMZ/Properties/FilePropertiesEnumerators.unit.cxx +557 -0
  307. libraryfemtherm-0.18.0/tst/units/THMZ/Properties/FilePropertiesUtilities.unit.cxx +87 -0
  308. libraryfemtherm-0.18.0/tst/units/THMZ/SteadyStateMeshResults/SteadyStateMeshResults.unit.cxx +254 -0
  309. libraryfemtherm-0.18.0/tst/units/THMZ/SteadyStateMeshResults/SteadyStateMeshResultsEnumerators.unit.cxx +48 -0
  310. libraryfemtherm-0.18.0/tst/units/THMZ/SteadyStateResults/SteadyStateResults.unit.cxx +377 -0
  311. libraryfemtherm-0.18.0/tst/units/THMZ/SteadyStateResults/SteadyStateResultsEnumerators.unit.cxx +70 -0
  312. libraryfemtherm-0.18.0/tst/units/THMZ/THMXFile.unit.cxx +62 -0
  313. libraryfemtherm-0.18.0/tst/units/THMZ/THMZFile.unit.cxx +34 -0
@@ -0,0 +1,86 @@
1
+ AccessModifierOffset: -4
2
+ AlignAfterOpenBracket: 'Align'
3
+ AlignConsecutiveAssignments: false
4
+ AlignConsecutiveDeclarations: false
5
+ AlignEscapedNewlines: 'Left'
6
+ AlignOperands: true
7
+ AlignTrailingComments: true
8
+ AllowAllParametersOfDeclarationOnNextLine: true
9
+ AllowShortBlocksOnASingleLine: false
10
+ AllowShortIfStatementsOnASingleLine: false
11
+ AllowShortFunctionsOnASingleLine: 'None'
12
+ AllowShortCaseLabelsOnASingleLine: false
13
+ AllowShortLoopsOnASingleLine: false
14
+ AlwaysBreakAfterReturnType: 'None'
15
+ AlwaysBreakBeforeMultilineStrings: false
16
+ AlwaysBreakTemplateDeclarations: true
17
+ BinPackArguments: false
18
+ BinPackParameters: false
19
+ BraceWrapping:
20
+ AfterClass: true
21
+ AfterControlStatement: true
22
+ AfterEnum: true
23
+ AfterFunction: true
24
+ AfterNamespace: true
25
+ AfterStruct: true
26
+ AfterUnion: true
27
+ AfterExternBlock: true
28
+ BeforeCatch: true
29
+ BeforeElse: true
30
+ IndentBraces: false
31
+ SplitEmptyFunction: false
32
+ SplitEmptyRecord: false
33
+ SplitEmptyNamespace: false
34
+ BreakBeforeBinaryOperators: 'NonAssignment'
35
+ BreakBeforeBraces: 'Custom'
36
+ BreakBeforeInheritanceComma: false
37
+ BreakBeforeTernaryOperators: true
38
+ BreakConstructorInitializers: 'AfterColon'
39
+ ColumnLimit: 120
40
+ #CommentPragmas: '^ IWYU pragma:'
41
+ CompactNamespaces: false
42
+ ConstructorInitializerAllOnOneLineOrOnePerLine: true
43
+ ConstructorInitializerIndentWidth: 4
44
+ ContinuationIndentWidth: 2
45
+ Cpp11BracedListStyle: true
46
+ DerivePointerAlignment: false
47
+ DisableFormat: false
48
+ FixNamespaceComments: true
49
+ #****************** This may break the builds a lot because of include order issues*******************
50
+ #IncludeBlocks: 'Regroup'
51
+ #IncludeCategories:
52
+ # - Regex: 'stdafx\.h'
53
+ # Priority: '-1'
54
+ #****************** END INCLUDE ORDER STRUCTURE*******************************************************
55
+ IndentCaseLabels: true
56
+ IndentPPDirectives: 'AfterHash'
57
+ IndentWrappedFunctionNames: true
58
+ IndentWidth: 4
59
+ KeepEmptyLinesAtTheStartOfBlocks: false
60
+ Language: 'Cpp'
61
+ MaxEmptyLinesToKeep: 2
62
+ PointerAlignment: 'Middle'
63
+ SpaceAfterCStyleCast: false
64
+ SpaceAfterTemplateKeyword: false
65
+ SpaceBeforeAssignmentOperators: true
66
+ #SpaceBeforeCtorInitializerColon: true #gives error when trying to run
67
+ #SpaceBeforeInheritanceColon: true #gives error when trying to run
68
+ SpaceBeforeParens: 'Never'
69
+ SpaceInEmptyParentheses: false
70
+ SpacesBeforeTrailingComments: 3
71
+ SpacesInAngles: false
72
+ #SpaceBeforeRangeBasedForLoopColon: false #gives error when trying to run
73
+ SpacesInCStyleCastParentheses: false
74
+ SpacesInContainerLiterals: false
75
+ SpacesInParentheses: false
76
+ SpacesInSquareBrackets: false
77
+
78
+ SortIncludes: false # Setting this to true may break the builds because of include order issues
79
+ SortUsingDeclarations: false
80
+
81
+ UseTab: Never
82
+
83
+
84
+ NamespaceIndentation: 'All'
85
+
86
+ Standard: Cpp11
@@ -0,0 +1,133 @@
1
+ name: Build and test
2
+
3
+ on: [push, pull_request]
4
+
5
+ env:
6
+ BUILD_TYPE: Release
7
+
8
+ jobs:
9
+ windows:
10
+ name: ${{ matrix.os }}-${{ matrix.arch }}
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [windows-2022]
16
+ arch: [x86, x64]
17
+
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ if: matrix.arch == 'x64'
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: '3.x'
27
+
28
+ - name: Install pytest
29
+ if: matrix.arch == 'x64'
30
+ run: pip install pytest
31
+
32
+ - name: Configure CMake (with Python bindings)
33
+ if: matrix.arch == 'x64'
34
+ run: >
35
+ cmake -B ${{github.workspace}}/build
36
+ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
37
+ -DBUILD_PYTHON_BINDINGS=ON
38
+ -DPython3_EXECUTABLE=${{ env.pythonLocation }}/python
39
+
40
+ - name: Configure CMake (C++ only)
41
+ if: matrix.arch != 'x64'
42
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
43
+
44
+ - name: Build
45
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
46
+
47
+ - name: Test
48
+ working-directory: ${{github.workspace}}/build
49
+ run: ctest -C RELEASE -V
50
+
51
+ mac:
52
+ name: ${{ matrix.os }}
53
+ runs-on: ${{ matrix.os }}
54
+ strategy:
55
+ fail-fast: false
56
+ matrix:
57
+ os: [macos-latest]
58
+
59
+ steps:
60
+ - name: Checkout repository
61
+ uses: actions/checkout@v4
62
+
63
+ - name: Set up Python
64
+ uses: actions/setup-python@v5
65
+ with:
66
+ python-version: '3.x'
67
+
68
+ - name: Install pytest
69
+ run: pip install pytest
70
+
71
+ - name: Configure CMake
72
+ run: >
73
+ cmake -B ${{github.workspace}}/build
74
+ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
75
+ -DBUILD_PYTHON_BINDINGS=ON
76
+ -DPython3_EXECUTABLE=${{ env.pythonLocation }}/python
77
+
78
+ - name: Build
79
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
80
+
81
+ - name: Test
82
+ working-directory: ${{github.workspace}}/build
83
+ run: ctest -C RELEASE -V
84
+
85
+ linux:
86
+ name: ${{ matrix.os }}-${{ matrix.arch }}
87
+ runs-on: ${{ matrix.os }}
88
+ strategy:
89
+ fail-fast: false
90
+ matrix:
91
+ os: [ubuntu-24.04]
92
+ arch: [x86_64, aarch64]
93
+
94
+ steps:
95
+ - name: Checkout repository
96
+ uses: actions/checkout@v4
97
+
98
+ - name: Install QEMU for aarch64 emulation
99
+ uses: docker/setup-qemu-action@v2
100
+ with:
101
+ platforms: all
102
+
103
+ - name: Upgrade gcc
104
+ run: sudo apt-get install -y gcc g++
105
+
106
+ - name: Set up Python
107
+ if: matrix.arch == 'x86_64'
108
+ uses: actions/setup-python@v5
109
+ with:
110
+ python-version: '3.x'
111
+
112
+ - name: Install pytest
113
+ if: matrix.arch == 'x86_64'
114
+ run: pip install pytest
115
+
116
+ - name: Configure CMake (with Python bindings)
117
+ if: matrix.arch == 'x86_64'
118
+ run: >
119
+ cmake -B ${{github.workspace}}/build
120
+ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
121
+ -DBUILD_PYTHON_BINDINGS=ON
122
+ -DPython3_EXECUTABLE=${{ env.pythonLocation }}/python
123
+
124
+ - name: Configure CMake (C++ only)
125
+ if: matrix.arch != 'x86_64'
126
+ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
127
+
128
+ - name: Build
129
+ run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
130
+
131
+ - name: Test
132
+ working-directory: ${{github.workspace}}/build
133
+ run: ctest -C RELEASE -V
@@ -0,0 +1,69 @@
1
+ name: Build and publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "Version_*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build_wheels:
11
+ name: Build wheels on ${{ matrix.os }}
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-24.04, windows-2022, macos-latest]
17
+
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v4
24
+
25
+ - name: Build wheels
26
+ uses: pypa/cibuildwheel@v2.21
27
+ env:
28
+ CIBW_BUILD_FRONTEND: build[uv]
29
+
30
+ - name: Upload wheels
31
+ uses: actions/upload-artifact@v4
32
+ with:
33
+ name: wheels-${{ matrix.os }}
34
+ path: wheelhouse/*.whl
35
+
36
+ build_sdist:
37
+ name: Build source distribution
38
+ runs-on: ubuntu-24.04
39
+
40
+ steps:
41
+ - name: Checkout repository
42
+ uses: actions/checkout@v4
43
+
44
+ - name: Build sdist
45
+ run: pipx run build --sdist
46
+
47
+ - name: Upload sdist
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: sdist
51
+ path: dist/*.tar.gz
52
+
53
+ publish:
54
+ name: Publish to PyPI
55
+ needs: [build_wheels, build_sdist]
56
+ runs-on: ubuntu-24.04
57
+ environment: pypi
58
+ permissions:
59
+ id-token: write
60
+
61
+ steps:
62
+ - name: Download all artifacts
63
+ uses: actions/download-artifact@v4
64
+ with:
65
+ path: dist
66
+ merge-multiple: true
67
+
68
+ - name: Publish to PyPI
69
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,159 @@
1
+ cmake_minimum_required(VERSION 3.8)
2
+
3
+ option(BUILD_PYTHON_BINDINGS "Build Python bindings via pybind11" OFF)
4
+
5
+ # Python extensions require /MD (dynamic CRT); static library uses /MT
6
+ if(BUILD_PYTHON_BINDINGS)
7
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
8
+ endif()
9
+
10
+ project(LibraryFEMTHERM VERSION 0.18.0 LANGUAGES CXX)
11
+ set(target_name LibraryFEMTHERM)
12
+
13
+ include(cmake/LibraryFEMTHERMProjectMacros.cmake)
14
+ include(cmake/LibraryFEMTHERMinternal_utils.cmake)
15
+ include(cmake/LibraryFEMTHERMCompilerFlags.cmake)
16
+
17
+ set(CMAKE_CXX_STANDARD 20)
18
+ set(CMAKE_CXX_STANDARD_REQUIRED True)
19
+
20
+ set(GLOBAL_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
21
+
22
+ # Sets global output directory for single configuration
23
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH})
24
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH})
25
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH})
26
+
27
+ # google test will not be created by this project if this is not the main project. Main project is expected to handle google test.
28
+ get_directory_property(hasParent PARENT_DIRECTORY)
29
+
30
+ if(hasParent)
31
+ set(BUILD_LibraryFEMTHERM_TESTING OFF)
32
+ set(DOWNLOAD_GTEST OFF)
33
+ if(BUILD_TESTING STREQUAL ON) # Parent testing is ON
34
+ set(BUILD_KeffC_TESTING ON)
35
+ endif()
36
+ else()
37
+ option(BUILD_LibraryFEMTHERM_TESTING "Build testing targets" ON)
38
+ set(DOWNLOAD_GTEST ON)
39
+ endif()
40
+
41
+ # Download external projects automatically
42
+ option(BUILD_FileParse_tests "Build the FileParse tests" OFF)
43
+
44
+ include(FetchContent)
45
+
46
+ set(LBNLCPPCommon_Branch "v0.15")
47
+
48
+ if(NOT TARGET LBNLCPPCommon)
49
+ FetchContent_Declare(
50
+ LBNLCPPCommon
51
+ GIT_REPOSITORY https://github.com/LBNL-ETA/LBNLCPPCommon.git
52
+ GIT_TAG ${LBNLCPPCommon_Branch}
53
+ )
54
+ FetchContent_MakeAvailable(LBNLCPPCommon)
55
+ endif()
56
+ FetchContent_GetProperties(LBNLCPPCommon)
57
+
58
+ set(FileParse_Branch "Version_1.1.2")
59
+
60
+ if(NOT TARGET FileParse)
61
+ FetchContent_Declare(
62
+ FileParse
63
+ GIT_REPOSITORY https://github.com/LBNL-ETA/FileParse.git
64
+ GIT_TAG ${FileParse_Branch}
65
+ )
66
+ FetchContent_MakeAvailable(FileParse)
67
+ endif()
68
+ FetchContent_GetProperties(FileParse)
69
+
70
+ set(miniz_Branch "89d7a5f6c3ce8893ea042b0a9d2a2d9975589ac9")
71
+
72
+ if(NOT TARGET miniz)
73
+ FetchContent_Declare(
74
+ miniz
75
+ GIT_REPOSITORY https://github.com/richgel999/miniz
76
+ GIT_TAG ${miniz_Branch}
77
+ )
78
+ FetchContent_MakeAvailable(miniz)
79
+ endif()
80
+
81
+ if(BUILD_PYTHON_BINDINGS)
82
+ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
83
+ FetchContent_Declare(pybind11
84
+ GIT_REPOSITORY https://github.com/pybind/pybind11.git
85
+ GIT_TAG v2.13.6)
86
+ FetchContent_MakeAvailable(pybind11)
87
+ endif()
88
+
89
+ if(DOWNLOAD_GTEST)
90
+ if(MSVC)
91
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
92
+ endif()
93
+ if(NOT TARGET gtest)
94
+ FetchContent_Declare(
95
+ googletest
96
+ GIT_REPOSITORY https://github.com/google/googletest.git
97
+ GIT_TAG v1.13.0
98
+ )
99
+ FetchContent_MakeAvailable(googletest)
100
+
101
+ include_directories(${gtest_SOURCE_DIR}/include)
102
+ endif()
103
+ endif()
104
+
105
+ # Generate dependency diagram from template
106
+ configure_file(
107
+ ${CMAKE_CURRENT_SOURCE_DIR}/doc/LibraryFEMTHERM.md.in
108
+ ${CMAKE_CURRENT_SOURCE_DIR}/doc/LibraryFEMTHERM.md
109
+ )
110
+
111
+ file(GLOB_RECURSE SOURCES_HXX "src/*.hxx")
112
+ file(GLOB_RECURSE SOURCES_CXX "src/*.cxx")
113
+ LIST(APPEND SOURCES ${SOURCES_HXX} ${SOURCES_CXX})
114
+
115
+ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCES})
116
+
117
+ add_library(${target_name} STATIC ${SOURCES})
118
+
119
+ set_target_properties(${target_name} PROPERTIES LINKER_LANGUAGE CXX)
120
+
121
+ target_include_directories(${target_name}
122
+ PUBLIC
123
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
124
+ ${fileparse_SOURCE_DIR}/include
125
+ ${LBNLCPPCommon_SOURCE_DIR}/include
126
+ )
127
+
128
+ target_link_libraries(${target_name} PRIVATE FileParse LBNLCPPCommon miniz)
129
+
130
+ set_property(TARGET ${target_name} PROPERTY FileParse_Branch ${FileParse_Branch})
131
+ set_property(TARGET ${target_name} PROPERTY miniz_Branch ${miniz_Branch})
132
+
133
+ enable_testing()
134
+
135
+ if(BUILD_LibraryFEMTHERM_TESTING)
136
+ add_subdirectory(tst)
137
+ # Add include directories for tests if necessary
138
+ set(TEST_DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tst")
139
+ target_compile_definitions(LibraryFEMTHERM_tests PRIVATE TEST_DATA_DIR="${TEST_DATA_DIR}")
140
+ endif()
141
+
142
+ if(BUILD_PYTHON_BINDINGS)
143
+ add_subdirectory(python)
144
+ endif()
145
+
146
+ config_compiler_and_linker_LibraryFEMTHERM()
147
+
148
+ if (MSVC)
149
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /utf-8")
150
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /utf-8")
151
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /utf-8")
152
+ endif()
153
+
154
+ # Warning levels
155
+ if (MSVC)
156
+ add_compile_options(/W4)
157
+ else()
158
+ add_compile_options(-Wall -Wextra -Wpedantic)
159
+ endif()
@@ -0,0 +1,23 @@
1
+ {
2
+ "version": 6,
3
+ "configurePresets": [
4
+ {
5
+ "name": "default",
6
+ "displayName": "C++ only",
7
+ "binaryDir": "${sourceDir}/build/${presetName}",
8
+ "cacheVariables": {
9
+ "CMAKE_BUILD_TYPE": "Release"
10
+ }
11
+ },
12
+ {
13
+ "name": "python",
14
+ "displayName": "C++ with Python bindings",
15
+ "binaryDir": "${sourceDir}/build/${presetName}",
16
+ "cacheVariables": {
17
+ "CMAKE_BUILD_TYPE": "Release",
18
+ "BUILD_PYTHON_BINDINGS": "ON",
19
+ "BUILD_LibraryFEMTHERM_TESTING": "ON"
20
+ }
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,44 @@
1
+ *** License Agreement ***
2
+
3
+ Berkeley Lab LibraryFEMTHERM Copyright (c) 2025, The
4
+ Regents of the University of California, through Lawrence Berkeley National
5
+ Laboratory (subject to receipt of any required approvals from the U.S.
6
+ Dept. of Energy). All rights reserved.
7
+
8
+ Redistribution and use in source and binary forms, with or without
9
+ modification, are permitted provided that the following conditions are met:
10
+
11
+ (1) Redistributions of source code must retain the above copyright notice,
12
+ this list of conditions and the following disclaimer.
13
+
14
+ (2) Redistributions in binary form must reproduce the above copyright
15
+ notice, this list of conditions and the following disclaimer in the
16
+ documentation and/or other materials provided with the distribution.
17
+
18
+ (3) Neither the name of the University of California, Lawrence Berkeley
19
+ National Laboratory, U.S. Dept. of Energy nor the names of its contributors
20
+ may be used to endorse or promote products derived from this software
21
+ without specific prior written permission.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
+ POSSIBILITY OF SUCH DAMAGE.
34
+
35
+ You are under no obligation whatsoever to provide any bug fixes, patches,
36
+ or upgrades to the features, functionality or performance of the source
37
+ code ("Enhancements") to anyone; however, if you choose to make your
38
+ Enhancements available either publicly, or directly to Lawrence Berkeley
39
+ National Laboratory, without imposing a separate written license agreement
40
+ for such Enhancements, then you hereby grant the following license: a
41
+ non-exclusive, royalty-free perpetual license to install, use, modify,
42
+ prepare derivative works, incorporate into other computer software,
43
+ distribute, and sublicense such enhancements or derivative works thereof,
44
+ in binary and source code form.
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.2
2
+ Name: libraryfemtherm
3
+ Version: 0.18.0
4
+ Summary: Python bindings for LibraryFEMTherm – THMZ file parsing and thermal simulation data
5
+ Author-Email: LBNL-ETA <SimonMN@lbl.gov>
6
+ License: *** License Agreement ***
7
+
8
+ Berkeley Lab LibraryFEMTHERM Copyright (c) 2025, The
9
+ Regents of the University of California, through Lawrence Berkeley National
10
+ Laboratory (subject to receipt of any required approvals from the U.S.
11
+ Dept. of Energy). All rights reserved.
12
+
13
+ Redistribution and use in source and binary forms, with or without
14
+ modification, are permitted provided that the following conditions are met:
15
+
16
+ (1) Redistributions of source code must retain the above copyright notice,
17
+ this list of conditions and the following disclaimer.
18
+
19
+ (2) Redistributions in binary form must reproduce the above copyright
20
+ notice, this list of conditions and the following disclaimer in the
21
+ documentation and/or other materials provided with the distribution.
22
+
23
+ (3) Neither the name of the University of California, Lawrence Berkeley
24
+ National Laboratory, U.S. Dept. of Energy nor the names of its contributors
25
+ may be used to endorse or promote products derived from this software
26
+ without specific prior written permission.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38
+ POSSIBILITY OF SUCH DAMAGE.
39
+
40
+ You are under no obligation whatsoever to provide any bug fixes, patches,
41
+ or upgrades to the features, functionality or performance of the source
42
+ code ("Enhancements") to anyone; however, if you choose to make your
43
+ Enhancements available either publicly, or directly to Lawrence Berkeley
44
+ National Laboratory, without imposing a separate written license agreement
45
+ for such Enhancements, then you hereby grant the following license: a
46
+ non-exclusive, royalty-free perpetual license to install, use, modify,
47
+ prepare derivative works, incorporate into other computer software,
48
+ distribute, and sublicense such enhancements or derivative works thereof,
49
+ in binary and source code form.
50
+
51
+ Classifier: Development Status :: 4 - Beta
52
+ Classifier: Intended Audience :: Science/Research
53
+ Classifier: Programming Language :: Python :: 3
54
+ Classifier: Programming Language :: Python :: 3.11
55
+ Classifier: Programming Language :: Python :: 3.12
56
+ Classifier: Programming Language :: Python :: 3.13
57
+ Classifier: Programming Language :: Python :: 3.14
58
+ Classifier: Programming Language :: C++
59
+ Classifier: Topic :: Scientific/Engineering
60
+ Project-URL: Homepage, https://github.com/LBNL-ETA/LibraryFEMTherm
61
+ Project-URL: Repository, https://github.com/LBNL-ETA/LibraryFEMTherm
62
+ Requires-Python: >=3.11
63
+ Description-Content-Type: text/markdown
64
+
65
+ # LibraryFEMTherm
66
+
67
+ C++20 static library for reading, writing, and manipulating THERM (.thmz) files. Provides data structures and serialization for thermal models, materials, boundary conditions, gases, glazing systems, and CMA data. Optional Python bindings via pybind11.
68
+
69
+ ## Requirements
70
+
71
+ - CMake 3.8+
72
+ - C++20 compiler (MSVC 2022, GCC 11+, Clang 14+)
73
+ - Ninja or Visual Studio generator
74
+ - Python 3.11+ (only when building Python bindings)
75
+
76
+ ## Building
77
+
78
+ ### C++ only (default)
79
+
80
+ ```bash
81
+ cmake --preset default
82
+ cmake --build build/default --config Release
83
+ ```
84
+
85
+ ### C++ with Python bindings
86
+
87
+ ```bash
88
+ cmake --preset python
89
+ cmake --build build/python --config Release
90
+ ```
91
+
92
+ ### Manual configuration (Visual Studio generator)
93
+
94
+ ```bash
95
+ cmake -G "Visual Studio 17 2022" -A x64 -B build -DCMAKE_BUILD_TYPE=Release
96
+ cmake --build build --config Release
97
+ ```
98
+
99
+ Add `-DBUILD_PYTHON_BINDINGS=ON` to include Python bindings.
100
+
101
+ ## CMake presets
102
+
103
+ | Preset | Description | Python bindings | C++ tests |
104
+ |-----------|------------------------------|-----------------|-----------|
105
+ | `default` | C++ only | OFF | ON |
106
+ | `python` | C++ with Python bindings | ON | ON |
107
+
108
+ CLion and VS Code automatically detect these presets.
109
+
110
+ ## Running tests
111
+
112
+ ```bash
113
+ ctest --test-dir build/python -C Release -V
114
+ ```
115
+
116
+ This runs both C++ Google Tests and Python pytest tests (when built with the `python` preset).
117
+
118
+ ## CMake options
119
+
120
+ | Option | Default | Description |
121
+ |-------------------------------|---------|--------------------------------------|
122
+ | `BUILD_PYTHON_BINDINGS` | OFF | Build Python bindings via pybind11 |
123
+ | `BUILD_LibraryFEMTHERM_TESTING` | ON | Build C++ test targets |
124
+
125
+ ## Python bindings
126
+
127
+ Install from PyPI:
128
+
129
+ ```bash
130
+ pip install libraryfemtherm
131
+ ```
132
+
133
+ Or build from source with `BUILD_PYTHON_BINDINGS=ON` (see above).
134
+
135
+ ```python
136
+ import pylibraryfemtherm as fem
137
+
138
+ # Load a THMZ file
139
+ model = fem.load_model_from_zip_file("sample-sill.thmz")
140
+ print(f"Polygons: {len(model.polygons)}")
141
+ print(f"Boundaries: {len(model.boundary_conditions)}")
142
+
143
+ # Save to XML string
144
+ xml = fem.save_model_to_string(model)
145
+
146
+ # Save to a new THMZ file
147
+ fem.save_model_to_zip_file(model, "output.thmz")
148
+
149
+ # Work with ZIP contents directly
150
+ contents = fem.zip.unzip_files("sample.thmz", [fem.zip.MATERIALS_FILE_NAME])
151
+ db = fem.MaterialsDB()
152
+ db.load_from_string(contents[fem.zip.MATERIALS_FILE_NAME])
153
+ ```
154
+
155
+ For comprehensive Python API documentation with examples, see [doc/python.md](doc/python.md).
156
+
157
+ ## Project structure
158
+
159
+ ```
160
+ src/
161
+ BCSteadyState/ # Steady-state boundary conditions
162
+ BCTransient/ # Transient boundary conditions
163
+ CMA/ # CMA (Component Modeling Approach) data
164
+ Common/ # Shared utilities
165
+ Gases/ # Gas properties and mixtures
166
+ Materials/ # Material definitions (solid, cavity, radiation)
167
+ THMZ/ # ThermModel, geometry, preferences, properties, zip I/O
168
+ LibraryUtilities/ # Common helpers
169
+ Schemas/ # XML/JSON schemas
170
+ python/
171
+ src/ # pybind11 binding source files
172
+ tests/ # pytest test suite
173
+ tst/
174
+ units/ # C++ Google Test files
175
+ products/ # Test THMZ data files
176
+ cmake/ # CMake macros and compiler config
177
+ ```
178
+
179
+ ## Dependencies (fetched automatically)
180
+
181
+ - [FileParse](https://github.com/LBNL-ETA/FileParse) - XML/JSON serialization
182
+ - [LBNLCPPCommon](https://github.com/LBNL-ETA/LBNLCPPCommon) - Common utilities
183
+ - [miniz](https://github.com/richgel999/miniz) - ZIP compression
184
+ - [pybind11](https://github.com/pybind/pybind11) v2.13.6 - Python bindings (optional)
185
+ - [Google Test](https://github.com/google/googletest) v1.13.0 - Testing (optional)