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

colab and /tmp #750

Open
mariosgeo opened this issue Jul 16, 2024 · 3 comments
Open

colab and /tmp #750

mariosgeo opened this issue Jul 16, 2024 · 3 comments

Comments

@mariosgeo
Copy link

mariosgeo commented Jul 16, 2024

Problem description

/tmp mesh files are not found

Your environment

Please provide the output of print(pygimli.Report()) here. If that does not
work, please give provide some additional information on your:

Operating system: e.g. Colab
Python version: 3.10,
pyGIMLi version: 1.5.1
Way of installation: pip.

from pygimli.physics import ert
import pygimli as pg
import pygimli.meshtools as mt

data=ert.load('trial4.pyg')
plc = mt.createParaMeshPLC3D(data, paraDepth=-1, paraMaxCellSize=00.0,
                             surfaceMeshQuality=34)
mesh = mt.createMesh(plc, quality=1.3)

...

Expected behavior

Make a mesh

Actual behavior

I think the tempfile directory is different in colab and local installs. Is there any flag we can save the tempfiles to e.g. googledrive install of /tmp?. The mesh is created when run locally.

[/usr/local/lib/python3.10/dist-packages/pygimli/meshtools/mesh.py](https://localhost:8080/#) in readTetgen(fName, comment, verbose, defaultCellMarker, loadFaces, quadratic)
    961 
    962     # Part 1/3: Nodes, essential
--> 963     with open(fName + '.node', 'r') as node_in:
    964         node_lines = pg.utils.filterLinesByCommentStr(node_in.readlines(),
    965                                                       comment)

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpqu_t6iw8-1.node'
@mariosgeo
Copy link
Author

follow up.
The .poly files are on the /tmp folder. Not the .node ones

@halbmy
Copy link
Contributor

halbmy commented Jul 22, 2024

It seems like instead of the command-line based tetgen the installed pacakge is a wrapper for connecting pyVista: https://pypi.org/project/tetgen/

@halbmy
Copy link
Contributor

halbmy commented Jul 22, 2024

We would have to change things to work with that. However, I am not sure about potential licensing issues as tetgen was always kind of restrictive.

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