Skip to content

Commit eae2b83

Browse files
Merge pull request #2627 from dikwickley/fix-submesh-equation
fixed exponent in doc string submesh 1d
2 parents c9e2a45 + 4318383 commit eae2b83

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pybamm/meshes/one_dimensional_submeshes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,25 @@ class Exponential1DSubMesh(SubMesh1D):
111111
If side is "left", the gridpoints are given by
112112
113113
.. math::
114-
x_{k} = (b-a) + \\frac{\\exp{\\alpha k / N} - 1}{\\exp{\\alpha} - 1} + a,
114+
x_{k} = (b-a) +
115+
\\frac{\mathrm{e}^{\\alpha k / N} - 1}{\mathrm{e}^{\\alpha} - 1} + a,
115116
116117
for k = 1, ..., N, where N is the number of nodes.
117118
118119
Is side is "right", the gridpoints are given by
119120
120121
.. math::
121-
x_{k} = (b-a) + \\frac{\\exp{-\\alpha k / N} - 1}{\\exp{-\\alpha} - 1} + a,
122+
x_{k} = (b-a) +
123+
\\frac{\mathrm{e}^{-\\alpha k / N} - 1}{\mathrm{e}^{-\\alpha} - 1} + a,
122124
123125
for k = 1, ..., N.
124126
125127
If side is "symmetric", the first half of the interval is meshed using the
126128
gridpoints
127129
128130
.. math::
129-
x_{k} = (b/2-a) + \\frac{\\exp{\\alpha k / N} - 1}{\\exp{\\alpha} - 1} + a,
131+
x_{k} = (b/2-a) +
132+
\\frac{\mathrm{e}^{\\alpha k / N} - 1}{\mathrm{e}^{\\alpha} - 1} + a,
130133
131134
for k = 1, ..., N. The grid spacing is then reflected to contruct the grid
132135
on the full interval [a,b].

0 commit comments

Comments
 (0)