salome.kernel 9.14.0.post6__cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

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 (444) hide show
  1. salome/bin/salome/IDLparser.py +882 -0
  2. salome/bin/salome/KernelHelpersUseCases +0 -0
  3. salome/bin/salome/NSparam.py +51 -0
  4. salome/bin/salome/ORBConfigFile.py +55 -0
  5. salome/bin/salome/SALOMEDS_Client +0 -0
  6. salome/bin/salome/SALOMEDS_Server +0 -0
  7. salome/bin/salome/SALOME_ConnectionManagerServer +0 -0
  8. salome/bin/salome/SALOME_Container +0 -0
  9. salome/bin/salome/SALOME_ContainerPy.py +397 -0
  10. salome/bin/salome/SALOME_Container_No_NS_Serv +0 -0
  11. salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess +0 -0
  12. salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess_FT +0 -0
  13. salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess_Replay +0 -0
  14. salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess_Replay_FT +0 -0
  15. salome/bin/salome/SALOME_DataScopeServer +0 -0
  16. salome/bin/salome/SALOME_DataScopeServer_SSL +0 -0
  17. salome/bin/salome/SALOME_LauncherServer +0 -0
  18. salome/bin/salome/SALOME_Logger_Server +0 -0
  19. salome/bin/salome/SALOME_ModuleCatalog_Client +0 -0
  20. salome/bin/salome/SALOME_ModuleCatalog_Server +0 -0
  21. salome/bin/salome/SALOME_Registry_Server +0 -0
  22. salome/bin/salome/TestComponentPy.py +71 -0
  23. salome/bin/salome/TestContainer +0 -0
  24. salome/bin/salome/TestContainerManager +0 -0
  25. salome/bin/salome/TestLauncher +0 -0
  26. salome/bin/salome/TestLifeCycleCORBA.py +89 -0
  27. salome/bin/salome/TestLogger +0 -0
  28. salome/bin/salome/TestLogger.py +27 -0
  29. salome/bin/salome/TestModuleCatalog.py +87 -0
  30. salome/bin/salome/Test_LifeCycleCORBA +0 -0
  31. salome/bin/salome/VERSION +3 -0
  32. salome/bin/salome/addToKillList.py +35 -0
  33. salome/bin/salome/app-quickstart.py +288 -0
  34. salome/bin/salome/appli/.bashrc +50 -0
  35. salome/bin/salome/appli/extra.env.d/001.py +42 -0
  36. salome/bin/salome/appli/python_test_driver.py +148 -0
  37. salome/bin/salome/appli/salome +193 -0
  38. salome/bin/salome/appli/salome_instance.py +31 -0
  39. salome/bin/salome/appli/salome_test_driver.py +150 -0
  40. salome/bin/salome/appli/salome_test_driver_gui.py +82 -0
  41. salome/bin/salome/appli_clean.sh +53 -0
  42. salome/bin/salome/appli_gen.py +606 -0
  43. salome/bin/salome/dummyexe_loggerTraceCollector +0 -0
  44. salome/bin/salome/envSalome.py +59 -0
  45. salome/bin/salome/killSalome.py +48 -0
  46. salome/bin/salome/killSalomeWithPort.py +56 -0
  47. salome/bin/salome/prepare_generating_doc.py +104 -0
  48. salome/bin/salome/pythonpath_reduction.py +184 -0
  49. salome/bin/salome/runConsole.py +39 -0
  50. salome/bin/salome/runIDLparser +58 -0
  51. salome/bin/salome/runRemote.py +101 -0
  52. salome/bin/salome/runSalome.py +30 -0
  53. salome/bin/salome/runSalomeNoServer.py +24 -0
  54. salome/bin/salome/runSalomeOld.py +36 -0
  55. salome/bin/salome/runSalomeOnDemand.py +41 -0
  56. salome/bin/salome/salomeContext.py +36 -0
  57. salome/bin/salome/salome_process_attach +44 -0
  58. salome/bin/salome/salome_process_launcher +58 -0
  59. salome/bin/salome/setenv.py +32 -0
  60. salome/bin/salome/showNS.py +33 -0
  61. salome/bin/salome/test/kernel/ArgvKeeper/CTestTestfile.cmake +31 -0
  62. salome/bin/salome/test/kernel/ArgvKeeper/TestArgvKeeper +0 -0
  63. salome/bin/salome/test/kernel/ArgvKeeper/test_ArgvKeeper.py +34 -0
  64. salome/bin/salome/test/kernel/CTestTestfile.cmake +49 -0
  65. salome/bin/salome/test/kernel/Container/CTestTestfile.cmake +29 -0
  66. salome/bin/salome/test/kernel/Container/testProxy.py +291 -0
  67. salome/bin/salome/test/kernel/Container/testcontainer.py +106 -0
  68. salome/bin/salome/test/kernel/KernelHelpers/CTestTestfile.cmake +31 -0
  69. salome/bin/salome/test/kernel/KernelHelpers/KernelHelpersUnitTests.hxx +58 -0
  70. salome/bin/salome/test/kernel/KernelHelpers/TestKernelHelpers +0 -0
  71. salome/bin/salome/test/kernel/KernelHelpers/TestKernelHelpers.py +55 -0
  72. salome/bin/salome/test/kernel/Launcher/CTestTestfile.cmake +43 -0
  73. salome/bin/salome/test/kernel/Launcher/TestSSLAttached.py +110 -0
  74. salome/bin/salome/test/kernel/Launcher/launcher_use_case.py +65 -0
  75. salome/bin/salome/test/kernel/Launcher/testCrashProofContainer.py +423 -0
  76. salome/bin/salome/test/kernel/Launcher/testPerfLogManager1.py +382 -0
  77. salome/bin/salome/test/kernel/Launcher/test_launcher.py +674 -0
  78. salome/bin/salome/test/kernel/Launcher/test_stress.sh +45 -0
  79. salome/bin/salome/test/kernel/Launcher_SWIG/CTestTestfile.cmake +30 -0
  80. salome/bin/salome/test/kernel/Launcher_SWIG/test_swig_launcher.py +706 -0
  81. salome/bin/salome/test/kernel/LifeCycleCORBA/CTestTestfile.cmake +27 -0
  82. salome/bin/salome/test/kernel/LifeCycleCORBA/LifeCycleCORBATest.hxx +105 -0
  83. salome/bin/salome/test/kernel/LifeCycleCORBA/TestLifeCycleCORBA +0 -0
  84. salome/bin/salome/test/kernel/LifeCycleCORBA/TestLifeCycleCORBA.py +93 -0
  85. salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/CTestTestfile.cmake +40 -0
  86. salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/CatalogResources_resource.xml +15 -0
  87. salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/LifeCycleCORBA_SWIGTest.py +217 -0
  88. salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/SALOME_TestComponentPy.py +49 -0
  89. salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/TestLifeCycleCORBA_SWIG.py +100 -0
  90. salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/testcontainermanager.py +88 -0
  91. salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/testresourcemanager.py +155 -0
  92. salome/bin/salome/test/kernel/NamingService/CTestTestfile.cmake +28 -0
  93. salome/bin/salome/test/kernel/NamingService/NamingServiceTest.hxx +169 -0
  94. salome/bin/salome/test/kernel/NamingService/TestNamingService +0 -0
  95. salome/bin/salome/test/kernel/NamingService/TestNamingService.py +64 -0
  96. salome/bin/salome/test/kernel/SALOMEDS/CTestTestfile.cmake +27 -0
  97. salome/bin/salome/test/kernel/SALOMEDS/SALOMEDSTest.hxx +192 -0
  98. salome/bin/salome/test/kernel/SALOMEDS/TestSALOMEDS +0 -0
  99. salome/bin/salome/test/kernel/SALOMEDS/TestSALOMEDS.py +55 -0
  100. salome/bin/salome/test/kernel/SALOMEDSImpl/CTestTestfile.cmake +27 -0
  101. salome/bin/salome/test/kernel/SALOMEDSImpl/SALOMEDSImplTest.hxx +51 -0
  102. salome/bin/salome/test/kernel/SALOMEDSImpl/TestSALOMEDSImpl +0 -0
  103. salome/bin/salome/test/kernel/SALOMEDSImpl/TestSALOMEDSImpl.py +55 -0
  104. salome/bin/salome/test/kernel/SALOMELocalTrace/CTestTestfile.cmake +27 -0
  105. salome/bin/salome/test/kernel/SALOMELocalTrace/SALOMELocalTraceTest.hxx +59 -0
  106. salome/bin/salome/test/kernel/SALOMELocalTrace/TestSALOMELocalTrace +0 -0
  107. salome/bin/salome/test/kernel/SALOMELocalTrace/TestSALOMELocalTrace.py +40 -0
  108. salome/bin/salome/test/kernel/SALOMETraceCollector/CTestTestfile.cmake +27 -0
  109. salome/bin/salome/test/kernel/SALOMETraceCollector/SALOMETraceCollectorTest.hxx +51 -0
  110. salome/bin/salome/test/kernel/SALOMETraceCollector/TestSALOMETraceCollector +0 -0
  111. salome/bin/salome/test/kernel/SALOMETraceCollector/TestSALOMETraceCollector.py +57 -0
  112. salome/bin/salome/test/kernel/UnitTests/CTestTestfile.cmake +28 -0
  113. salome/bin/salome/test/kernel/UnitTests/UnitTests +0 -0
  114. salome/bin/salome/test/kernel/UnitTests/UnitTests.py +89 -0
  115. salome/bin/salome/test/kernel/Utils/CTestTestfile.cmake +27 -0
  116. salome/bin/salome/test/kernel/Utils/TestUtils +0 -0
  117. salome/bin/salome/test/kernel/Utils/TestUtils.py +55 -0
  118. salome/bin/salome/test/kernel/Utils/UtilsTest.hxx +58 -0
  119. salome/bin/salome/test/kernel/lib/libLifeCycleCORBATest.so +0 -0
  120. salome/bin/salome/test/kernel/lib/libNamingServiceTest.so +0 -0
  121. salome/bin/salome/test/kernel/lib/libSALOMEDSImplTest.so +0 -0
  122. salome/bin/salome/test/kernel/lib/libSALOMEDSTest.so +0 -0
  123. salome/bin/salome/test/kernel/lib/libSALOMELocalTraceTest.so +0 -0
  124. salome/bin/salome/test/kernel/lib/libSALOMETraceCollectorTest.so +0 -0
  125. salome/bin/salome/test/kernel/lib/libSalomeKernelHelpersTest.so +0 -0
  126. salome/bin/salome/test/kernel/lib/libUtilsTest.so +0 -0
  127. salome/bin/salome/testDF +0 -0
  128. salome/bin/salome/testDS +0 -0
  129. salome/bin/salome/virtual_salome.py +38 -0
  130. salome/bin/salome/waitContainers.py +82 -0
  131. salome/bin/salome/waitNS.py +31 -0
  132. salome/kernel/ArgvKeeper.py +132 -0
  133. salome/kernel/Calcium_Ports_idl.py +645 -0
  134. salome/kernel/DSC_Engines_idl.py +443 -0
  135. salome/kernel/Engines/__init__.py +24 -0
  136. salome/kernel/Engines__POA/__init__.py +24 -0
  137. salome/kernel/Help.py +141 -0
  138. salome/kernel/KernelBasis.py +463 -0
  139. salome/kernel/KernelContainer.py +81 -0
  140. salome/kernel/KernelDS.py +87 -0
  141. salome/kernel/KernelLauncher.py +117 -0
  142. salome/kernel/KernelLogger.py +75 -0
  143. salome/kernel/KernelModuleCatalog.py +76 -0
  144. salome/kernel/KernelSDS.py +92 -0
  145. salome/kernel/KernelServices.py +105 -0
  146. salome/kernel/LifeCycleCORBA.py +92 -0
  147. salome/kernel/Logger_idl.py +89 -0
  148. salome/kernel/NSTEST/__init__.py +13 -0
  149. salome/kernel/NSTEST__POA/__init__.py +13 -0
  150. salome/kernel/NSparam_impl.py +50 -0
  151. salome/kernel/NamingService.py +365 -0
  152. salome/kernel/ORBConfigFile_impl.py +102 -0
  153. salome/kernel/Palm_Ports_idl.py +162 -0
  154. salome/kernel/PortManager.py +259 -0
  155. salome/kernel/Ports/Calcium_Ports/__init__.py +13 -0
  156. salome/kernel/Ports/Palm_Ports/__init__.py +13 -0
  157. salome/kernel/Ports/__init__.py +18 -0
  158. salome/kernel/Ports__POA/Calcium_Ports/__init__.py +13 -0
  159. salome/kernel/Ports__POA/Palm_Ports/__init__.py +13 -0
  160. salome/kernel/Ports__POA/__init__.py +18 -0
  161. salome/kernel/PyInterp.py +99 -0
  162. salome/kernel/Registry/__init__.py +13 -0
  163. salome/kernel/Registry__POA/__init__.py +13 -0
  164. salome/kernel/SALOME/__init__.py +19 -0
  165. salome/kernel/SALOMEDS/__init__.py +14 -0
  166. salome/kernel/SALOMEDS_Attributes_idl.py +2288 -0
  167. salome/kernel/SALOMEDS__POA/__init__.py +14 -0
  168. salome/kernel/SALOMEDS_idl.py +1590 -0
  169. salome/kernel/SALOMEWrappedStdType.py +383 -0
  170. salome/kernel/SALOME_Comm_idl.py +1045 -0
  171. salome/kernel/SALOME_CommonTypes_idl.py +69 -0
  172. salome/kernel/SALOME_ComponentPy.py +338 -0
  173. salome/kernel/SALOME_Component_idl.py +962 -0
  174. salome/kernel/SALOME_Container.py +242 -0
  175. salome/kernel/SALOME_ContainerHelper.py +840 -0
  176. salome/kernel/SALOME_ContainerManager_idl.py +236 -0
  177. salome/kernel/SALOME_DriverPy.py +86 -0
  178. salome/kernel/SALOME_Embedded_NamingService.py +41 -0
  179. salome/kernel/SALOME_Embedded_NamingService_ClientPy.py +59 -0
  180. salome/kernel/SALOME_Embedded_NamingService_idl.py +125 -0
  181. salome/kernel/SALOME_Exception_idl.py +75 -0
  182. salome/kernel/SALOME_ExternalServerLauncher_idl.py +199 -0
  183. salome/kernel/SALOME_GenericObj_idl.py +154 -0
  184. salome/kernel/SALOME_GlobalsImpl.py +38 -0
  185. salome/kernel/SALOME_Launcher_idl.py +327 -0
  186. salome/kernel/SALOME_Locker_idl.py +185 -0
  187. salome/kernel/SALOME_LogManager.py +103 -0
  188. salome/kernel/SALOME_LogManager_idl.py +348 -0
  189. salome/kernel/SALOME_Logger/__init__.py +13 -0
  190. salome/kernel/SALOME_Logger__POA/__init__.py +13 -0
  191. salome/kernel/SALOME_MPIObject_idl.py +100 -0
  192. salome/kernel/SALOME_ModuleCatalog/__init__.py +13 -0
  193. salome/kernel/SALOME_ModuleCatalog__POA/__init__.py +13 -0
  194. salome/kernel/SALOME_ModuleCatalog_idl.py +624 -0
  195. salome/kernel/SALOME_NamingServicePy.py +313 -0
  196. salome/kernel/SALOME_PACOExtension_idl.py +292 -0
  197. salome/kernel/SALOME_ParamPorts_idl.py +102 -0
  198. salome/kernel/SALOME_Parametric_idl.py +154 -0
  199. salome/kernel/SALOME_Ports_idl.py +347 -0
  200. salome/kernel/SALOME_PyNode.py +1557 -0
  201. salome/kernel/SALOME_PyNode_idl.py +387 -0
  202. salome/kernel/SALOME_Registry_idl.py +155 -0
  203. salome/kernel/SALOME_ResourcesManager_idl.py +215 -0
  204. salome/kernel/SALOME_SDS_idl.py +1181 -0
  205. salome/kernel/SALOME_Session_idl.py +214 -0
  206. salome/kernel/SALOME_TYPES/__init__.py +14 -0
  207. salome/kernel/SALOME_TYPES__POA/__init__.py +14 -0
  208. salome/kernel/SALOME_TestComponent_idl.py +121 -0
  209. salome/kernel/SALOME_TestModuleCatalog/__init__.py +13 -0
  210. salome/kernel/SALOME_TestModuleCatalog__POA/__init__.py +13 -0
  211. salome/kernel/SALOME_TestModuleCatalog_idl.py +194 -0
  212. salome/kernel/SALOME_Trace.py +96 -0
  213. salome/kernel/SALOME_Types_idl.py +81 -0
  214. salome/kernel/SALOME__POA/__init__.py +19 -0
  215. salome/kernel/SALOME_utilities.py +63 -0
  216. salome/kernel/SalomeSDSClt.py +552 -0
  217. salome/kernel/TestKiller.py +76 -0
  218. salome/kernel/Utils_Identity.py +93 -0
  219. salome/kernel/_ArgvKeeper.so +0 -0
  220. salome/kernel/_KernelBasis.so +0 -0
  221. salome/kernel/_KernelContainer.so +0 -0
  222. salome/kernel/_KernelDS.so +0 -0
  223. salome/kernel/_KernelLauncher.so +0 -0
  224. salome/kernel/_KernelLogger.so +0 -0
  225. salome/kernel/_KernelModuleCatalog.so +0 -0
  226. salome/kernel/_KernelSDS.so +0 -0
  227. salome/kernel/_KernelServices.so +0 -0
  228. salome/kernel/_NamingService.so +0 -0
  229. salome/kernel/_calcium.so +0 -0
  230. salome/kernel/_libNOTIFICATION.so +0 -0
  231. salome/kernel/_libSALOME_Comm.so +0 -0
  232. salome/kernel/_libSALOME_LifeCycleCORBA.so +0 -0
  233. salome/kernel/_pylauncher.so +0 -0
  234. salome/kernel/addToKillList_impl.py +127 -0
  235. salome/kernel/batchmode_salome.py +295 -0
  236. salome/kernel/calcium.py +866 -0
  237. salome/kernel/dsccalcium.py +98 -0
  238. salome/kernel/iparameters.py +255 -0
  239. salome/kernel/kernel_test.py +114 -0
  240. salome/kernel/killSalomeWithPort_impl.py +518 -0
  241. salome/kernel/killSalome_impl.py +94 -0
  242. salome/kernel/launchConfigureParser.py +1234 -0
  243. salome/kernel/launcher_proxy.py +122 -0
  244. salome/kernel/libNOTIFICATION.py +119 -0
  245. salome/kernel/libSALOME_Comm.py +85 -0
  246. salome/kernel/libSALOME_LifeCycleCORBA.py +232 -0
  247. salome/kernel/main.py +8 -0
  248. salome/kernel/nameserver.py +134 -0
  249. salome/kernel/nstest_idl.py +129 -0
  250. salome/kernel/omnipatch.py +136 -0
  251. salome/kernel/orbmodule.py +246 -0
  252. salome/kernel/parseConfigFile.py +261 -0
  253. salome/kernel/pylauncher.py +883 -0
  254. salome/kernel/runConsole_impl.py +224 -0
  255. salome/kernel/runSalomeCommon.py +418 -0
  256. salome/kernel/runSalomeNoServer_impl.py +48 -0
  257. salome/kernel/runSalomeOld_impl.py +603 -0
  258. salome/kernel/runSalomeOnDemand_impl.py +72 -0
  259. salome/kernel/runSalome_impl.py +341 -0
  260. salome/kernel/runSession.py +360 -0
  261. salome/kernel/runTests.py +90 -0
  262. salome/kernel/salome/__init__.py +648 -0
  263. salome/kernel/salome/kernel/__init__.py +111 -0
  264. salome/kernel/salome/kernel/datamodeler.py +363 -0
  265. salome/kernel/salome/kernel/deprecation.py +165 -0
  266. salome/kernel/salome/kernel/diclookup.py +137 -0
  267. salome/kernel/salome/kernel/enumerate.py +232 -0
  268. salome/kernel/salome/kernel/logconfig.py +27 -0
  269. salome/kernel/salome/kernel/logger.py +290 -0
  270. salome/kernel/salome/kernel/parametric/__init__.py +26 -0
  271. salome/kernel/salome/kernel/parametric/compo_utils.py +137 -0
  272. salome/kernel/salome/kernel/parametric/pyscript_utils.py +135 -0
  273. salome/kernel/salome/kernel/parametric/study_exchange_vars.py +285 -0
  274. salome/kernel/salome/kernel/pyunittester.py +184 -0
  275. salome/kernel/salome/kernel/services.py +267 -0
  276. salome/kernel/salome/kernel/studyedit.py +637 -0
  277. salome/kernel/salome/kernel/syshelper.py +116 -0
  278. salome/kernel/salome/kernel/termcolor.py +239 -0
  279. salome/kernel/salome/kernel/testdata.py +159 -0
  280. salome/kernel/salome/kernel/threadhelper.py +385 -0
  281. salome/kernel/salome/kernel/uiexception.py +121 -0
  282. salome/kernel/salome/kernel/unittester.py +89 -0
  283. salome/kernel/salomeContextUtils.py +353 -0
  284. salome/kernel/salomeContext_impl.py +731 -0
  285. salome/kernel/salome_ComponentGUI.py +92 -0
  286. salome/kernel/salome_genericobj.py +44 -0
  287. salome/kernel/salome_iapp.py +206 -0
  288. salome/kernel/salome_instance_impl.py +109 -0
  289. salome/kernel/salome_kernel_utils.py +88 -0
  290. salome/kernel/salome_notebook.py +183 -0
  291. salome/kernel/salome_psutil.py +94 -0
  292. salome/kernel/salome_pynode.py +74 -0
  293. salome/kernel/salome_study.py +347 -0
  294. salome/kernel/salome_test.py +56 -0
  295. salome/kernel/salome_utils.py +563 -0
  296. salome/kernel/salome_version.py +164 -0
  297. salome/kernel/searchFreePort.py +130 -0
  298. salome/kernel/server.py +154 -0
  299. salome/kernel/setenv_impl.py +240 -0
  300. salome/kernel/share/salome/resources/kernel/Anita semi square.ttf +0 -0
  301. salome/kernel/share/salome/resources/kernel/CatalogModulePersonnel.xml_skel +24 -0
  302. salome/kernel/share/salome/resources/kernel/CatalogResources.xml +4 -0
  303. salome/kernel/share/salome/resources/kernel/KERNELCatalog.xml +102 -0
  304. salome/kernel/share/salome/resources/kernel/SALOMEDS_Resources +10 -0
  305. salome/kernel/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_LAN.py +19 -0
  306. salome/kernel/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_MPICH.py +18 -0
  307. salome/kernel/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_OPENMPI.py +21 -0
  308. salome/kernel/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_NO_MPI.py +25 -0
  309. salome/kernel/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_REMOTE.py +108 -0
  310. salome/kernel/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_REMOTE_OLD.py +115 -0
  311. salome/kernel/share/salome/resources/kernel/ScriptsTemplate/script_parameters.py +25 -0
  312. salome/kernel/share/salome/resources/kernel/app-template/CMakeLists.txt +125 -0
  313. salome/kernel/share/salome/resources/kernel/app-template/LICENCE +504 -0
  314. salome/kernel/share/salome/resources/kernel/app-template/README +0 -0
  315. salome/kernel/share/salome/resources/kernel/app-template/doc/CMakeLists.txt +31 -0
  316. salome/kernel/share/salome/resources/kernel/app-template/doc/README +1 -0
  317. salome/kernel/share/salome/resources/kernel/app-template/doc/conf.py.in +197 -0
  318. salome/kernel/share/salome/resources/kernel/app-template/doc/index.rst +14 -0
  319. salome/kernel/share/salome/resources/kernel/app-template/doc/intro.rst +4 -0
  320. salome/kernel/share/salome/resources/kernel/app-template/doc/link.rst +4 -0
  321. salome/kernel/share/salome/resources/kernel/app-template/resources/CMakeLists.txt +36 -0
  322. salome/kernel/share/salome/resources/kernel/app-template/resources/SalomeApp.xml.in +30 -0
  323. salome/kernel/share/salome/resources/kernel/app-template/resources/about.png +0 -0
  324. salome/kernel/share/salome/resources/kernel/app-template/resources/app_icon.png +0 -0
  325. salome/kernel/share/salome/resources/kernel/app-template/resources/app_logo.png +0 -0
  326. salome/kernel/share/salome/resources/kernel/app-template/resources/doc/CMakeLists.txt +27 -0
  327. salome/kernel/share/salome/resources/kernel/app-template/resources/doc/README +1 -0
  328. salome/kernel/share/salome/resources/kernel/app-template/resources/doc/sample.pdf +0 -0
  329. salome/kernel/share/salome/resources/kernel/app-template/resources/icon_about.png +0 -0
  330. salome/kernel/share/salome/resources/kernel/app-template/resources/splash.png +0 -0
  331. salome/kernel/share/salome/resources/kernel/app-template/src/CMakeLists.txt +22 -0
  332. salome/kernel/share/salome/resources/kernel/app-template/src/resources/CMakeLists.txt +34 -0
  333. salome/kernel/share/salome/resources/kernel/app-template/src/resources/LightApp_images.ts +23 -0
  334. salome/kernel/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_en.ts +35 -0
  335. salome/kernel/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_fr.ts +35 -0
  336. salome/kernel/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_ja.ts +35 -0
  337. salome/kernel/share/salome/resources/kernel/app-template/src/tests/CMakeLists.txt +29 -0
  338. salome/kernel/share/salome/resources/kernel/app-template/src/tests/README +1 -0
  339. salome/kernel/share/salome/resources/kernel/app-template/src/tests/helloWorld.py +1 -0
  340. salome/kernel/share/salome/resources/kernel/background.png +0 -0
  341. salome/kernel/share/salome/resources/kernel/channel.cfg +278 -0
  342. salome/kernel/share/salome/resources/kernel/testLauncher.xml +10 -0
  343. salome/kernel/version_and_config.py +24 -0
  344. salome/share/salome/resources/kernel/Anita semi square.ttf +0 -0
  345. salome/share/salome/resources/kernel/CatalogModulePersonnel.xml_skel +24 -0
  346. salome/share/salome/resources/kernel/CatalogResources.xml +4 -0
  347. salome/share/salome/resources/kernel/KERNELCatalog.xml +102 -0
  348. salome/share/salome/resources/kernel/SALOMEDS_Resources +10 -0
  349. salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_LAN.py +19 -0
  350. salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_MPICH.py +18 -0
  351. salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_OPENMPI.py +21 -0
  352. salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_NO_MPI.py +25 -0
  353. salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_REMOTE.py +108 -0
  354. salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_REMOTE_OLD.py +115 -0
  355. salome/share/salome/resources/kernel/ScriptsTemplate/script_parameters.py +25 -0
  356. salome/share/salome/resources/kernel/app-template/CMakeLists.txt +125 -0
  357. salome/share/salome/resources/kernel/app-template/LICENCE +504 -0
  358. salome/share/salome/resources/kernel/app-template/README +0 -0
  359. salome/share/salome/resources/kernel/app-template/doc/CMakeLists.txt +31 -0
  360. salome/share/salome/resources/kernel/app-template/doc/README +1 -0
  361. salome/share/salome/resources/kernel/app-template/doc/conf.py.in +197 -0
  362. salome/share/salome/resources/kernel/app-template/doc/index.rst +14 -0
  363. salome/share/salome/resources/kernel/app-template/doc/intro.rst +4 -0
  364. salome/share/salome/resources/kernel/app-template/doc/link.rst +4 -0
  365. salome/share/salome/resources/kernel/app-template/resources/CMakeLists.txt +36 -0
  366. salome/share/salome/resources/kernel/app-template/resources/SalomeApp.xml.in +30 -0
  367. salome/share/salome/resources/kernel/app-template/resources/about.png +0 -0
  368. salome/share/salome/resources/kernel/app-template/resources/app_icon.png +0 -0
  369. salome/share/salome/resources/kernel/app-template/resources/app_logo.png +0 -0
  370. salome/share/salome/resources/kernel/app-template/resources/doc/CMakeLists.txt +27 -0
  371. salome/share/salome/resources/kernel/app-template/resources/doc/README +1 -0
  372. salome/share/salome/resources/kernel/app-template/resources/doc/sample.pdf +0 -0
  373. salome/share/salome/resources/kernel/app-template/resources/icon_about.png +0 -0
  374. salome/share/salome/resources/kernel/app-template/resources/splash.png +0 -0
  375. salome/share/salome/resources/kernel/app-template/src/CMakeLists.txt +22 -0
  376. salome/share/salome/resources/kernel/app-template/src/resources/CMakeLists.txt +34 -0
  377. salome/share/salome/resources/kernel/app-template/src/resources/LightApp_images.ts +23 -0
  378. salome/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_en.ts +35 -0
  379. salome/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_fr.ts +35 -0
  380. salome/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_ja.ts +35 -0
  381. salome/share/salome/resources/kernel/app-template/src/tests/CMakeLists.txt +29 -0
  382. salome/share/salome/resources/kernel/app-template/src/tests/README +1 -0
  383. salome/share/salome/resources/kernel/app-template/src/tests/helloWorld.py +1 -0
  384. salome/share/salome/resources/kernel/background.png +0 -0
  385. salome/share/salome/resources/kernel/channel.cfg +278 -0
  386. salome/share/salome/resources/kernel/testLauncher.xml +10 -0
  387. salome_kernel-9.14.0.post6.dist-info/METADATA +25 -0
  388. salome_kernel-9.14.0.post6.dist-info/RECORD +443 -0
  389. salome_kernel-9.14.0.post6.dist-info/WHEEL +6 -0
  390. salome_kernel-9.14.0.post6.dist-info/entry_points.txt +2 -0
  391. salome_kernel-9.14.0.post6.dist-info/sboms/auditwheel.cdx.json +1 -0
  392. salome_kernel.libs/libArgvKeeper-822351d5.so +0 -0
  393. salome_kernel.libs/libCOS4-b4544fb9.so.2.5 +0 -0
  394. salome_kernel.libs/libCOSDynamic4-618dbb1d.so.2.5 +0 -0
  395. salome_kernel.libs/libCalciumC-f6af782c.so +0 -0
  396. salome_kernel.libs/libDF-281cc999.so +0 -0
  397. salome_kernel.libs/libLauncher-09c39914.so +0 -0
  398. salome_kernel.libs/libLauncherWrapHelper-5ee25ab2.so +0 -0
  399. salome_kernel.libs/libOpUtil-8d37ccc8.so +0 -0
  400. salome_kernel.libs/libRegistry-e4a63a9e.so +0 -0
  401. salome_kernel.libs/libResourcesManager-f4ef9548.so +0 -0
  402. salome_kernel.libs/libSALOMEBasics-f4d874ac.so +0 -0
  403. salome_kernel.libs/libSALOMELocalTrace-a3992e5b.so +0 -0
  404. salome_kernel.libs/libSALOMELog-55805468.so +0 -0
  405. salome_kernel.libs/libSalomeCalcium-859bd08a.so +0 -0
  406. salome_kernel.libs/libSalomeCatalog-cc0d3e4b.so +0 -0
  407. salome_kernel.libs/libSalomeCommunication-451307b4.so +0 -0
  408. salome_kernel.libs/libSalomeContainer-385f22bc.so +0 -0
  409. salome_kernel.libs/libSalomeContainerServer-22f0534a.so +0 -0
  410. salome_kernel.libs/libSalomeDS-52142005.so +0 -0
  411. salome_kernel.libs/libSalomeDSCContainer-50b97993.so +0 -0
  412. salome_kernel.libs/libSalomeDSCSuperv-c3169f30.so +0 -0
  413. salome_kernel.libs/libSalomeDSCSupervBasic-49dc930a.so +0 -0
  414. salome_kernel.libs/libSalomeDSClient-dc9947bb.so +0 -0
  415. salome_kernel.libs/libSalomeDSImpl-7984f375.so +0 -0
  416. salome_kernel.libs/libSalomeDatastream-450015c8.so +0 -0
  417. salome_kernel.libs/libSalomeGenericObj-3ccf0028.so +0 -0
  418. salome_kernel.libs/libSalomeHDFPersist-5d0aa606.so +0 -0
  419. salome_kernel.libs/libSalomeIDLKernel-2eb1ed8e.so +0 -0
  420. salome_kernel.libs/libSalomeKernelHelpers-1e3c2b19.so +0 -0
  421. salome_kernel.libs/libSalomeLauncher-59553570.so +0 -0
  422. salome_kernel.libs/libSalomeLifeCycleCORBA-d0360629.so +0 -0
  423. salome_kernel.libs/libSalomeLoggerServer-15201cc7.so +0 -0
  424. salome_kernel.libs/libSalomeNS-a03a7eba.so +0 -0
  425. salome_kernel.libs/libSalomeNotification-66efcfbd.so +0 -0
  426. salome_kernel.libs/libSalomeORB-f304f4df.so +0 -0
  427. salome_kernel.libs/libSalomePalm-72fea792.so +0 -0
  428. salome_kernel.libs/libSalomeResourcesManager-fd411949.so +0 -0
  429. salome_kernel.libs/libSalomeSDS-543d0459.so +0 -0
  430. salome_kernel.libs/libSalomeTestComponentEngine-317ebef6.so +0 -0
  431. salome_kernel.libs/libTOOLSDS-db8e8629.so +0 -0
  432. salome_kernel.libs/libbatch-779d48ee.so +0 -0
  433. salome_kernel.libs/libboost_atomic-489c2d94.so.1.81.0 +0 -0
  434. salome_kernel.libs/libboost_filesystem-e610b554.so.1.81.0 +0 -0
  435. salome_kernel.libs/libboost_system-4a7650ea.so.1.81.0 +0 -0
  436. salome_kernel.libs/libcppunit-1-17e77af1.12.so.1.0.0 +0 -0
  437. salome_kernel.libs/libhdf5-4696a94b.so.103.0.0 +0 -0
  438. salome_kernel.libs/liblzma-004595ca.so.5.2.2 +0 -0
  439. salome_kernel.libs/libomniDynamic4-9edc765d.so.2.5 +0 -0
  440. salome_kernel.libs/libomniORB4-4725824d.so.2.5 +0 -0
  441. salome_kernel.libs/libomnithread-99f9d0d3.so.4.1 +0 -0
  442. salome_kernel.libs/libwith_loggerTraceCollector-c1de231b.so +0 -0
  443. salome_kernel.libs/libwith_loggerTraceCollector.so +0 -0
  444. salome_kernel.libs/libxml2-3998bec4.so.2.9.1 +0 -0
@@ -0,0 +1,26 @@
1
+ # Copyright (C) 2011-2024 CEA, EDF, OPEN CASCADE
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ #
17
+ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
+ #
19
+
20
+ ## \defgroup salome_kernel_parametric salome.kernel.parametric
21
+ # \{
22
+ # \details Package for parametric studies
23
+ # \defgroup study_exchange_vars
24
+ # \defgroup compo_utils
25
+ # \defgroup pyscript_utils
26
+ # \}
@@ -0,0 +1,137 @@
1
+ # Copyright (C) 2011-2024 CEA, EDF, OPEN CASCADE
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ #
17
+ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
+ #
19
+
20
+ ## \defgroup compo_utils compo_utils
21
+ # \{
22
+ # \details
23
+ # This module provides utility functions for the computation codes intended for
24
+ # use in parametric studies. The computation codes must be implemented as %SALOME
25
+ # components to use these functions. If the computation code is implemented as a
26
+ # Python script or function, use module
27
+ # <a href="group__compo__utils.html">salome.kernel.parametric.compo_utils</a> instead.
28
+ # \}
29
+
30
+ """
31
+ This module provides utility functions for the computation codes intended for
32
+ use in parametric studies. The computation codes must be implemented as SALOME
33
+ components to use these functions. If the computation code is implemented as a
34
+ Python script or function, use module
35
+ :mod:`salome.kernel.parametric.pyscript_utils` instead.
36
+ """
37
+
38
+ from . import SALOME_TYPES
39
+
40
+ ## This function returns a dictionary containing the input values to be used
41
+ # in the computation code.
42
+ #
43
+ # \param deterministic_dict (dict) dictionary containing the fixed values (i.e.
44
+ # non-parametric). This dictionary can be empty if all variables are parametric.
45
+ #
46
+ # \param parametric_input (SALOME_TYPES/ParametricInput) structure containing
47
+ # the description and values of the parametric variables.
48
+ #
49
+ # \return a dictionary containing the input values for the computation code.
50
+ # \ingroup compo_utils
51
+ def create_input_dict(deterministic_dict, parametric_input):
52
+ """
53
+ This function returns a dictionary containing the input values to be used
54
+ in the computation code.
55
+
56
+ :type deterministic_dict: dict
57
+ :param deterministic_dict: dictionary containing the fixed values (i.e.
58
+ non-parametric). This dictionary can be empty
59
+ if all variables are parametric.
60
+
61
+ :type parametric_input: SALOME_TYPES/ParametricInput
62
+ :param parametric_input: structure containing the description and values
63
+ of the parametric variables.
64
+
65
+ :return: a dictionary containing the input values for the computation code.
66
+ """
67
+ # Simply get the first point from input (no time series, single observation)
68
+ input_point = parametric_input.inputValues[0][0]
69
+
70
+ if len(input_point) != len(parametric_input.inputVarList):
71
+ raise Exception("Size mismatch between inputVarList and point to evaluate")
72
+
73
+ input_dict = deterministic_dict.copy()
74
+ for i in range(len(input_point)):
75
+ input_dict[parametric_input.inputVarList[i]] = input_point[i][0]
76
+
77
+ return input_dict
78
+
79
+ ## This function returns a structure describing the output of the computation
80
+ # code in parametric studies.
81
+ #
82
+ # \param output_dict (dict) dictionary containing the output values of the
83
+ # computation code (the keys are the variable names, the values are the variable values).
84
+ #
85
+ # \param parametric_input (SALOME_TYPES/ParametricInput) structure containing
86
+ # the description and values of the parametric variables.
87
+ #
88
+ # \return a structure of type SALOME_TYPES/ParametricOutput containing the
89
+ # output of the computation code.
90
+ # \ingroup compo_utils
91
+ def create_normal_parametric_output(output_dict, parametric_input):
92
+ """
93
+ This function returns a structure describing the output of the computation
94
+ code in parametric studies.
95
+
96
+ :type output_dict: dict
97
+ :param output_dict: dictionary containing the output values of the
98
+ computation code (the keys are the variable names, the
99
+ values are the variable values).
100
+
101
+ :type parametric_input: SALOME_TYPES/ParametricInput
102
+ :param parametric_input: structure containing the description and values
103
+ of the parametric variables.
104
+
105
+ :return: a structure of type SALOME_TYPES/ParametricOutput containing the
106
+ output of the computation code.
107
+ """
108
+ output_values = [[[]]]
109
+ for output_var in parametric_input.outputVarList:
110
+ output_values[0][0].append([output_dict[output_var]])
111
+ return SALOME_TYPES.ParametricOutput(outputValues = output_values,
112
+ specificOutputInfos = [],
113
+ returnCode = 0,
114
+ errorMessage = "")
115
+
116
+ ## This function returns a structure describing the output of the computation
117
+ # code in parametric studies in case of error.
118
+ #
119
+ # \param error_message (string) the error message.
120
+ #
121
+ # \return a structure of type SALOME_TYPES/ParametricOutput describing the error.
122
+ # \ingroup compo_utils
123
+ def create_error_parametric_output(error_message):
124
+ """
125
+ This function returns a structure describing the output of the computation
126
+ code in parametric studies in case of error.
127
+
128
+ :type error_message: string
129
+ :param error_message: the error message.
130
+
131
+ :return: a structure of type SALOME_TYPES/ParametricOutput describing the
132
+ error.
133
+ """
134
+ return SALOME_TYPES.ParametricOutput(outputValues = [],
135
+ specificOutputInfos = [],
136
+ returnCode = 1,
137
+ errorMessage = error_message)
@@ -0,0 +1,135 @@
1
+ # Copyright (C) 2011-2024 CEA, EDF, OPEN CASCADE
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ #
17
+ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
+ #
19
+
20
+ ## \defgroup pyscript_utils pyscript_utils
21
+ # \{
22
+ # \details
23
+ # This module provides utility functions for the computation codes intended for
24
+ # use in parametric studies. The computation codes must be implemented as a
25
+ # Python script or function to use these functions. If the computation code is
26
+ # implemented as a %SALOME component, use module
27
+ # <a href="group__compo__utils.html">salome.kernel.parametric.compo_utils</a> instead.
28
+ # \}
29
+
30
+ """
31
+ This module provides utility functions for the computation codes intended for
32
+ use in parametric studies. The computation codes must be implemented as a
33
+ Python script or function to use these functions. If the computation code is
34
+ implemented as a SALOME component, use module
35
+ :mod:`salome.kernel.parametric.compo_utils` instead.
36
+ """
37
+
38
+ ## This function returns a dictionary containing the input values to be used
39
+ # in the computation code.
40
+ #
41
+ # \param deterministic_dict (dict) dictionary containing the fixed values (i.e.
42
+ # non-parametric). This dictionary can be empty if all variables are parametric.
43
+ #
44
+ # \param parametric_input (dict) dictionary containing the description and values
45
+ # of the parametric variables.
46
+ #
47
+ # \return a dictionary containing the input values for the computation code.
48
+ # \ingroup pyscript_utils
49
+ def create_input_dict(deterministic_dict, parametric_input):
50
+ """
51
+ This function returns a dictionary containing the input values to be used
52
+ in the computation code.
53
+
54
+ :type deterministic_dict: dict
55
+ :param deterministic_dict: dictionary containing the fixed values (i.e.
56
+ non-parametric). This dictionary can be empty
57
+ if all variables are parametric.
58
+
59
+ :type parametric_input: dict
60
+ :param parametric_input: dictionary containing the description and values
61
+ of the parametric variables.
62
+
63
+ :return: a dictionary containing the input values for the computation code.
64
+ """
65
+ # Simply get the first point from input (no time series, single observation)
66
+ input_point = parametric_input["inputValues"][0][0]
67
+
68
+ if len(input_point) != len(parametric_input["inputVarList"]):
69
+ raise Exception("Size mismatch between inputVarList and point to evaluate")
70
+
71
+ input_dict = deterministic_dict.copy()
72
+ for i in range(len(input_point)):
73
+ input_dict[parametric_input["inputVarList"][i]] = input_point[i][0]
74
+
75
+ return input_dict
76
+
77
+ ## This function returns a dictionary describing the output of the
78
+ # computation code in parametric studies.
79
+ #
80
+ # \param output_dict (dict) dictionary containing the output values of the
81
+ # computation code (the keys are the variable names, the
82
+ # values are the variable values).
83
+ #
84
+ # \param parametric_input (dict) dictionary containing the description and values
85
+ # of the parametric variables.
86
+ #
87
+ # \return a dictionary containing the representation of the output of the
88
+ # computation code.
89
+ # \ingroup pyscript_utils
90
+ def create_normal_parametric_output(output_dict, parametric_input):
91
+ """
92
+ This function returns a dictionary describing the output of the
93
+ computation code in parametric studies.
94
+
95
+ :type output_dict: dict
96
+ :param output_dict: dictionary containing the output values of the
97
+ computation code (the keys are the variable names, the
98
+ values are the variable values).
99
+
100
+ :type parametric_input: dict
101
+ :param parametric_input: dictionary containing the description and values
102
+ of the parametric variables.
103
+
104
+ :return: a dictionary containing the representation of the output of the
105
+ computation code.
106
+ """
107
+ output_values = [[[]]]
108
+ for output_var in parametric_input["outputVarList"]:
109
+ output_values[0][0].append([output_dict[output_var]])
110
+ return {"outputValues" : output_values,
111
+ "specificOutputInfos" : [],
112
+ "returnCode" : 0,
113
+ "errorMessage" : ""}
114
+
115
+ ## This function returns a dictionary describing the output of the
116
+ # computation code in parametric studies in case of error.
117
+ #
118
+ # \param error_message (string) the error message.
119
+ #
120
+ # \return a dictionary describing the error.
121
+ # \ingroup pyscript_utils
122
+ def create_error_parametric_output(error_message):
123
+ """
124
+ This function returns a dictionary describing the output of the
125
+ computation code in parametric studies in case of error.
126
+
127
+ :type error_message: string
128
+ :param error_message: the error message.
129
+
130
+ :return: a dictionary describing the error.
131
+ """
132
+ return {"outputValues" : [],
133
+ "specificOutputInfos" : [],
134
+ "returnCode" : 1,
135
+ "errorMessage" : error_message}
@@ -0,0 +1,285 @@
1
+ # Copyright (C) 2011-2024 CEA, EDF, OPEN CASCADE
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ #
17
+ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
+ #
19
+
20
+ ## \defgroup study_exchange_vars study_exchange_vars
21
+ # \{
22
+ # \details
23
+ # This module provides classes and functions to handle "Exchange Variables",
24
+ # i.e. description of variables to be exchanged between a supervision code and a
25
+ # computation code. These Exchange Variables can be stored in a SObject in
26
+ # Salome study.
27
+ # \}
28
+
29
+ """
30
+ This module provides classes and functions to handle "Exchange Variables",
31
+ i.e. description of variables to be exchanged between a supervision code and a
32
+ computation code. These Exchange Variables can be stored in a SObject in
33
+ Salome study.
34
+ """
35
+
36
+ from xml.dom.minidom import getDOMImplementation, parse
37
+ from salome.kernel.studyedit import getStudyEditor
38
+
39
+ DEFAULT_NAME = "Variables"
40
+ INPUT_VAR_NAMES = "ExchangeVariables.InputVarNames"
41
+ OUTPUT_VAR_NAMES = "ExchangeVariables.OutputVarNames"
42
+ REF_ENTRY = "ExchangeVariables.RefEntry"
43
+
44
+ ## This class describes a single variable. For now, it is only described by
45
+ # its name. Other attributes are reserved for future use.
46
+ # \ingroup study_exchange_vars
47
+ class Variable:
48
+ """
49
+ This class describes a single variable. For now, it is only described by
50
+ its name. Other attributes are reserved for future use.
51
+ """
52
+
53
+ def __init__(self, name, dimension = None, minValue = None, maxValue = None,
54
+ initialValue = None):
55
+ if dimension is None:
56
+ dimension = []
57
+ self.name = name
58
+
59
+ # Reserved for future use
60
+ self.dimension = dimension
61
+ self.minValue = minValue
62
+ self.maxValue = maxValue
63
+ self.initialValue = initialValue
64
+
65
+ ## This class describes "Exchange Variables", i.e. a structure containing all
66
+ # the necessary information to exchange variables between a supervision code
67
+ # and a computation code.
68
+ #
69
+ # \param inputVarList This instance attribute is a list of \b Variable objects,
70
+ # describing the input variables for the computation code.
71
+ #
72
+ # \param outputVarList This instance attribute is a list of \b Variable objects,
73
+ # describing the output variables for the computation code.
74
+ #
75
+ # \param refEntry This instance attribute is optional and can be used to store a
76
+ # reference to a Salome entry containing an "Exchange Variable" SObject
77
+ # that was used to build this one (when the current object has been built
78
+ # by selecting variables of interest in a list of potential variables).
79
+ # \ingroup study_exchange_vars
80
+ class ExchangeVariables:
81
+ """
82
+ This class describes "Exchange Variables", i.e. a structure containing all
83
+ the necessary information to exchange variables between a supervision code
84
+ and a computation code.
85
+
86
+ .. attribute:: inputVarList
87
+
88
+ This instance attribute is a list of :class:`Variable` objects,
89
+ describing the input variables for the computation code.
90
+
91
+ .. attribute:: outputVarList
92
+
93
+ This instance attribute is a list of :class:`Variable` objects,
94
+ describing the output variables for the computation code.
95
+
96
+ .. attribute:: refEntry
97
+
98
+ This instance attribute is optional and can be used to store a
99
+ reference to a Salome entry containing an "Exchange Variable" SObject
100
+ that was used to build this one (when the current object has been built
101
+ by selecting variables of interest in a list of potential variables).
102
+
103
+ """
104
+
105
+ def __init__(self, inputVarList = None, outputVarList = None,
106
+ refEntry = None):
107
+ if inputVarList is None:
108
+ inputVarList = []
109
+ if outputVarList is None:
110
+ outputVarList = []
111
+ self.inputVarList = inputVarList
112
+ self.outputVarList = outputVarList
113
+ self.refEntry = refEntry
114
+
115
+ ## Save this object to an XML file.
116
+ #
117
+ # \param filepath (string) path of the XML file.
118
+ def saveToXmlFile(self, filepath):
119
+ """
120
+ Save this object to an XML file.
121
+
122
+ :type filepath: string
123
+ :param filepath: path of the XML file.
124
+
125
+ """
126
+ doc = getDOMImplementation().createDocument(None, "variables", None)
127
+ top_el = doc.documentElement
128
+ top_el.setAttribute("version", "6.4")
129
+ input_variables_el = doc.createElement("input_variables")
130
+ top_el.appendChild(input_variables_el)
131
+ output_variables_el = doc.createElement("output_variables")
132
+ top_el.appendChild(output_variables_el)
133
+ for input_var in self.inputVarList:
134
+ input_var_el = doc.createElement("variable")
135
+ input_var_el.setAttribute("name", input_var.name)
136
+ input_variables_el.appendChild(input_var_el)
137
+ for output_var in self.outputVarList:
138
+ output_var_el = doc.createElement("variable")
139
+ output_var_el.setAttribute("name", output_var.name)
140
+ output_variables_el.appendChild(output_var_el)
141
+ f = open(filepath, "w")
142
+ f.write(doc.toprettyxml(indent = " "))
143
+ f.close()
144
+
145
+ ## Create a SObject to store an \b ExchangeVariables instance.
146
+ #
147
+ # \param fatherSobj (SObject) parent of the SObject to create.
148
+ #
149
+ # \param exchangeVariables (ExchangeVariables) \b ExchangeVariables instance to store in
150
+ # Salome study.
151
+ #
152
+ # \param name (string) name of the SObject to create.
153
+ #
154
+ # \param icon (string) icon of the SObject to create.
155
+ #
156
+ # \param typeId (integer) type of the SObject to create.
157
+ #
158
+ # \return the newly created SObject.
159
+ # \ingroup study_exchange_vars
160
+ def createSObjectForExchangeVariables(fatherSobj, exchangeVariables,
161
+ name = DEFAULT_NAME,
162
+ icon = None, typeId = None):
163
+ """
164
+ Create a SObject to store an :class:`ExchangeVariables` instance.
165
+
166
+ :type fatherSobj: SObject
167
+ :param fatherSobj: parent of the SObject to create.
168
+
169
+ :type exchangeVariables: :class:`ExchangeVariables`
170
+ :param exchangeVariables: :class:`ExchangeVariables` instance to store in
171
+ Salome study.
172
+
173
+ :type name: string
174
+ :param name: name of the SObject to create.
175
+
176
+ :type icon: string
177
+ :param icon: icon of the SObject to create.
178
+
179
+ :type typeId: integer
180
+ :param typeId: type of the SObject to create.
181
+
182
+ :return: the newly created SObject.
183
+
184
+ """
185
+ editor = getStudyEditor()
186
+ sobj = editor.createItem(fatherSobj,
187
+ name = name,
188
+ icon = icon,
189
+ typeId = typeId)
190
+ _setSObjectForExchangeVariables(editor, sobj, exchangeVariables)
191
+
192
+ ## Update an existing SObject storing an \b ExchangeVariables instance.
193
+ #
194
+ # \param sobj (SObject) the SObject to update.
195
+ #
196
+ # See \b createSObjectForExchangeVariables() for the description of the
197
+ # other parameters.
198
+ # \ingroup study_exchange_vars
199
+ def updateSObjectForExchangeVariables(sobj, exchangeVariables,
200
+ name = DEFAULT_NAME,
201
+ icon = None, typeId = None):
202
+ """
203
+ Update an existing SObject storing an :class:`ExchangeVariables` instance.
204
+
205
+ :type sobj: SObject
206
+ :param sobj: the SObject to update.
207
+
208
+ See :func:`createSObjectForExchangeVariables` for the description of the
209
+ other parameters.
210
+
211
+ """
212
+ editor = getStudyEditor()
213
+ editor.setItem(sobj, name = name, icon = icon, typeId = typeId)
214
+ editor.builder.RemoveAttribute(sobj, "AttributeParameter")
215
+ _setSObjectForExchangeVariables(editor, sobj, exchangeVariables)
216
+
217
+ def _setSObjectForExchangeVariables(editor, sobj, exchangeVariables):
218
+ attr = editor.builder.FindOrCreateAttribute(sobj, "AttributeParameter")
219
+ attr.SetStrArray(INPUT_VAR_NAMES,
220
+ [x.name for x in exchangeVariables.inputVarList])
221
+ attr.SetStrArray(OUTPUT_VAR_NAMES,
222
+ [x.name for x in exchangeVariables.outputVarList])
223
+ if exchangeVariables.refEntry is not None:
224
+ attr.SetString(REF_ENTRY, exchangeVariables.refEntry)
225
+
226
+ ## Get an \b ExchangeVariables instance from a SObject that stores it.
227
+ #
228
+ # \param sobj (SObject) the SObject from which to read the \b ExchangeVariables
229
+ # instance.
230
+ #
231
+ # \return the newly created \b ExchangeVariables instance.
232
+ # \ingroup study_exchange_vars
233
+ def getExchangeVariablesFromSObject(sobj):
234
+ """
235
+ Get an :class:`ExchangeVariables` instance from a SObject that stores it.
236
+
237
+ :type sobj: SObject
238
+ :param sobj: the SObject from which to read the :class:`ExchangeVariables`
239
+ instance.
240
+
241
+ :return: the newly created :class:`ExchangeVariables` instance.
242
+
243
+ """
244
+ (found, attr) = sobj.FindAttribute("AttributeParameter")
245
+ if not found:
246
+ return None
247
+ refEntry = None
248
+ if attr.IsSet(REF_ENTRY, 3):
249
+ refEntry = attr.GetString(REF_ENTRY)
250
+ return ExchangeVariables(
251
+ [Variable(name) for name in attr.GetStrArray(INPUT_VAR_NAMES)],
252
+ [Variable(name) for name in attr.GetStrArray(OUTPUT_VAR_NAMES)],
253
+ refEntry)
254
+
255
+ ## Load an \b ExchangeVariables instance from an XML file.
256
+ #
257
+ # \param filepath (string) path of the XML file to load.
258
+ #
259
+ # \return the newly created \b ExchangeVariables instance.
260
+ # \ingroup study_exchange_vars
261
+ def loadExchangeVariablesFromXmlFile(filepath):
262
+ """
263
+ Load an :class:`ExchangeVariables` instance from an XML file.
264
+
265
+ :type filepath: string
266
+ :param filepath: path of the XML file to load.
267
+
268
+ :return: the newly created :class:`ExchangeVariables` instance.
269
+
270
+ """
271
+ doc = parse(filepath)
272
+ top_el = doc.documentElement
273
+ # Check version
274
+ version = top_el.getAttribute("version")
275
+ if version != "6.4":
276
+ raise Exception(self.tr("Unsupported version: %s" % version))
277
+ input_variables_el = top_el.getElementsByTagName("input_variables")[0]
278
+ input_var_list = [Variable(input_var_el.getAttribute("name"))
279
+ for input_var_el
280
+ in input_variables_el.getElementsByTagName("variable")]
281
+ output_variables_el = top_el.getElementsByTagName("output_variables")[0]
282
+ output_var_list = [Variable(output_var_el.getAttribute("name"))
283
+ for output_var_el
284
+ in output_variables_el.getElementsByTagName("variable")]
285
+ return ExchangeVariables(input_var_list, output_var_list)