Skip to content

Commit

Permalink
Fine-tuning of wording in documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-hen committed Apr 6, 2021
1 parent 5792aa4 commit d94065d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
8 changes: 4 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ It comes with a modern graphical user interface to set up simulation
models and can be scripted from Matlab or via its native Java API.

MPh brings the dearly missing power of Python to the world of Comsol.
It leverages the universal Python-to-Java bridge provided by [JPype][jpype]
to access the native API, and wraps it in a layer of pythonic ease-of-use.
It leverages the Python-to-Java bridge provided by [JPype][jpype] to
access the native API and wraps it in a layer of pythonic ease-of-use.
The Python wrapper covers common scripting tasks, such as loading a
model from a file, modifying parameters, importing data, to then run the
simulation and evaluate the results.
model from a file, modifying parameters, importing data, to then run
the simulation, evaluate the results, and export them.

Comsol models are marked by their `.mph` file extension, which stands
for multi-physics. Hence the name of this library. It is open-source
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ provided by this library.
Server
Model
Node
discovery
tree
inspect
discovery
```
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ It comes with a modern graphical user interface to set up simulation
models and can be scripted from Matlab or via its native Java API.

MPh brings the dearly missing power of Python to the world of Comsol.
It leverages the universal Python-to-Java bridge provided by [JPype][jpype]
to access the native API, and wraps it in a layer of pythonic ease-of-use.
It leverages the Python-to-Java bridge provided by [JPype][jpype] to
access the native API and wraps it in a layer of pythonic ease-of-use.
The Python wrapper covers common scripting tasks, such as loading a
model from a file, modifying parameters, importing data, to then run the
simulation and evaluate the results.
model from a file, modifying parameters, importing data, to then run
the simulation, evaluate the results, and export them.

Comsol models are marked by their `.mph` file extension, which stands
for multi-physics. Hence the name of this library. It is open-source
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ cores available on the machine. Restricting this resource is useful
when running several simulations in parallel. Note, however, that due
to [limitations](limitations) of this library's underlying Python-to-Java
bridge, the [`Client`](api/mph.Client) class can only be instantiated
once. Subsequent calls to [`mph.start()`](api/mph.start) will therefore
once. Subsequent calls to [`start()`](api/mph.start) will therefore
raise an error. If you wish to work around this limitation, in order to
realize the full parallelization potential of your simulation hardware,
you will need to [run multiple Python
sessions](demonstrations.md#multiple-processes), one for each client.
processes](demonstrations.md#multiple-processes), one for each client.


## Managing models
Expand Down
13 changes: 7 additions & 6 deletions mph/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,8 @@ def import_(self, node, file):
"""
Imports external data from a file and assigns it to the node.
A `file` name can be specified. Otherwise the file name defined
in the export node itself will be used.
A `file` name can be specified. Otherwise the node's `filename`
property will be used.
Note the trailing underscore in the method name. It is needed
so that the Python parser does not treat the name as an
Expand Down Expand Up @@ -737,8 +737,8 @@ def features(self, physics):
conditions, initial values, etc.
*Warning*: This method is deprecated and will be removed in a
future release. Use `Node` to retrieve child nodes of a physics
interface.
future release. Use the `Node` class to retrieve child nodes of
a physics interface.
"""
warn('Model.features() is deprecated. Use the Node class instead.')
if physics not in self.physics():
Expand All @@ -761,7 +761,8 @@ def toggle(self, physics, feature, action='flip'):
current state. Pass `'disable'` or `'off'` to disable it.
*Warning*: This method is deprecated and will be removed in
a future release. Use `Node` to toggle nodes in the model tree.
a future release. Use the `Node` class to toggle nodes in the
model tree.
"""
warn('Model.toggle() is deprecated. Use the Node class instead.')
if physics not in self.physics():
Expand Down Expand Up @@ -790,7 +791,7 @@ def load(self, file, interpolation):
Loads data from a file and assigns it to an interpolation function.
*Warning*: This method is deprecated and may be removed in a
future release. Use the `import_` method instead.
future release. Use the `import_()` method instead.
"""
warn('Model.load() is deprecated. Use Model.import_() instead.')
for tag in self.java.func().tags():
Expand Down
2 changes: 1 addition & 1 deletion mph/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def inspect(java):
# Display properties if any are defined.
if 'properties' in attributes:
print('properties:')
names = [str(property) for property in java.properties()]
names = [str(name) for name in java.properties()]
for name in names:
try:
value = get(java, name)
Expand Down
8 changes: 4 additions & 4 deletions pypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ It comes with a modern graphical user interface to set up simulation
models and can be scripted from Matlab or via its native Java API.

MPh brings the dearly missing power of Python to the world of Comsol.
It leverages the universal Python-to-Java bridge provided by [JPype][jpype]
to access the native API, and wraps it in a layer of pythonic ease-of-use.
It leverages the Python-to-Java bridge provided by [JPype][jpype] to
access the native API and wraps it in a layer of pythonic ease-of-use.
The Python wrapper covers common scripting tasks, such as loading a
model from a file, modifying parameters, importing data, to then run the
simulation and evaluate the results.
model from a file, modifying parameters, importing data, to then run
the simulation, evaluate the results, and export them.

Comsol models are marked by their `.mph` file extension, which stands
for multi-physics. Hence the name of this library. It is open-source
Expand Down

0 comments on commit d94065d

Please sign in to comment.