Skip to content

Commit f9ed0f1

Browse files
authored
corrections in quickstart for mpirun (#132)
**Solves the following issue(s):** Closes #130 and #131
1 parent 17545a8 commit f9ed0f1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

doc/sections/quickstart.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ Under ``simdata.f`` you find binning data, in this case a 1d binning plot in the
6969

7070
Parallel simulations can invoked from the same launch file for instance by::
7171

72-
mpirun -n 4 struphy_test.py
72+
pip install -U mpi4py
73+
mpirun -n 4 python struphy_test.py
7374

7475
If you want to learn more please check the :ref:`userguide`.
7576

src/struphy/models/base.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
from struphy.feec.basis_projection_ops import BasisProjectionOperators
1717
from struphy.feec.mass import WeightedMassOperators
1818
from struphy.feec.psydac_derham import SplineFunction
19-
from struphy.fields_background.base import FluidEquilibrium, FluidEquilibriumWithB, MHDequilibrium
19+
from struphy.fields_background.base import (
20+
FluidEquilibrium,
21+
FluidEquilibriumWithB,
22+
MHDequilibrium,
23+
NumericalMHDequilibrium,
24+
)
2025
from struphy.fields_background.equils import HomogenSlab
2126
from struphy.fields_background.projected_equils import (
2227
ProjectedFluidEquilibrium,
@@ -95,7 +100,7 @@ def setup_domain_and_equil(self, domain: Domain, equil: FluidEquilibrium):
95100
"""If a numerical equilibirum is used, the domain is taken from this equilibirum."""
96101
if equil is not None:
97102
self._equil = equil
98-
if "Numerical" in self.equil.__class__.__name__:
103+
if isinstance(self.equil, NumericalMHDequilibrium):
99104
self._domain = self.equil.domain
100105
else:
101106
self._domain = domain

0 commit comments

Comments
 (0)