Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the order set in model.py input file does not reflect in the simulation #76

Open
mortezah opened this issue May 10, 2022 · 5 comments
Open

Comments

@mortezah
Copy link
Collaborator

@sshiraiwa

I have recently updated all the PetraM libraries and ran one of my old runs (using the model.py that I had) again with the updated libraries. Even though in the model.py file the order of the finite element space is set to 2, it seems that that does not reflect in the simulation (that is during the simulation the default order of 1 is used).

Has the format of model.py changed recently?

I have tried to recreate that model file by setting up the problem in piScope again but I am having trouble running piScope with the following error. Any idea what might be causing this?

/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/bin/piscope.sh
('removing past crush dir', '/lore/hakimm2/tmp/piscope/piscope_hakimm2/scrabble.pid31787')
reading extra color maps
Traceback (most recent call last):
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/piscope.py", line 29, in <module>
    from ifigure.ifigure_app import ifigure_app, MyApp
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/ifigure_app.py", line 22, in <module>
    import ifigure.server
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/server.py", line 35, in <module>
    import ifigure.events
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/events.py", line 18, in <module>
    from ifigure.widgets.book_viewer import BookViewer
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/widgets/book_viewer.py", line 42, in <module>
    from ifigure.widgets.canvas.ifigure_canvas import ifigure_canvas
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/widgets/canvas/ifigure_canvas.py", line 55, in <module>
    from ifigure.widgets.navibar2 import navibar
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/widgets/navibar2.py", line 9, in <module>
    from ifigure.mto.fig_axes import FigInsetAxes
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/mto/fig_axes.py", line 39, in <module>
    from ifigure.mto.fig_plot import FigPlot
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/mto/fig_plot.py", line 25, in <module>
    from ifigure.matplotlib_mod.art3d_gl import Line3DCollectionGL, LineGL
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/src/piScope/python/ifigure/matplotlib_mod/art3d_gl.py", line 430, in <module>
    class AxesImageGL(ArtGL, AxesImage):
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/lib/python3.8/site-packages/matplotlib/artist.py", line 119, in __init_subclass__
    cls._update_set_signature_and_docstring()
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/lib/python3.8/site-packages/matplotlib/artist.py", line 139, in _update_set_signature_and_docstring
    *[Parameter(prop, Parameter.KEYWORD_ONLY, default=_UNSET)
  File "/lore/hakimm2/projects/petram/twopi_scorecrhel7_python38_dev3/lib/python3.8/site-packages/matplotlib/artist.py", line 139, in <listcomp>
    *[Parameter(prop, Parameter.KEYWORD_ONLY, default=_UNSET)
  File "/lore/hakimm2/opt/local/lib/python3.8/inspect.py", line 2513, in __init__
    raise ValueError('{!r} is not a valid parameter name'.format(name))
ValueError: '3dpath' is not a valid parameter name
@sshiraiwa
Copy link
Member

Order field is not directly editable anymore because in the recent version it dynamically evaluates FEM element order from order_txt attribute.
Can you try adding order_txt attribute to the object. Something like
obj17.order_txt = '2'

@sshiraiwa
Copy link
Member

Another question. Did you update piScope too, and what is the version of wxWidget? With 4.1.0, I don't see this issue.

@mortezah
Copy link
Collaborator Author

Another question. Did you update piScope too, and what is the version of wxWidget? With 4.1.0, I don't see this issue.

@sshiraiwa

The piScope is updated. And I am using wxPython-4.1.1.

I will try the order_txt and let you know what I find.

@mortezah
Copy link
Collaborator Author

@sshiraiwa

setting the order_txt does not seem to fix the problem. I guess my best chance is to get piScope to run and re-make the problem in PetraM and get a new model.py.

I am using python3.8. Do you think moving to the latest version of python could fix the problem with piScope?

@mortezah
Copy link
Collaborator Author

@sshiraiwa using matplotlib 3.3.0 fixed the issue with loading piScope.

Also, setting order_txt = '2' works. Earlier I had assumed that it should be a new variable defined in the model.py, but now I realize that the old order = 2 had to be replaced with order_txt = '2'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants