Skip to content

Commit c943198

Browse files
fix: sfem example typo errors (#3711)
* fix: implemented changes * chore: adding changelog file 3711.fixed.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent ccc39fe commit c943198

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

doc/changelog.d/3711.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: sfem example typo errors

doc/source/examples/extended_examples/sfem/sfem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ def young_modulus_realization(
399399
# Plot of ensemble variance
400400
fig, ax = plt.subplots()
401401
fig.set_size_inches(15, 8)
402-
ax.plot(ensemble_var_with_realization, label="Actual variance")
403-
ax.axhline(y=1e8, color="r", linestyle="dashed", label="Computed variance")
402+
ax.plot(ensemble_var_with_realization, label="Computed variance")
403+
ax.axhline(y=1e8, color="r", linestyle="dashed", label="Actual variance")
404404
plt.xlabel("No of realizations")
405405
plt.ylabel(r"Ensemble varianc of $E$")
406406
ax.grid(True)

doc/source/examples/extended_examples/sfem/stochastic_fem.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ distribution and for each of these samples solving the deterministic problem:
204204

205205
.. math:: \pmb{K}(\pmb{\xi}_{(i)})\pmb{U}(\pmb{\xi}_{(i)}) = \pmb{F}(\pmb{\xi}_{(i)})
206206

207-
The next step is to collect the :math:`N_{sim}` response vectors :math:`\pmb{U} := \pmb{U}(\pmb{\xi}_{(i)})` and perform a statistical
207+
The next step is to collect the :math:`N_{sim}` response vectors :math:`\pmb{U_i} := \pmb{U}(\pmb{\xi}_{(i)})` and perform a statistical
208208
postprocessing to extract useful information such as mean value, variance, histogram, and
209209
empirical PDF.
210210

@@ -217,7 +217,7 @@ The following plane stress problem shows a two-dimensional cantilever structure
217217

218218
A two-dimensional cantilever structure under a point load.
219219

220-
:math:`P` is a random variable following the Gaussian distribution :math:`\mathcal{N}(0,1)` (kN), and the modulus of elasticity is a
220+
:math:`P` is a random variable following the Gaussian distribution :math:`\mathcal{N}(10,2)` (kN), and the modulus of elasticity is a
221221
random field given by this expression:
222222

223223
.. math:: E(x) = 10^5(1+0.10f(x)) (kN/m^2)
@@ -364,7 +364,7 @@ This function implements the preceding steps:
364364

365365
.. literalinclude:: sfem.py
366366
:language: python
367-
:lines: 444-556
367+
:lines: 414-556
368368

369369
You can pass the required arguments to the defined function to run the simulations:
370370

-5.59 KB
Loading

0 commit comments

Comments
 (0)