Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/3711.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: sfem example typo errors
4 changes: 2 additions & 2 deletions doc/source/examples/extended_examples/sfem/sfem.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ def young_modulus_realization(
# Plot of ensemble variance
fig, ax = plt.subplots()
fig.set_size_inches(15, 8)
ax.plot(ensemble_var_with_realization, label="Actual variance")
ax.axhline(y=1e8, color="r", linestyle="dashed", label="Computed variance")
ax.plot(ensemble_var_with_realization, label="Computed variance")
ax.axhline(y=1e8, color="r", linestyle="dashed", label="Actual variance")
plt.xlabel("No of realizations")
plt.ylabel(r"Ensemble varianc of $E$")
ax.grid(True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ distribution and for each of these samples solving the deterministic problem:

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

The next step is to collect the :math:`N_{sim}` response vectors :math:`\pmb{U} := \pmb{U}(\pmb{\xi}_{(i)})` and perform a statistical
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
postprocessing to extract useful information such as mean value, variance, histogram, and
empirical PDF.

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

A two-dimensional cantilever structure under a point load.

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

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

.. literalinclude:: sfem.py
:language: python
:lines: 444-556
:lines: 414-556

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

Expand Down
Binary file modified doc/source/examples/extended_examples/sfem/variance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading