[CIG-SEISMO] cubit2specfem3d.py problem
emanuele casarotti
emanuele.casarotti at gmail.com
Fri Nov 8 10:22:13 PST 2013
hi all,
if you want to use that script outside the cubit gui, you need to set
the path of cubit....
if you are using the last version of the code on the svn the approach
is different from block_mesh.py since we have substituted the
cubit2specfem3d.py script with the geocubit library
consider that we are restyling the examples so the following links
will be not available in the future....
I assume that you are using the last version of the code in the svn
if you want to use that script outside the cubit gui, you need to set
the path of cubit....
see here for more information
https://github.com/casarotti/GEOCUBIT--experimental/wiki/_pages
or
the last version of the svn repository
http://www.geodynamics.org/wsvn/cig/seismo/3D/SPECFEM3D/trunk/CUBIT_GEOCUBIT/
and this examples
http://www.geodynamics.org/wsvn/cig/seismo/3D/SPECFEM3D/trunk/examples/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/
but here you can find some examples when you have already a mesh
https://github.com/casarotti/GEOCUBIT--experimental/wiki/2-LAYERS:-USING-GEOCUBIT-IN-THE-CUBIT-GUI,-DEFINING-BOUNDARY-CONDITIONS
as block_mesh.py did
On Fri, Nov 8, 2013 at 5:02 PM, Max Rietmann <max.rietmann at usi.ch> wrote:
> One way is to run these scripts from within cubit. I don't know how to load
> cubit as a library from within python.
>
> See the examples directory within specfem3d for an example how to use this.
> I've attached a demo.
>
> best,
> Max
>
>
> On 11/08/2013 04:54 PM, s.khan-1 at utwente.nl wrote:
>
> Dear All,
>
> I have created a geometrical model in cubit named 3rd_mesh.cub. I am unable
> to figure out how to specify this file to 'cubit2specfem3d.py'. I am trying
> to use 'cubit2specfem3d.py' and 'run_cubit2specfem3d.py' but i receive the
> following messages.
>
> -------------------------------------------------------------------------------------------------------------------------------------
> khan31332 at itclx03:~/SPECFEM3D/examples/Basin$ python run_cubit2specfem3d.py
> Traceback (most recent call last):
> File "run_cubit2specfem3d.py", line 4, in <module>
> import cubit
> ImportError: No module named cubit
> -------------------------------------------------------------------------------------------------------------------------------------
> khan31332 at itclx03:~/SPECFEM3D/examples/Basin$ python cubit2specfem3d.py
> Traceback (most recent call last):
> File "cubit2specfem3d.py", line 772, in <module>
> export2SESAME(path)
> File "cubit2specfem3d.py", line 764, in export2SESAME
> cubit.cmd('set info on')
> NameError: global name 'cubit' is not defined
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Thanks in advance.
>
> Best regards,
> Saad Khan
>
>
>
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
>
>
>
> --
> ---------------------------
> PhD Student
> Institute of Computational Science
> USI Lugano, Switzerland
> +41 (0)44 633 7161
>
>
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
More information about the CIG-SEISMO
mailing list