Skip to content

Commit d900f9f

Browse files
committed
TL: minor doc improvement
1 parent 1bb7828 commit d900f9f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

qmat/qdelta/__init__.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,53 +14,53 @@
1414
Examples
1515
--------
1616
17-
>>> coll:QGenerator = ... # any QGenerator object implemented in qmat.qcoeff.[...]
17+
>>> qGen:QGenerator = ... # any QGenerator object implemented in qmat.qcoeff.[...]
1818
>>>
1919
>>> # Generate QDelta coefficients with generic function
2020
>>> from qmat.qdelta import genQDeltaCoeffs
21-
>>> qDeltaBE = genQDeltaCoeffs("BE", nodes=coll.nodes) # Backward Euler approximation
22-
>>> qDeltaLU = genQDeltaCoeffs("LU", Q=coll.Q) # LU approximation
21+
>>> qDeltaBE = genQDeltaCoeffs("BE", nodes=qGen.nodes) # Backward Euler approximation
22+
>>> qDeltaLU = genQDeltaCoeffs("LU", Q=qGen.Q) # LU approximation
2323
>>>
2424
>>> # Generate QDelta coefficients with QDeltaGenerator objects
2525
>>> from qmat.qdelta.timestepping import BE
26-
>>> qDeltaBE = BE(nodes=coll.nodes).getQDelta()
26+
>>> qDeltaBE = BE(nodes=qGen.nodes).getQDelta()
2727
>>> from qmat.qdelta.algebraic import LU
28-
>>> qDeltaLU = LU(Q=coll.Q)
28+
>>> qDeltaLU = LU(Q=qGen.Q)
2929
>>>
3030
>>> # Simplified import for all QDeltaGenerator objects
3131
>>> from qmat.qdelta import QDELTA_GENERATORS # 💡 can also be imported from qmat directly
32-
>>> qDeltaBE = QDELTA_GENERATORS["BE"](nodes=coll.nodes).getQDelta()
33-
>>> qDeltaLU = QDELTA_GENERATORS["LU"](Q=coll.Q).getQDelta()
32+
>>> qDeltaBE = QDELTA_GENERATORS["BE"](nodes=qGen.nodes).getQDelta()
33+
>>> qDeltaLU = QDELTA_GENERATORS["LU"](Q=qGen.Q).getQDelta()
3434
3535
Note
3636
----
3737
All :math:`Q_\Delta` approximations may need different parameters to be computed (e.g `nodes` for BE or `Q` for LU).
3838
But **you don't need a different call for each approximation** : additional keyword arguments may be given,
3939
and ignored when the approximation don't need them ...
4040
41-
>>> coll:QGenerator = ... # any QGenerator object implemented in qmat.qcoeff.[...]
41+
>>> qGen:QGenerator = ... # any QGenerator object implemented in qmat.qcoeff.[...]
4242
>>>
4343
>>> # Generic call with generic function
4444
>>> from qmat.qdelta import genQDeltaCoeffs
4545
>>> for qdType in ["BE", "LU"]:
46-
>>> qDelta = genQDeltaCoeffs(qdType, nodes=coll.nodes, Q=coll.Q)
46+
>>> qDelta = genQDeltaCoeffs(qdType, nodes=qGen.nodes, Q=qGen.Q)
4747
>>>
4848
>>> # Generic call with generic QDeltaGenerator objects import
4949
>>> from qmat.qdelta import QDELTA_GENERATORS
5050
>>> for qdType in ["BE", "LU"]:
51-
>>> qDelta = QDELTA_GENERATORS[qdType](nodes=coll.nodes, Q=coll.Q).getQDelta()
51+
>>> qDelta = QDELTA_GENERATORS[qdType](nodes=qGen.nodes, Q=qGen.Q).getQDelta()
5252
5353
📣 If you want to **cover all available approximations** implemented in `qmat`,
5454
we highly suggest to use the `qGen` keyword argument, allowing to extract any
5555
required parameter from a `QGenerator` object, e.g :
5656
5757
>>> # Using generic function
5858
>>> for qdType in ["BE", "LU", "MIN-SR-S", "MIN-SR-NS", "MIN-SR-FLEX"]:
59-
>>> qDelta = genQDeltaCoeffs(qdType, qGen=coll)
59+
>>> qDelta = genQDeltaCoeffs(qdType, qGen=qGen)
6060
>>>
6161
>>> # Using QDeltaGenerator objects
6262
>>> for qdType in ["BE", "LU", "MIN-SR-S", "MIN-SR-NS", "MIN-SR-FLEX"]:
63-
>>> qDelta = QDELTA_GENERATORS[qdType](qGen=coll).getQDelta()
63+
>>> qDelta = QDELTA_GENERATORS[qdType](qGen=qGen).getQDelta()
6464
6565
💡 This ensure forward compatibility in your code, so it can use any other
6666
:math:`Q_\Delta` approximations added later in `qmat` without modification.

0 commit comments

Comments
 (0)