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

cubit2specfem2d.py "mesh" is not defined! #1168

Closed
AbolfazlKhanMo opened this issue Nov 24, 2022 · 1 comment
Closed

cubit2specfem2d.py "mesh" is not defined! #1168

AbolfazlKhanMo opened this issue Nov 24, 2022 · 1 comment

Comments

@AbolfazlKhanMo
Copy link

Hi all,

I was using specfem2d on my previous OS (Ubuntu 20.04). After upgrading to Ubuntu 22.4, when I run the "cubit2specfem2d.py" script to get the necessary files in specfem2d format, I get the following error:

(Non-Commercial License) Cubit>
Traceback (most recent call last):
File "", line 750, in
File "", line 3, in export2SPECFEM2D
NameError: name 'mesh' is not defined

Rolled back to the previous os version, and I am still getting the same error.
Thank you!

@AbolfazlKhanMo
Copy link
Author

AbolfazlKhanMo commented Nov 25, 2022

I'm going to close this because I solved it. But I only ran a homogeneous media and the "paper_axisymmetry_example" simulations using Cubit! They both work fine.

Solution steps:
(1) you don't need the "sets" module for calling the "set" function in python anymore. Comment all the from sets import Set lines.
(2) Also, in line 257 of the script, switch the"mesh_tools" and "object". So, it should be class mesh(mesh_tools,object):

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

1 participant