Skip to content

Commit

Permalink
update examples, gen_gallery.py for changed variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
rc committed May 2, 2016
1 parent 0cb58e7 commit ba31e20
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions examples/linear_elasticity/shell10x_cantilever.py
Expand Up @@ -14,15 +14,15 @@
where :math:`D_{ijkl}` is the isotropic elastic tensor, given using the Young's
modulus :math:`E` and the Poisson's ratio :math:`\nu`.
The variable ``u`` below holds both :math:`\ul{u}` and :math:`\ul{\alpha}` DOFs.
For visualization, it is saved as two fields ``uu`` and ``ub``, corresponding
to :math:`\ul{u}` and :math:`\ul{\alpha}`, respectively.
The variable ``u`` below holds both :math:`\ul{u}` and :math:`\ul{\alpha}`
DOFs. For visualization, it is saved as two fields ``u_disp`` and ``u_rot``,
corresponding to :math:`\ul{u}` and :math:`\ul{\alpha}`, respectively.
See also :ref:`linear_elasticity-shell10x_cantilever_interactive` example.
View the results using::
python postproc.py shell10x.vtk -d 'uu,plot_displacements,rel_scaling=1.0' --opacity='wireframe=0.5' -b --wireframe
python postproc.py shell10x.vtk -d 'u_disp,plot_displacements,rel_scaling=1.0' --opacity='wireframe=0.5' -b --wireframe
"""
from sfepy.base.base import output
from sfepy.discrete.fem.meshio import UserMeshIO
Expand Down
11 changes: 6 additions & 5 deletions examples/linear_elasticity/shell10x_cantilever_interactive.py
Expand Up @@ -15,9 +15,9 @@
where :math:`D_{ijkl}` is the isotropic elastic tensor, given using the Young's
modulus :math:`E` and the Poisson's ratio :math:`\nu`.
The variable ``u`` below holds both :math:`\ul{u}` and :math:`\ul{\alpha}` DOFs.
For visualization, it is saved as two fields ``uu`` and ``ub``, corresponding
to :math:`\ul{u}` and :math:`\ul{\alpha}`, respectively.
The variable ``u`` below holds both :math:`\ul{u}` and :math:`\ul{\alpha}`
DOFs. For visualization, it is saved as two fields ``u_disp`` and ``u_rot``,
corresponding to :math:`\ul{u}` and :math:`\ul{\alpha}`, respectively.
The material, loading and discretization parameters can be given using command
line options.
Expand Down Expand Up @@ -367,8 +367,9 @@ def main():
from sfepy.postprocess.viewer import Viewer
from sfepy.postprocess.domain_specific import DomainSpecificPlot

ds = {'uu' : DomainSpecificPlot('plot_displacements',
['rel_scaling=%f' % options.scaling])}
ds = {'u_disp' :
DomainSpecificPlot('plot_displacements',
['rel_scaling=%f' % options.scaling])}
view = Viewer(odir('shell10x_cantilever.vtk'))
view(domain_specific=ds, is_scalar_bar=True, is_wireframe=True,
opacity={'wireframe' : 0.5})
Expand Down
4 changes: 2 additions & 2 deletions script/gen_gallery.py
Expand Up @@ -200,8 +200,8 @@
'' : {
'is_wireframe' : True,
'domain_specific' : {
'uu' : DomainSpecificPlot('plot_displacements',
['rel_scaling=1']),
'u_disp' : DomainSpecificPlot('plot_displacements',
['rel_scaling=1']),
},
'view' : (-45, 81, 0.59, [-0.075, 0.023, 0.093]),
'roll' : -75.0,
Expand Down

0 comments on commit ba31e20

Please sign in to comment.