simapy 4.8.0.dev0__py3-none-any.whl → 5.0.0.dev0__py3-none-any.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 (133) hide show
  1. simapy/progress_handler.py +51 -0
  2. simapy/sima/command/__init__.py +0 -1
  3. simapy/sima/command/blueprints/compoundcommand.py +2 -2
  4. simapy/sima/command/blueprints/conditionruncommand.py +5 -2
  5. simapy/sima/command/blueprints/exportblueprintcommand.py +1 -1
  6. simapy/sima/command/blueprints/exportcommand.py +1 -1
  7. simapy/sima/command/blueprints/externalcommand.py +1 -1
  8. simapy/sima/command/blueprints/gitimportcommand.py +1 -1
  9. simapy/sima/command/blueprints/importcommand.py +3 -2
  10. simapy/sima/command/blueprints/internalcommand.py +1 -1
  11. simapy/sima/command/blueprints/preferencecommand.py +1 -1
  12. simapy/sima/command/blueprints/scriptruncommand.py +1 -1
  13. simapy/sima/command/blueprints/storagetaskrootcommand.py +1 -1
  14. simapy/sima/command/blueprints/testruncommand.py +1 -1
  15. simapy/sima/command/blueprints/workflowinputcommand.py +1 -1
  16. simapy/sima/command/blueprints/workflowruncommand.py +1 -1
  17. simapy/sima/command/compoundcommand.py +1 -1
  18. simapy/sima/command/conditionruncommand.py +45 -3
  19. simapy/sima/command/exportblueprintcommand.py +1 -1
  20. simapy/sima/command/exportcommand.py +1 -1
  21. simapy/sima/command/externalcommand.py +1 -1
  22. simapy/sima/command/gitimportcommand.py +1 -1
  23. simapy/sima/command/importcommand.py +14 -1
  24. simapy/sima/command/internalcommand.py +1 -1
  25. simapy/sima/command/preferencecommand.py +1 -1
  26. simapy/sima/command/scriptruncommand.py +1 -1
  27. simapy/sima/command/storagetaskrootcommand.py +1 -1
  28. simapy/sima/command/testruncommand.py +1 -1
  29. simapy/sima/command/workflowinputcommand.py +1 -1
  30. simapy/sima/command/workflowruncommand.py +1 -1
  31. simapy/sima/environment/__init__.py +1 -0
  32. simapy/sima/environment/blueprints/fluctuatingthreecomponent.py +5 -4
  33. simapy/sima/environment/blueprints/regularcurrentfromfile.py +17 -0
  34. simapy/sima/environment/blueprints/stationaryuniform.py +1 -1
  35. simapy/sima/environment/fluctuatingthreecomponent.py +20 -7
  36. simapy/sima/environment/regularcurrentfromfile.py +68 -0
  37. simapy/sima/environment/stationaryuniform.py +2 -2
  38. simapy/sima/hydro/__init__.py +8 -1
  39. simapy/sima/hydro/blueprints/differencefrequencyqtf.py +7 -3
  40. simapy/sima/hydro/blueprints/hydrostaticstiffnessdata.py +1 -3
  41. simapy/sima/hydro/blueprints/hydrostaticstiffnessmatrixdata.py +18 -0
  42. simapy/sima/hydro/blueprints/linearhydrostatics.py +26 -0
  43. simapy/sima/hydro/blueprints/retardationfunctioncalculationparameters.py +21 -0
  44. simapy/sima/hydro/blueprints/sumfrequencyqtf.py +2 -2
  45. simapy/sima/hydro/blueprints/wamitimportconfiguration.py +23 -0
  46. simapy/sima/hydro/differencefrequencyqtf.py +55 -3
  47. simapy/sima/hydro/directionsymmetry.py +1 -4
  48. simapy/sima/hydro/hydrostaticstiffnessdata.py +0 -26
  49. simapy/sima/hydro/hydrostaticstiffnessmatrixdata.py +81 -0
  50. simapy/sima/hydro/linearhydrostatics.py +185 -0
  51. simapy/sima/hydro/qtfinput.py +15 -0
  52. simapy/sima/hydro/retardationfunctioncalculationparameters.py +120 -0
  53. simapy/sima/hydro/sumfrequencyqtf.py +2 -2
  54. simapy/sima/hydro/wamitimportconfiguration.py +145 -0
  55. simapy/sima/hydro/wamitqtfimportoption.py +18 -0
  56. simapy/sima/hydro/wamitwavedriftforceoption.py +18 -0
  57. simapy/sima/hydro/wamitwaveforceoption.py +15 -0
  58. simapy/sima/package_info.py +2 -2
  59. simapy/sima/riflex/__init__.py +9 -0
  60. simapy/sima/riflex/arline.py +15 -0
  61. simapy/sima/riflex/blueprints/arline.py +2 -1
  62. simapy/sima/{hydro/blueprints/sparseqtf.py → riflex/blueprints/capacitycheck.py} +6 -5
  63. simapy/sima/riflex/blueprints/chaincrosssection.py +1 -1
  64. simapy/sima/riflex/blueprints/dnv_os_e301capacitycheck.py +29 -0
  65. simapy/sima/riflex/blueprints/dnv_os_f201combinedloading.py +0 -1
  66. simapy/sima/riflex/blueprints/dynamicloads.py +2 -1
  67. simapy/sima/riflex/blueprints/envelopecurvespecification.py +3 -6
  68. simapy/sima/riflex/blueprints/fatigueanalysis.py +2 -1
  69. simapy/sima/riflex/blueprints/horizontalaxiscontroller.py +2 -1
  70. simapy/sima/riflex/blueprints/iso_13628_7combinedloading.py +0 -1
  71. simapy/sima/riflex/blueprints/localelementaxis.py +2 -3
  72. simapy/sima/riflex/blueprints/marinegrowthscaling.py +18 -0
  73. simapy/sima/riflex/blueprints/nonlinearintegrationprocedure.py +2 -2
  74. simapy/sima/riflex/blueprints/parametervariation.py +4 -3
  75. simapy/sima/riflex/blueprints/riflexmodel.py +1 -0
  76. simapy/sima/riflex/blueprints/riflexstaticcalculationparameters.py +1 -0
  77. simapy/sima/riflex/blueprints/slendersystem.py +0 -1
  78. simapy/sima/riflex/blueprints/staticloadtypeitem.py +5 -4
  79. simapy/sima/riflex/blueprints/tensionandcurvaturecapacitycheck.py +29 -0
  80. simapy/sima/riflex/blueprints/tnfatigueanalysisitem.py +26 -0
  81. simapy/sima/riflex/blueprints/userdefinedelement.py +2 -1
  82. simapy/sima/riflex/blueprints/vonmisescombinedloading.py +0 -1
  83. simapy/sima/riflex/blueprints/windvelocityramping.py +20 -0
  84. simapy/sima/{hydro/sparseqtf.py → riflex/capacitycheck.py} +18 -5
  85. simapy/sima/riflex/chaincrosssection.py +2 -2
  86. simapy/sima/riflex/dnv_os_e301capacitycheck.py +227 -0
  87. simapy/sima/riflex/dnv_os_f201combinedloading.py +1 -15
  88. simapy/sima/riflex/dynamicloads.py +13 -0
  89. simapy/sima/riflex/endreference.py +18 -0
  90. simapy/sima/riflex/envelopecurvespecification.py +31 -70
  91. simapy/sima/riflex/fatigueanalysis.py +16 -0
  92. simapy/sima/riflex/horizontalaxiscontroller.py +15 -2
  93. simapy/sima/riflex/iso_13628_7combinedloading.py +1 -15
  94. simapy/sima/riflex/localelementaxis.py +2 -16
  95. simapy/sima/riflex/marinegrowthscaling.py +84 -0
  96. simapy/sima/riflex/matrixstorage.py +3 -0
  97. simapy/sima/riflex/nonlinearintegrationprocedure.py +3 -3
  98. simapy/sima/riflex/parametervariation.py +16 -3
  99. simapy/sima/riflex/riflexmodel.py +15 -0
  100. simapy/sima/riflex/riflexstaticcalculationparameters.py +14 -1
  101. simapy/sima/riflex/slendersystem.py +0 -15
  102. simapy/sima/riflex/staticloadtypeitem.py +24 -7
  103. simapy/sima/riflex/tensionandcurvaturecapacitycheck.py +227 -0
  104. simapy/sima/riflex/tnfatigueanalysisitem.py +190 -0
  105. simapy/sima/riflex/typeofunit.py +18 -0
  106. simapy/sima/riflex/userdefinedelement.py +15 -1
  107. simapy/sima/riflex/utilizationcheck.py +18 -0
  108. simapy/sima/riflex/vonmisescombinedloading.py +1 -15
  109. simapy/sima/riflex/windvelocityramping.py +107 -0
  110. simapy/sima/signals/report/axis.py +27 -1
  111. simapy/sima/signals/report/blueprints/axis.py +3 -1
  112. simapy/sima/sima/__init__.py +1 -0
  113. simapy/sima/{command → sima}/blueprints/command.py +2 -2
  114. simapy/sima/{command → sima}/command.py +2 -2
  115. simapy/sima/simo/__init__.py +0 -2
  116. simapy/sima/simo/blueprints/nonlinearhydrostaticstiffness.py +2 -2
  117. simapy/sima/simo/blueprints/simobody.py +2 -3
  118. simapy/sima/simo/blueprints/simodynamiccalculationparameters.py +3 -2
  119. simapy/sima/simo/nonlinearhydrostaticstiffness.py +2 -2
  120. simapy/sima/simo/simobody.py +22 -35
  121. simapy/sima/simo/simodynamiccalculationparameters.py +16 -3
  122. simapy/sima/windpark/multipledeficitmethod.py +4 -1
  123. simapy/sima/windturbine/blueprints/horizontalaxiswindturbinecontroller.py +3 -2
  124. simapy/sima/windturbine/horizontalaxiswindturbinecontroller.py +15 -2
  125. simapy/sre.py +22 -13
  126. {simapy-4.8.0.dev0.dist-info → simapy-5.0.0.dev0.dist-info}/METADATA +48 -45
  127. {simapy-4.8.0.dev0.dist-info → simapy-5.0.0.dev0.dist-info}/RECORD +130 -105
  128. {simapy-4.8.0.dev0.dist-info → simapy-5.0.0.dev0.dist-info}/WHEEL +1 -1
  129. simapy/sima/simo/blueprints/nonlinearbuoyancycorrection.py +0 -21
  130. simapy/sima/simo/nonlinearbuoyancycorrection.py +0 -120
  131. simapy/sima/simo/nonlinearbuoyancycorrectionmethod.py +0 -15
  132. {simapy-4.8.0.dev0.dist-info → simapy-5.0.0.dev0.dist-info/licenses}/LICENSE +0 -0
  133. {simapy-4.8.0.dev0.dist-info → simapy-5.0.0.dev0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,51 @@
1
+ """
2
+ Progress handler for SRE output.
3
+
4
+ This module provides a tqdm-based progress handler for SRE output.
5
+
6
+ """
7
+ from tqdm import tqdm
8
+
9
+ class ProgressHandler:
10
+ def __init__(self, show_output=True):
11
+ self.progress_bar = None
12
+ self.show_output = show_output
13
+
14
+ def handle_output(self, line: str):
15
+ """
16
+ Process SRE output to execution progress using tqdm.
17
+
18
+ This handler function monitors the SRE output stream
19
+ and extracts progress information from status messages. When a status message
20
+ is detected, it updates a tqdm progress bar.
21
+
22
+ Args:
23
+ line (str): A line of text output from the SRE process
24
+
25
+ Example:
26
+ When SRE outputs a line like: "@STATUS "Total" 800 1000"
27
+ The function will update the tqdm progress bar to 80%
28
+ """
29
+
30
+ # "@STATUS "Total" 800 1000"
31
+ if line.startswith("@STATUS"):
32
+ # Find the last number
33
+ parts = line.split()
34
+ worked = float(parts[-2]) # Second-to-last value is work completed
35
+ total = float(parts[-1]) # Last value is total work units
36
+
37
+ # Initialize the progress bar if it doesn't exist yet
38
+ if self.progress_bar is None:
39
+ self.progress_bar = tqdm(total=total, desc="Progress", unit="%")
40
+
41
+ # Update the progress bar
42
+ self.progress_bar.update(worked - self.progress_bar.n)
43
+
44
+ # If we've reached the end, close the progress bar
45
+ if worked >= total:
46
+ self.progress_bar.close()
47
+ self.progress_bar = None
48
+ elif self.progress_bar and self.show_output:
49
+ self.progress_bar.write(line)
50
+ elif self.show_output:
51
+ print(line)
@@ -1,5 +1,4 @@
1
1
 
2
- from .command import Command # noqa
3
2
  from .compoundcommand import CompoundCommand # noqa
4
3
  from .conditionruncommand import ConditionRunCommand # noqa
5
4
  from .exportblueprintcommand import ExportBlueprintCommand # noqa
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class CompoundCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -16,4 +16,4 @@ class CompoundCommandBlueprint(CommandBlueprint):
16
16
  self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*")))
17
17
  self.add_attribute(Attribute("name","string",""))
18
18
  self.add_attribute(BlueprintAttribute("parameters","sima/sima/Property","Additional parameters",True,Dimension("*")))
19
- self.add_attribute(BlueprintAttribute("commands","sima/command/Command","",True,Dimension("*")))
19
+ self.add_attribute(BlueprintAttribute("commands","sima/sima/Command","",True,Dimension("*")))
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class ConditionRunCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -21,4 +21,7 @@ class ConditionRunCommandBlueprint(CommandBlueprint):
21
21
  self.add_attribute(Attribute("runType","string","Condition run type",optional=False))
22
22
  self.add_attribute(Attribute("dir","string","Optional working directory ( may be specified with sima resource urls: sima:// which are relative to the workspace).\nIf the working directory is given outside the workspace SIMA will not delete any of the files before running."))
23
23
  self.add_attribute(Attribute("output","string","If set will export all the condition results to the given file"))
24
- self.add_attribute(BlueprintAttribute("input","sima/sima/Property","Enables override of condition variables. Specify variable name and wanted value",True,Dimension("*")))
24
+ self.add_attribute(BlueprintAttribute("input","sima/sima/Property","Enables override of condition variables. Specify variable name and wanted value",True,Dimension("*")))
25
+ self.add_attribute(Attribute("copy","boolean","Copy selected files to destination folder",default=False))
26
+ self.add_attribute(Attribute("paths","string","Optional list of file names within the condition folder to copy after run",Dimension("*")))
27
+ self.add_attribute(Attribute("destination","string","Destination folder"))
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class ExportBlueprintCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class ExportCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class ExternalCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class GitImportCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class ImportCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -16,4 +16,5 @@ class ImportCommandBlueprint(CommandBlueprint):
16
16
  self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*")))
17
17
  self.add_attribute(Attribute("name","string",""))
18
18
  self.add_attribute(BlueprintAttribute("parameters","sima/sima/Property","Additional parameters",True,Dimension("*")))
19
- self.add_attribute(Attribute("file","string","Path to file, e.g stask",optional=False))
19
+ self.add_attribute(Attribute("file","string","Path to file, e.g stask",optional=False))
20
+ self.add_attribute(Attribute("configuration","string","Path to configuration file (context specific)",optional=False))
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class InternalCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class PreferenceCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class ScriptRunCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class StorageTaskRootCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class TestRunCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class WorkflowInputCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,7 +5,7 @@ from dmt.dimension import Dimension
5
5
  from dmt.attribute import Attribute
6
6
  from dmt.enum_attribute import EnumAttribute
7
7
  from dmt.blueprint_attribute import BlueprintAttribute
8
- from .command import CommandBlueprint
8
+ from ...sima.blueprints.command import CommandBlueprint
9
9
 
10
10
  class WorkflowRunCommandBlueprint(CommandBlueprint):
11
11
  """"""
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.compoundcommand import CompoundCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class CompoundCommand(Command):
13
13
  """
@@ -4,10 +4,10 @@
4
4
  from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.conditionruncommand import ConditionRunCommandBlueprint
7
- from typing import Dict
7
+ from numpy import ndarray,asarray
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class ConditionRunCommand(Command):
13
13
  """
@@ -32,9 +32,15 @@ class ConditionRunCommand(Command):
32
32
  If set will export all the condition results to the given file(default None)
33
33
  input : List[Property]
34
34
  Enables override of condition variables. Specify variable name and wanted value
35
+ copy : bool
36
+ Copy selected files to destination folder(default False)
37
+ paths : ndarray of str
38
+ Optional list of file names within the condition folder to copy after run
39
+ destination : str
40
+ Destination folder(default None)
35
41
  """
36
42
 
37
- def __init__(self , description="", **kwargs):
43
+ def __init__(self , description="", copy=False, **kwargs):
38
44
  super().__init__(**kwargs)
39
45
  self.description = description
40
46
  self.scriptableValues = list()
@@ -46,6 +52,9 @@ class ConditionRunCommand(Command):
46
52
  self.dir = None
47
53
  self.output = None
48
54
  self.input = list()
55
+ self.copy = copy
56
+ self.paths = []
57
+ self.destination = None
49
58
  for key, value in kwargs.items():
50
59
  if not isinstance(value, Dict):
51
60
  setattr(self, key, value)
@@ -163,3 +172,36 @@ If the working directory is given outside the workspace SIMA will not delete any
163
172
  if not isinstance(value, Sequence):
164
173
  raise ValueError("Expected sequense, but was " , type(value))
165
174
  self.__input = value
175
+
176
+ @property
177
+ def copy(self) -> bool:
178
+ """Copy selected files to destination folder"""
179
+ return self.__copy
180
+
181
+ @copy.setter
182
+ def copy(self, value: bool):
183
+ """Set copy"""
184
+ self.__copy = bool(value)
185
+
186
+ @property
187
+ def paths(self) -> ndarray:
188
+ """Optional list of file names within the condition folder to copy after run"""
189
+ return self.__paths
190
+
191
+ @paths.setter
192
+ def paths(self, value: ndarray):
193
+ """Set paths"""
194
+ array = asarray(value, dtype=str)
195
+ if len(array) > 0 and array.ndim != 1:
196
+ raise ValueError("Expected array with 1 dimensions")
197
+ self.__paths = array
198
+
199
+ @property
200
+ def destination(self) -> str:
201
+ """Destination folder"""
202
+ return self.__destination
203
+
204
+ @destination.setter
205
+ def destination(self, value: str):
206
+ """Set destination"""
207
+ self.__destination = value
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.exportblueprintcommand import ExportBlueprintCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class ExportBlueprintCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.exportcommand import ExportCommandBlueprint
7
7
  from numpy import ndarray,asarray
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class ExportCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.externalcommand import ExternalCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class ExternalCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.gitimportcommand import GitImportCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class GitImportCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.importcommand import ImportCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class ImportCommand(Command):
13
13
  """
@@ -22,6 +22,8 @@ class ImportCommand(Command):
22
22
  Additional parameters
23
23
  file : str
24
24
  Path to file, e.g stask(default None)
25
+ configuration : str
26
+ Path to configuration file (context specific)(default None)
25
27
  """
26
28
 
27
29
  def __init__(self , description="", **kwargs):
@@ -31,6 +33,7 @@ class ImportCommand(Command):
31
33
  self.name = None
32
34
  self.parameters = list()
33
35
  self.file = None
36
+ self.configuration = None
34
37
  for key, value in kwargs.items():
35
38
  if not isinstance(value, Dict):
36
39
  setattr(self, key, value)
@@ -95,3 +98,13 @@ class ImportCommand(Command):
95
98
  def file(self, value: str):
96
99
  """Set file"""
97
100
  self.__file = value
101
+
102
+ @property
103
+ def configuration(self) -> str:
104
+ """Path to configuration file (context specific)"""
105
+ return self.__configuration
106
+
107
+ @configuration.setter
108
+ def configuration(self, value: str):
109
+ """Set configuration"""
110
+ self.__configuration = value
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.internalcommand import InternalCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class InternalCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.preferencecommand import PreferenceCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class PreferenceCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.scriptruncommand import ScriptRunCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class ScriptRunCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.storagetaskrootcommand import StorageTaskRootCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class StorageTaskRootCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.testruncommand import TestRunCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class TestRunCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.workflowinputcommand import WorkflowInputCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class WorkflowInputCommand(Command):
13
13
  """
@@ -5,9 +5,9 @@ from typing import Dict,Sequence,List
5
5
  from dmt.blueprint import Blueprint
6
6
  from .blueprints.workflowruncommand import WorkflowRunCommandBlueprint
7
7
  from typing import Dict
8
+ from ..sima import Command
8
9
  from ..sima import Property
9
10
  from ..sima import ScriptableValue
10
- from .command import Command
11
11
 
12
12
  class WorkflowRunCommand(Command):
13
13
  """
@@ -25,6 +25,7 @@ from .piersonmoskowitz import PiersonMoskowitz # noqa
25
25
  from .piersonmoskowitzissc import PiersonMoskowitzISSC # noqa
26
26
  from .piersonmoskowitzzero import PiersonMoskowitzZero # noqa
27
27
  from .regularcurrent import RegularCurrent # noqa
28
+ from .regularcurrentfromfile import RegularCurrentFromFile # noqa
28
29
  from .regularwave import RegularWave # noqa
29
30
  from .regularwaveitem import RegularWaveItem # noqa
30
31
  from .seasurface import SeaSurface # noqa
@@ -20,13 +20,14 @@ class FluctuatingThreeComponentBlueprint(WindBlueprint):
20
20
  self.add_attribute(Attribute("longitudinalFileName","string","Path and filename for the fluctuating longitudinal wind time series"))
21
21
  self.add_attribute(Attribute("lateralFileName","string","Path and filename for the fluctuating lateral wind time series"))
22
22
  self.add_attribute(Attribute("verticalFileName","string","Path and filename for the fluctuating vertical wind time series"))
23
- self.add_attribute(Attribute("lowerLeftX","number","X-coordinate of the lower left corner of the upstream border of the wind",default=0.0))
24
- self.add_attribute(Attribute("lowerLeftY","number","Y-coordinate of the lower left corner of the wind field domain",default=0.0))
25
- self.add_attribute(Attribute("lowerLeftZ","number","Z-coordinate of the lower left corner of the wind field domain",default=0.0))
23
+ self.add_attribute(Attribute("lowerLeftX","number","X-coordinate of the upwind lower left data point, in wind aligned coordinates",default=0.0))
24
+ self.add_attribute(Attribute("lowerLeftY","number","Y-coordinate of the upwind lower left data point, in wind aligned coordinates",default=0.0))
25
+ self.add_attribute(Attribute("lowerLeftZ","number","Z-coordinate of the upwind lower left data point, in wind aligned coordinates",default=0.0))
26
26
  self.add_attribute(Attribute("numPointsX","integer","Number of grid points in X- (longitudinal) direction",default=0))
27
27
  self.add_attribute(Attribute("numPointsY","integer","Number of grid points in Y- (lateral) direction",default=0))
28
28
  self.add_attribute(Attribute("numPointsZ","integer","Number of grid points in Z- (vertical) direction",default=0))
29
29
  self.add_attribute(Attribute("sizeX","number","Field size in X- (longitudinal) direction",default=0.0))
30
30
  self.add_attribute(Attribute("sizeY","number","Field size in Y- (lateral) direction",default=0.0))
31
31
  self.add_attribute(Attribute("sizeZ","number","Field size in Z- (vertical) direction",default=0.0))
32
- self.add_attribute(Attribute("numSlices","integer","Buffer size: Number of wind crossectional planes (Slices) in memory",default=800))
32
+ self.add_attribute(Attribute("numSlices","integer","Buffer size: Number of wind crossectional planes (Slices) in memory",default=800))
33
+ self.add_attribute(Attribute("reverseBox","boolean","Read turbulence box in reverse direction",default=False))
@@ -0,0 +1,17 @@
1
+ #
2
+ # Generated with RegularCurrentFromFileBlueprint
3
+ from dmt.blueprint import Blueprint
4
+ from dmt.dimension import Dimension
5
+ from dmt.attribute import Attribute
6
+ from dmt.enum_attribute import EnumAttribute
7
+ from dmt.blueprint_attribute import BlueprintAttribute
8
+ from .current import CurrentBlueprint
9
+
10
+ class RegularCurrentFromFileBlueprint(CurrentBlueprint):
11
+ """"""
12
+
13
+ def __init__(self, name="RegularCurrentFromFile", package_path="sima/environment", description=""):
14
+ super().__init__(name,package_path,description)
15
+ self.add_attribute(Attribute("description","string","",default=""))
16
+ self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*")))
17
+ self.add_attribute(Attribute("fileName","string","Name of external file with specified current data"))
@@ -19,7 +19,7 @@ class StationaryUniformBlueprint(WindBlueprint):
19
19
  self.add_attribute(Attribute("verticalVelocity","number","Vertical wind velocity component",default=0.0))
20
20
  self.add_attribute(BlueprintAttribute("velocityProfiles","sima/environment/ShearWindVelocityProfile","",True,Dimension("*")))
21
21
  self.add_attribute(Attribute("lowerEdgeZ","number","Z coordinate of the lower edge of the wind field domain",default=0.0))
22
- self.add_attribute(Attribute("domainResolution","number","Domain resolution in Z- (vertical) direction",default=0.0))
22
+ self.add_attribute(Attribute("domainResolution","number","Distance between grid points in the vertical direction",default=0.0))
23
23
  self.add_attribute(Attribute("numGridPoints","integer","Number of grid points in Z- (vertical) direction",default=0))
24
24
  self.add_attribute(EnumAttribute("shearProfile","sima/environment/ShearProfile",""))
25
25
  self.add_attribute(Attribute("referenceHeight","number","Reference height for which the horizontal and vertical wind velocity values are given.",default=0.0))
@@ -28,11 +28,11 @@ class FluctuatingThreeComponent(Wind):
28
28
  verticalFileName : str
29
29
  Path and filename for the fluctuating vertical wind time series(default None)
30
30
  lowerLeftX : float
31
- X-coordinate of the lower left corner of the upstream border of the wind(default 0.0)
31
+ X-coordinate of the upwind lower left data point, in wind aligned coordinates(default 0.0)
32
32
  lowerLeftY : float
33
- Y-coordinate of the lower left corner of the wind field domain(default 0.0)
33
+ Y-coordinate of the upwind lower left data point, in wind aligned coordinates(default 0.0)
34
34
  lowerLeftZ : float
35
- Z-coordinate of the lower left corner of the wind field domain(default 0.0)
35
+ Z-coordinate of the upwind lower left data point, in wind aligned coordinates(default 0.0)
36
36
  numPointsX : int
37
37
  Number of grid points in X- (longitudinal) direction(default 0)
38
38
  numPointsY : int
@@ -47,9 +47,11 @@ class FluctuatingThreeComponent(Wind):
47
47
  Field size in Z- (vertical) direction(default 0.0)
48
48
  numSlices : int
49
49
  Buffer size: Number of wind crossectional planes (Slices) in memory(default 800)
50
+ reverseBox : bool
51
+ Read turbulence box in reverse direction(default False)
50
52
  """
51
53
 
52
- def __init__(self , description="", direction=0.0, meanSpeed=0.0, lowerLeftX=0.0, lowerLeftY=0.0, lowerLeftZ=0.0, numPointsX=0, numPointsY=0, numPointsZ=0, sizeX=0.0, sizeY=0.0, sizeZ=0.0, numSlices=800, **kwargs):
54
+ def __init__(self , description="", direction=0.0, meanSpeed=0.0, lowerLeftX=0.0, lowerLeftY=0.0, lowerLeftZ=0.0, numPointsX=0, numPointsY=0, numPointsZ=0, sizeX=0.0, sizeY=0.0, sizeZ=0.0, numSlices=800, reverseBox=False, **kwargs):
53
55
  super().__init__(**kwargs)
54
56
  self.description = description
55
57
  self.scriptableValues = list()
@@ -69,6 +71,7 @@ class FluctuatingThreeComponent(Wind):
69
71
  self.sizeY = sizeY
70
72
  self.sizeZ = sizeZ
71
73
  self.numSlices = numSlices
74
+ self.reverseBox = reverseBox
72
75
  for key, value in kwargs.items():
73
76
  if not isinstance(value, Dict):
74
77
  setattr(self, key, value)
@@ -166,7 +169,7 @@ class FluctuatingThreeComponent(Wind):
166
169
 
167
170
  @property
168
171
  def lowerLeftX(self) -> float:
169
- """X-coordinate of the lower left corner of the upstream border of the wind"""
172
+ """X-coordinate of the upwind lower left data point, in wind aligned coordinates"""
170
173
  return self.__lowerLeftX
171
174
 
172
175
  @lowerLeftX.setter
@@ -176,7 +179,7 @@ class FluctuatingThreeComponent(Wind):
176
179
 
177
180
  @property
178
181
  def lowerLeftY(self) -> float:
179
- """Y-coordinate of the lower left corner of the wind field domain"""
182
+ """Y-coordinate of the upwind lower left data point, in wind aligned coordinates"""
180
183
  return self.__lowerLeftY
181
184
 
182
185
  @lowerLeftY.setter
@@ -186,7 +189,7 @@ class FluctuatingThreeComponent(Wind):
186
189
 
187
190
  @property
188
191
  def lowerLeftZ(self) -> float:
189
- """Z-coordinate of the lower left corner of the wind field domain"""
192
+ """Z-coordinate of the upwind lower left data point, in wind aligned coordinates"""
190
193
  return self.__lowerLeftZ
191
194
 
192
195
  @lowerLeftZ.setter
@@ -263,3 +266,13 @@ class FluctuatingThreeComponent(Wind):
263
266
  def numSlices(self, value: int):
264
267
  """Set numSlices"""
265
268
  self.__numSlices = int(value)
269
+
270
+ @property
271
+ def reverseBox(self) -> bool:
272
+ """Read turbulence box in reverse direction"""
273
+ return self.__reverseBox
274
+
275
+ @reverseBox.setter
276
+ def reverseBox(self, value: bool):
277
+ """Set reverseBox"""
278
+ self.__reverseBox = bool(value)