Skip to content

Commit

Permalink
export/pythonfmu no start values
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Dec 1, 2023
1 parent 2e0cd04 commit 2f768d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions otfmi/function_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,11 @@ def export_model(self, model_path, gui=False, verbose=False, binary=True, mode="
- cxx: the function is directly evaluated trough the OpenTURNS C++ API;
even faster but requires the OpenTURNS development headers and libraries
(not just the Python module that would be installed by pip for example).
move : bool
Move the model from temporary folder to user folder (default=True)
For internal use.
"""

# "move" argument moves the the model from temporary folder to user folder (default=True)
# not documented on purpose (private)

assert isinstance(model_path, str), "model_path must be str"
rawClassName, extension = os.path.splitext(os.path.basename(model_path))
className = rawClassName[0].upper() + rawClassName[1:]
Expand Down Expand Up @@ -791,9 +791,9 @@ def __init__(self, **kwargs):
self._function = ot.PointToFieldFunction() if {{ field }} else ot.Function()
study.fillObject("function", self._function)
start = {{ start }}
#start = {{ start }}
for i, var in enumerate(self._function.getInputDescription()):
setattr(self, var, start[i])
setattr(self, var, 0.0)
self.register_variable(Real(var, causality=Fmi2Causality.input))
for var in self._function.getOutputDescription():
Expand Down

0 comments on commit 2f768d1

Please sign in to comment.