Skip to content

Commit

Permalink
Addition to #358 (#359)
Browse files Browse the repository at this point in the history
* Added colon to convert formula + code line modus for docu

* Updated documentation with corrects nvars for AllenCahn_MPIFFT
  • Loading branch information
lisawim authored Oct 16, 2023
1 parent cb2b0ff commit bb0af35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pySDC/implementations/problem_classes/AllenCahn_MPIFFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class allencahn_imex(ptype):
.. math::
u({\bf x}, 0) = \tanh\left(\frac{r - \sqrt{(x_i-0.5)^2 + (y_j-0.5)^2}}{\sqrt{2}\varepsilon}\right),
for :math::`i, j=0,..,N-1`, where :math:`N` is the number of spatial grid points. For time-stepping, the problem is treated
for :math:`i, j=0,..,N-1`, where :math:`N` is the number of spatial grid points. For time-stepping, the problem is treated
*semi-implicitly*, i.e., the linear part is solved with Fast-Fourier Tranform (FFT) and the nonlinear part in the right-hand
side will be treated explicitly using mpi4py-fft [1]_ to solve them.
side will be treated explicitly using ``mpi4py-fft`` [1]_ to solve them.
Parameters
----------
nvars : List of int tuples, optional
Number of unknowns in the problem, e.g. [(128, 128), (128, 128)].
Number of unknowns in the problem, e.g. ``nvars=(128, 128)``.
eps : float, optional
Scaling parameter :math:`\varepsilon`.
radius : float, optional
Expand Down Expand Up @@ -76,12 +76,12 @@ def __init__(
dw=0.0,
L=1.0,
init_type='circle',
comm=None,
comm=MPI.COMM_WORLD,
):
"""Initialization routine"""

if nvars is None:
nvars = [(128, 128), (32, 32)]
nvars = (128, 128)

if not (isinstance(nvars, tuple) and len(nvars) > 1):
raise ProblemError('Need at least two dimensions')
Expand Down
2 changes: 1 addition & 1 deletion pySDC/implementations/problem_classes/generic_ND_FD.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class GenericNDimFinDiff(ptype):
.. math::
\frac{d u}{dt} = A u,
where :math:`A \in \mathbb{R}^{nN \times nN} is a matrix arising from finite difference discretisation of spatial
where :math:`A \in \mathbb{R}^{nN \times nN}` is a matrix arising from finite difference discretisation of spatial
derivatives with :math:`n` degrees of freedom per dimension and :math:`N` dimensions. This generic class follows the MOL
(method-of-lines) approach and can be used to discretize partial differential equations such as the advection
equation and the heat equation.
Expand Down

0 comments on commit bb0af35

Please sign in to comment.