salome.kernel 9.14.0__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.
Potentially problematic release.
This version of salome.kernel might be problematic. Click here for more details.
- salome/bin/salome/IDLparser.py +882 -0
- salome/bin/salome/KernelHelpersUseCases +0 -0
- salome/bin/salome/NSparam.py +51 -0
- salome/bin/salome/ORBConfigFile.py +55 -0
- salome/bin/salome/SALOMEDS_Client +0 -0
- salome/bin/salome/SALOMEDS_Server +0 -0
- salome/bin/salome/SALOME_ConnectionManagerServer +0 -0
- salome/bin/salome/SALOME_Container +0 -0
- salome/bin/salome/SALOME_ContainerPy.py +397 -0
- salome/bin/salome/SALOME_Container_No_NS_Serv +0 -0
- salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess +0 -0
- salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess_FT +0 -0
- salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess_Replay +0 -0
- salome/bin/salome/SALOME_Container_No_NS_Serv_OutProcess_Replay_FT +0 -0
- salome/bin/salome/SALOME_DataScopeServer +0 -0
- salome/bin/salome/SALOME_DataScopeServer_SSL +0 -0
- salome/bin/salome/SALOME_LauncherServer +0 -0
- salome/bin/salome/SALOME_Logger_Server +0 -0
- salome/bin/salome/SALOME_ModuleCatalog_Client +0 -0
- salome/bin/salome/SALOME_ModuleCatalog_Server +0 -0
- salome/bin/salome/SALOME_Registry_Server +0 -0
- salome/bin/salome/TestComponentPy.py +71 -0
- salome/bin/salome/TestContainer +0 -0
- salome/bin/salome/TestContainerManager +0 -0
- salome/bin/salome/TestLauncher +0 -0
- salome/bin/salome/TestLifeCycleCORBA.py +89 -0
- salome/bin/salome/TestLogger +0 -0
- salome/bin/salome/TestLogger.py +27 -0
- salome/bin/salome/TestModuleCatalog.py +87 -0
- salome/bin/salome/Test_LifeCycleCORBA +0 -0
- salome/bin/salome/VERSION +3 -0
- salome/bin/salome/addToKillList.py +35 -0
- salome/bin/salome/app-quickstart.py +288 -0
- salome/bin/salome/appli/.bashrc +50 -0
- salome/bin/salome/appli/extra.env.d/001.py +39 -0
- salome/bin/salome/appli/python_test_driver.py +148 -0
- salome/bin/salome/appli/salome +193 -0
- salome/bin/salome/appli/salome_instance.py +31 -0
- salome/bin/salome/appli/salome_test_driver.py +150 -0
- salome/bin/salome/appli/salome_test_driver_gui.py +82 -0
- salome/bin/salome/appli_clean.sh +53 -0
- salome/bin/salome/appli_gen.py +606 -0
- salome/bin/salome/dummyexe_loggerTraceCollector +0 -0
- salome/bin/salome/envSalome.py +59 -0
- salome/bin/salome/killSalome.py +48 -0
- salome/bin/salome/killSalomeWithPort.py +56 -0
- salome/bin/salome/prepare_generating_doc.py +104 -0
- salome/bin/salome/pythonpath_reduction.py +184 -0
- salome/bin/salome/runConsole.py +39 -0
- salome/bin/salome/runIDLparser +58 -0
- salome/bin/salome/runRemote.py +101 -0
- salome/bin/salome/runSalome.py +30 -0
- salome/bin/salome/runSalomeNoServer.py +24 -0
- salome/bin/salome/runSalomeOld.py +36 -0
- salome/bin/salome/runSalomeOnDemand.py +41 -0
- salome/bin/salome/salomeContext.py +36 -0
- salome/bin/salome/salome_process_attach +44 -0
- salome/bin/salome/salome_process_launcher +58 -0
- salome/bin/salome/setenv.py +32 -0
- salome/bin/salome/showNS.py +33 -0
- salome/bin/salome/test/kernel/ArgvKeeper/CTestTestfile.cmake +31 -0
- salome/bin/salome/test/kernel/ArgvKeeper/TestArgvKeeper +0 -0
- salome/bin/salome/test/kernel/ArgvKeeper/test_ArgvKeeper.py +34 -0
- salome/bin/salome/test/kernel/CTestTestfile.cmake +49 -0
- salome/bin/salome/test/kernel/Container/CTestTestfile.cmake +29 -0
- salome/bin/salome/test/kernel/Container/testProxy.py +291 -0
- salome/bin/salome/test/kernel/Container/testcontainer.py +106 -0
- salome/bin/salome/test/kernel/KernelHelpers/CTestTestfile.cmake +31 -0
- salome/bin/salome/test/kernel/KernelHelpers/KernelHelpersUnitTests.hxx +58 -0
- salome/bin/salome/test/kernel/KernelHelpers/TestKernelHelpers +0 -0
- salome/bin/salome/test/kernel/KernelHelpers/TestKernelHelpers.py +55 -0
- salome/bin/salome/test/kernel/Launcher/CTestTestfile.cmake +43 -0
- salome/bin/salome/test/kernel/Launcher/TestSSLAttached.py +110 -0
- salome/bin/salome/test/kernel/Launcher/launcher_use_case.py +65 -0
- salome/bin/salome/test/kernel/Launcher/testCrashProofContainer.py +423 -0
- salome/bin/salome/test/kernel/Launcher/testPerfLogManager1.py +382 -0
- salome/bin/salome/test/kernel/Launcher/test_launcher.py +674 -0
- salome/bin/salome/test/kernel/Launcher/test_stress.sh +45 -0
- salome/bin/salome/test/kernel/Launcher_SWIG/CTestTestfile.cmake +30 -0
- salome/bin/salome/test/kernel/Launcher_SWIG/test_swig_launcher.py +706 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA/CTestTestfile.cmake +27 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA/LifeCycleCORBATest.hxx +105 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA/TestLifeCycleCORBA +0 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA/TestLifeCycleCORBA.py +93 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/CTestTestfile.cmake +40 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/CatalogResources_resource.xml +15 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/LifeCycleCORBA_SWIGTest.py +217 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/SALOME_TestComponentPy.py +49 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/TestLifeCycleCORBA_SWIG.py +100 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/testcontainermanager.py +88 -0
- salome/bin/salome/test/kernel/LifeCycleCORBA_SWIG/testresourcemanager.py +155 -0
- salome/bin/salome/test/kernel/NamingService/CTestTestfile.cmake +28 -0
- salome/bin/salome/test/kernel/NamingService/NamingServiceTest.hxx +169 -0
- salome/bin/salome/test/kernel/NamingService/TestNamingService +0 -0
- salome/bin/salome/test/kernel/NamingService/TestNamingService.py +64 -0
- salome/bin/salome/test/kernel/SALOMEDS/CTestTestfile.cmake +27 -0
- salome/bin/salome/test/kernel/SALOMEDS/SALOMEDSTest.hxx +192 -0
- salome/bin/salome/test/kernel/SALOMEDS/TestSALOMEDS +0 -0
- salome/bin/salome/test/kernel/SALOMEDS/TestSALOMEDS.py +55 -0
- salome/bin/salome/test/kernel/SALOMEDSImpl/CTestTestfile.cmake +27 -0
- salome/bin/salome/test/kernel/SALOMEDSImpl/SALOMEDSImplTest.hxx +51 -0
- salome/bin/salome/test/kernel/SALOMEDSImpl/TestSALOMEDSImpl +0 -0
- salome/bin/salome/test/kernel/SALOMEDSImpl/TestSALOMEDSImpl.py +55 -0
- salome/bin/salome/test/kernel/SALOMELocalTrace/CTestTestfile.cmake +27 -0
- salome/bin/salome/test/kernel/SALOMELocalTrace/SALOMELocalTraceTest.hxx +59 -0
- salome/bin/salome/test/kernel/SALOMELocalTrace/TestSALOMELocalTrace +0 -0
- salome/bin/salome/test/kernel/SALOMELocalTrace/TestSALOMELocalTrace.py +40 -0
- salome/bin/salome/test/kernel/SALOMETraceCollector/CTestTestfile.cmake +27 -0
- salome/bin/salome/test/kernel/SALOMETraceCollector/SALOMETraceCollectorTest.hxx +51 -0
- salome/bin/salome/test/kernel/SALOMETraceCollector/TestSALOMETraceCollector +0 -0
- salome/bin/salome/test/kernel/SALOMETraceCollector/TestSALOMETraceCollector.py +57 -0
- salome/bin/salome/test/kernel/UnitTests/CTestTestfile.cmake +28 -0
- salome/bin/salome/test/kernel/UnitTests/UnitTests +0 -0
- salome/bin/salome/test/kernel/UnitTests/UnitTests.py +89 -0
- salome/bin/salome/test/kernel/Utils/CTestTestfile.cmake +27 -0
- salome/bin/salome/test/kernel/Utils/TestUtils +0 -0
- salome/bin/salome/test/kernel/Utils/TestUtils.py +55 -0
- salome/bin/salome/test/kernel/Utils/UtilsTest.hxx +58 -0
- salome/bin/salome/test/kernel/lib/libLifeCycleCORBATest.so +0 -0
- salome/bin/salome/test/kernel/lib/libNamingServiceTest.so +0 -0
- salome/bin/salome/test/kernel/lib/libSALOMEDSImplTest.so +0 -0
- salome/bin/salome/test/kernel/lib/libSALOMEDSTest.so +0 -0
- salome/bin/salome/test/kernel/lib/libSALOMELocalTraceTest.so +0 -0
- salome/bin/salome/test/kernel/lib/libSALOMETraceCollectorTest.so +0 -0
- salome/bin/salome/test/kernel/lib/libSalomeKernelHelpersTest.so +0 -0
- salome/bin/salome/test/kernel/lib/libUtilsTest.so +0 -0
- salome/bin/salome/testDF +0 -0
- salome/bin/salome/testDS +0 -0
- salome/bin/salome/virtual_salome.py +38 -0
- salome/bin/salome/waitContainers.py +82 -0
- salome/bin/salome/waitNS.py +31 -0
- salome/kernel/ArgvKeeper.py +132 -0
- salome/kernel/Calcium_Ports_idl.py +645 -0
- salome/kernel/DSC_Engines_idl.py +443 -0
- salome/kernel/Engines/__init__.py +24 -0
- salome/kernel/Engines__POA/__init__.py +24 -0
- salome/kernel/Help.py +141 -0
- salome/kernel/KernelBasis.py +463 -0
- salome/kernel/KernelContainer.py +81 -0
- salome/kernel/KernelDS.py +87 -0
- salome/kernel/KernelLauncher.py +117 -0
- salome/kernel/KernelLogger.py +75 -0
- salome/kernel/KernelModuleCatalog.py +76 -0
- salome/kernel/KernelSDS.py +92 -0
- salome/kernel/KernelServices.py +105 -0
- salome/kernel/LifeCycleCORBA.py +92 -0
- salome/kernel/Logger_idl.py +89 -0
- salome/kernel/NSTEST/__init__.py +13 -0
- salome/kernel/NSTEST__POA/__init__.py +13 -0
- salome/kernel/NSparam_impl.py +50 -0
- salome/kernel/NamingService.py +365 -0
- salome/kernel/ORBConfigFile_impl.py +102 -0
- salome/kernel/Palm_Ports_idl.py +162 -0
- salome/kernel/PortManager.py +259 -0
- salome/kernel/Ports/Calcium_Ports/__init__.py +13 -0
- salome/kernel/Ports/Palm_Ports/__init__.py +13 -0
- salome/kernel/Ports/__init__.py +18 -0
- salome/kernel/Ports__POA/Calcium_Ports/__init__.py +13 -0
- salome/kernel/Ports__POA/Palm_Ports/__init__.py +13 -0
- salome/kernel/Ports__POA/__init__.py +18 -0
- salome/kernel/PyInterp.py +99 -0
- salome/kernel/Registry/__init__.py +13 -0
- salome/kernel/Registry__POA/__init__.py +13 -0
- salome/kernel/SALOME/__init__.py +19 -0
- salome/kernel/SALOMEDS/__init__.py +14 -0
- salome/kernel/SALOMEDS_Attributes_idl.py +2288 -0
- salome/kernel/SALOMEDS__POA/__init__.py +14 -0
- salome/kernel/SALOMEDS_idl.py +1590 -0
- salome/kernel/SALOMEWrappedStdType.py +383 -0
- salome/kernel/SALOME_Comm_idl.py +1045 -0
- salome/kernel/SALOME_CommonTypes_idl.py +69 -0
- salome/kernel/SALOME_ComponentPy.py +338 -0
- salome/kernel/SALOME_Component_idl.py +962 -0
- salome/kernel/SALOME_Container.py +242 -0
- salome/kernel/SALOME_ContainerHelper.py +840 -0
- salome/kernel/SALOME_ContainerManager_idl.py +236 -0
- salome/kernel/SALOME_DriverPy.py +86 -0
- salome/kernel/SALOME_Embedded_NamingService.py +41 -0
- salome/kernel/SALOME_Embedded_NamingService_ClientPy.py +59 -0
- salome/kernel/SALOME_Embedded_NamingService_idl.py +125 -0
- salome/kernel/SALOME_Exception_idl.py +75 -0
- salome/kernel/SALOME_ExternalServerLauncher_idl.py +199 -0
- salome/kernel/SALOME_GenericObj_idl.py +154 -0
- salome/kernel/SALOME_GlobalsImpl.py +38 -0
- salome/kernel/SALOME_Launcher_idl.py +327 -0
- salome/kernel/SALOME_Locker_idl.py +185 -0
- salome/kernel/SALOME_LogManager.py +103 -0
- salome/kernel/SALOME_LogManager_idl.py +348 -0
- salome/kernel/SALOME_Logger/__init__.py +13 -0
- salome/kernel/SALOME_Logger__POA/__init__.py +13 -0
- salome/kernel/SALOME_MPIObject_idl.py +100 -0
- salome/kernel/SALOME_ModuleCatalog/__init__.py +13 -0
- salome/kernel/SALOME_ModuleCatalog__POA/__init__.py +13 -0
- salome/kernel/SALOME_ModuleCatalog_idl.py +624 -0
- salome/kernel/SALOME_NamingServicePy.py +313 -0
- salome/kernel/SALOME_PACOExtension_idl.py +292 -0
- salome/kernel/SALOME_ParamPorts_idl.py +102 -0
- salome/kernel/SALOME_Parametric_idl.py +154 -0
- salome/kernel/SALOME_Ports_idl.py +347 -0
- salome/kernel/SALOME_PyNode.py +1557 -0
- salome/kernel/SALOME_PyNode_idl.py +387 -0
- salome/kernel/SALOME_Registry_idl.py +155 -0
- salome/kernel/SALOME_ResourcesManager_idl.py +215 -0
- salome/kernel/SALOME_SDS_idl.py +1181 -0
- salome/kernel/SALOME_Session_idl.py +214 -0
- salome/kernel/SALOME_TYPES/__init__.py +14 -0
- salome/kernel/SALOME_TYPES__POA/__init__.py +14 -0
- salome/kernel/SALOME_TestComponent_idl.py +121 -0
- salome/kernel/SALOME_TestModuleCatalog/__init__.py +13 -0
- salome/kernel/SALOME_TestModuleCatalog__POA/__init__.py +13 -0
- salome/kernel/SALOME_TestModuleCatalog_idl.py +194 -0
- salome/kernel/SALOME_Trace.py +96 -0
- salome/kernel/SALOME_Types_idl.py +81 -0
- salome/kernel/SALOME__POA/__init__.py +19 -0
- salome/kernel/SALOME_utilities.py +63 -0
- salome/kernel/SalomeSDSClt.py +552 -0
- salome/kernel/TestKiller.py +76 -0
- salome/kernel/Utils_Identity.py +93 -0
- salome/kernel/_ArgvKeeper.so +0 -0
- salome/kernel/_KernelBasis.so +0 -0
- salome/kernel/_KernelContainer.so +0 -0
- salome/kernel/_KernelDS.so +0 -0
- salome/kernel/_KernelLauncher.so +0 -0
- salome/kernel/_KernelLogger.so +0 -0
- salome/kernel/_KernelModuleCatalog.so +0 -0
- salome/kernel/_KernelSDS.so +0 -0
- salome/kernel/_KernelServices.so +0 -0
- salome/kernel/_NamingService.so +0 -0
- salome/kernel/_calcium.so +0 -0
- salome/kernel/_libNOTIFICATION.so +0 -0
- salome/kernel/_libSALOME_Comm.so +0 -0
- salome/kernel/_libSALOME_LifeCycleCORBA.so +0 -0
- salome/kernel/_pylauncher.so +0 -0
- salome/kernel/addToKillList_impl.py +127 -0
- salome/kernel/batchmode_salome.py +295 -0
- salome/kernel/calcium.py +866 -0
- salome/kernel/dsccalcium.py +98 -0
- salome/kernel/iparameters.py +255 -0
- salome/kernel/kernel_test.py +114 -0
- salome/kernel/killSalomeWithPort_impl.py +518 -0
- salome/kernel/killSalome_impl.py +94 -0
- salome/kernel/launchConfigureParser.py +1234 -0
- salome/kernel/launcher_proxy.py +122 -0
- salome/kernel/libNOTIFICATION.py +119 -0
- salome/kernel/libSALOME_Comm.py +85 -0
- salome/kernel/libSALOME_LifeCycleCORBA.py +232 -0
- salome/kernel/main.py +8 -0
- salome/kernel/nameserver.py +134 -0
- salome/kernel/nstest_idl.py +129 -0
- salome/kernel/omnipatch.py +136 -0
- salome/kernel/orbmodule.py +246 -0
- salome/kernel/parseConfigFile.py +261 -0
- salome/kernel/pylauncher.py +883 -0
- salome/kernel/runConsole_impl.py +224 -0
- salome/kernel/runSalomeCommon.py +418 -0
- salome/kernel/runSalomeNoServer_impl.py +48 -0
- salome/kernel/runSalomeOld_impl.py +603 -0
- salome/kernel/runSalomeOnDemand_impl.py +72 -0
- salome/kernel/runSalome_impl.py +341 -0
- salome/kernel/runSession.py +360 -0
- salome/kernel/runTests.py +90 -0
- salome/kernel/salome/__init__.py +646 -0
- salome/kernel/salome/kernel/__init__.py +111 -0
- salome/kernel/salome/kernel/datamodeler.py +363 -0
- salome/kernel/salome/kernel/deprecation.py +165 -0
- salome/kernel/salome/kernel/diclookup.py +137 -0
- salome/kernel/salome/kernel/enumerate.py +232 -0
- salome/kernel/salome/kernel/logconfig.py +27 -0
- salome/kernel/salome/kernel/logger.py +290 -0
- salome/kernel/salome/kernel/parametric/__init__.py +26 -0
- salome/kernel/salome/kernel/parametric/compo_utils.py +137 -0
- salome/kernel/salome/kernel/parametric/pyscript_utils.py +135 -0
- salome/kernel/salome/kernel/parametric/study_exchange_vars.py +285 -0
- salome/kernel/salome/kernel/pyunittester.py +184 -0
- salome/kernel/salome/kernel/services.py +267 -0
- salome/kernel/salome/kernel/studyedit.py +637 -0
- salome/kernel/salome/kernel/syshelper.py +116 -0
- salome/kernel/salome/kernel/termcolor.py +239 -0
- salome/kernel/salome/kernel/testdata.py +159 -0
- salome/kernel/salome/kernel/threadhelper.py +385 -0
- salome/kernel/salome/kernel/uiexception.py +121 -0
- salome/kernel/salome/kernel/unittester.py +89 -0
- salome/kernel/salomeContextUtils.py +353 -0
- salome/kernel/salomeContext_impl.py +731 -0
- salome/kernel/salome_ComponentGUI.py +92 -0
- salome/kernel/salome_genericobj.py +44 -0
- salome/kernel/salome_iapp.py +206 -0
- salome/kernel/salome_instance_impl.py +109 -0
- salome/kernel/salome_kernel_utils.py +88 -0
- salome/kernel/salome_notebook.py +183 -0
- salome/kernel/salome_psutil.py +94 -0
- salome/kernel/salome_pynode.py +74 -0
- salome/kernel/salome_study.py +347 -0
- salome/kernel/salome_test.py +56 -0
- salome/kernel/salome_utils.py +563 -0
- salome/kernel/salome_version.py +164 -0
- salome/kernel/searchFreePort.py +130 -0
- salome/kernel/server.py +154 -0
- salome/kernel/setenv_impl.py +240 -0
- salome/kernel/version_and_config.py +24 -0
- salome/share/salome/resources/kernel/Anita semi square.ttf +0 -0
- salome/share/salome/resources/kernel/CatalogModulePersonnel.xml_skel +24 -0
- salome/share/salome/resources/kernel/CatalogResources.xml +4 -0
- salome/share/salome/resources/kernel/KERNELCatalog.xml +102 -0
- salome/share/salome/resources/kernel/SALOMEDS_Resources +10 -0
- salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_LAN.py +19 -0
- salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_MPICH.py +18 -0
- salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_MPI_OPENMPI.py +21 -0
- salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_LOCAL_NO_MPI.py +25 -0
- salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_REMOTE.py +108 -0
- salome/share/salome/resources/kernel/ScriptsTemplate/SALOME_CM_REMOTE_OLD.py +115 -0
- salome/share/salome/resources/kernel/ScriptsTemplate/script_parameters.py +25 -0
- salome/share/salome/resources/kernel/app-template/CMakeLists.txt +125 -0
- salome/share/salome/resources/kernel/app-template/LICENCE +504 -0
- salome/share/salome/resources/kernel/app-template/README +0 -0
- salome/share/salome/resources/kernel/app-template/doc/CMakeLists.txt +31 -0
- salome/share/salome/resources/kernel/app-template/doc/README +1 -0
- salome/share/salome/resources/kernel/app-template/doc/conf.py.in +197 -0
- salome/share/salome/resources/kernel/app-template/doc/index.rst +14 -0
- salome/share/salome/resources/kernel/app-template/doc/intro.rst +4 -0
- salome/share/salome/resources/kernel/app-template/doc/link.rst +4 -0
- salome/share/salome/resources/kernel/app-template/resources/CMakeLists.txt +36 -0
- salome/share/salome/resources/kernel/app-template/resources/SalomeApp.xml.in +30 -0
- salome/share/salome/resources/kernel/app-template/resources/about.png +0 -0
- salome/share/salome/resources/kernel/app-template/resources/app_icon.png +0 -0
- salome/share/salome/resources/kernel/app-template/resources/app_logo.png +0 -0
- salome/share/salome/resources/kernel/app-template/resources/doc/CMakeLists.txt +27 -0
- salome/share/salome/resources/kernel/app-template/resources/doc/README +1 -0
- salome/share/salome/resources/kernel/app-template/resources/doc/sample.pdf +0 -0
- salome/share/salome/resources/kernel/app-template/resources/icon_about.png +0 -0
- salome/share/salome/resources/kernel/app-template/resources/splash.png +0 -0
- salome/share/salome/resources/kernel/app-template/src/CMakeLists.txt +22 -0
- salome/share/salome/resources/kernel/app-template/src/resources/CMakeLists.txt +34 -0
- salome/share/salome/resources/kernel/app-template/src/resources/LightApp_images.ts +23 -0
- salome/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_en.ts +35 -0
- salome/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_fr.ts +35 -0
- salome/share/salome/resources/kernel/app-template/src/resources/LightApp_msg_ja.ts +35 -0
- salome/share/salome/resources/kernel/app-template/src/tests/CMakeLists.txt +29 -0
- salome/share/salome/resources/kernel/app-template/src/tests/README +1 -0
- salome/share/salome/resources/kernel/app-template/src/tests/helloWorld.py +1 -0
- salome/share/salome/resources/kernel/background.png +0 -0
- salome/share/salome/resources/kernel/channel.cfg +278 -0
- salome/share/salome/resources/kernel/testLauncher.xml +10 -0
- salome.kernel-9.14.0.dist-info/METADATA +24 -0
- salome.kernel-9.14.0.dist-info/RECORD +399 -0
- salome.kernel-9.14.0.dist-info/WHEEL +6 -0
- salome.kernel-9.14.0.dist-info/entry_points.txt +2 -0
- salome.kernel.libs/libArgvKeeper-822351d5.so +0 -0
- salome.kernel.libs/libCOS4-b4544fb9.so.2.5 +0 -0
- salome.kernel.libs/libCOSDynamic4-618dbb1d.so.2.5 +0 -0
- salome.kernel.libs/libCalciumC-a61b99a1.so +0 -0
- salome.kernel.libs/libDF-281cc999.so +0 -0
- salome.kernel.libs/libLauncher-09c39914.so +0 -0
- salome.kernel.libs/libLauncherWrapHelper-5ee25ab2.so +0 -0
- salome.kernel.libs/libOpUtil-8d37ccc8.so +0 -0
- salome.kernel.libs/libRegistry-e4a63a9e.so +0 -0
- salome.kernel.libs/libResourcesManager-f4ef9548.so +0 -0
- salome.kernel.libs/libSALOMEBasics-f4d874ac.so +0 -0
- salome.kernel.libs/libSALOMELocalTrace-a3992e5b.so +0 -0
- salome.kernel.libs/libSALOMELog-55805468.so +0 -0
- salome.kernel.libs/libSalomeCalcium-6800d8d0.so +0 -0
- salome.kernel.libs/libSalomeCatalog-96c5b2bc.so +0 -0
- salome.kernel.libs/libSalomeCommunication-451307b4.so +0 -0
- salome.kernel.libs/libSalomeContainer-d4557377.so +0 -0
- salome.kernel.libs/libSalomeContainerServer-372d46c2.so +0 -0
- salome.kernel.libs/libSalomeDS-34cd5abf.so +0 -0
- salome.kernel.libs/libSalomeDSCContainer-ee0cf498.so +0 -0
- salome.kernel.libs/libSalomeDSCSuperv-f529bca5.so +0 -0
- salome.kernel.libs/libSalomeDSCSupervBasic-e6a3b4cf.so +0 -0
- salome.kernel.libs/libSalomeDSClient-dc9947bb.so +0 -0
- salome.kernel.libs/libSalomeDSImpl-cb508584.so +0 -0
- salome.kernel.libs/libSalomeDatastream-755ff3cb.so +0 -0
- salome.kernel.libs/libSalomeGenericObj-3ccf0028.so +0 -0
- salome.kernel.libs/libSalomeHDFPersist-69945ed0.so +0 -0
- salome.kernel.libs/libSalomeIDLKernel-2eb1ed8e.so +0 -0
- salome.kernel.libs/libSalomeKernelHelpers-1514c9e0.so +0 -0
- salome.kernel.libs/libSalomeLauncher-f5fc4b7e.so +0 -0
- salome.kernel.libs/libSalomeLifeCycleCORBA-69902a7b.so +0 -0
- salome.kernel.libs/libSalomeLoggerServer-3668e9ae.so +0 -0
- salome.kernel.libs/libSalomeNS-a03a7eba.so +0 -0
- salome.kernel.libs/libSalomeNotification-66efcfbd.so +0 -0
- salome.kernel.libs/libSalomeORB-f304f4df.so +0 -0
- salome.kernel.libs/libSalomePalm-4204405e.so +0 -0
- salome.kernel.libs/libSalomeResourcesManager-fd411949.so +0 -0
- salome.kernel.libs/libSalomeSDS-896ae3bb.so +0 -0
- salome.kernel.libs/libSalomeTestComponentEngine-9899af25.so +0 -0
- salome.kernel.libs/libTOOLSDS-db8e8629.so +0 -0
- salome.kernel.libs/libbatch-6b5b319f.so +0 -0
- salome.kernel.libs/libboost_atomic-489c2d94.so.1.81.0 +0 -0
- salome.kernel.libs/libboost_filesystem-e610b554.so.1.81.0 +0 -0
- salome.kernel.libs/libboost_system-4a7650ea.so.1.81.0 +0 -0
- salome.kernel.libs/libcppunit-1-17e77af1.12.so.1.0.0 +0 -0
- salome.kernel.libs/libhdf5-60e81d69.so.103.0.0 +0 -0
- salome.kernel.libs/liblzma-004595ca.so.5.2.2 +0 -0
- salome.kernel.libs/libomniDynamic4-9edc765d.so.2.5 +0 -0
- salome.kernel.libs/libomniORB4-4725824d.so.2.5 +0 -0
- salome.kernel.libs/libomnithread-99f9d0d3.so.4.1 +0 -0
- salome.kernel.libs/libwith_loggerTraceCollector-6b94c51b.so +0 -0
- salome.kernel.libs/libwith_loggerTraceCollector.so +0 -0
- 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)
|