Skip to content

Commit

Permalink
Fixed documentation and convert input to array
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zwicker committed Jun 5, 2024
1 parent c2c3abc commit 9b438f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/manual/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Taken together, a minimal example reads
state = ScalarField.random_uniform(grid, 0.2, 0.3)
eq = DiffusionPDE(diffusivity=0.1)
result = eq.solve(state, t_range=10, dt=0.1, method="explicit_mpi")
result = eq.solve(state, t_range=10, dt=0.1, solver="explicit_mpi")
if result is not None: # restrict the output to the main node
result.plot()
Expand Down
1 change: 1 addition & 0 deletions pde/fields/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def from_data(
The data type of the field. All the numpy dtypes are supported. If
omitted, it will be determined from `data` automatically.
"""
data = np.asanyarray(data)
# extract data from individual fields
fields = []
start = 0
Expand Down
2 changes: 1 addition & 1 deletion pde/solvers/explicit_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ExplicitMPISolver(ExplicitSolver):
state = ScalarField.random_uniform(grid, 0.2, 0.3)
eq = DiffusionPDE(diffusivity=0.1)
result = eq.solve(state, t_range=10, dt=0.1, method="explicit_mpi")
result = eq.solve(state, t_range=10, dt=0.1, solver="explicit_mpi")
if result is not None: # restrict the output to the main node
result.plot()
Expand Down

0 comments on commit 9b438f6

Please sign in to comment.