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

Concatenated Mesh garbled by dump.write/read #187

Closed
guyer opened this issue Sep 19, 2014 · 5 comments
Closed

Concatenated Mesh garbled by dump.write/read #187

guyer opened this issue Sep 19, 2014 · 5 comments

Comments

@guyer
Copy link
Member

guyer commented Sep 19, 2014

>>> from fipy import *
>>> mesh_orig = (Grid2D(nx=8, ny=2) + [[-2], [4]]) + Grid2D(nx=4, ny=4)
>>> var_orig = CellVariable(mesh=mesh_orig)
>>> Viewer(vars=var_orig).plot()
>>> dump.write(mesh_orig, filename='dumped')

looks fine,
original.png
but after pickling and rereading

>>> mesh_dump = dump.read(filename='dumped')
>>> var_dump = CellVariable(mesh=mesh_dump)
>>> Viewer(vars=var_dump).plot()

the mesh is garbled.
after_dump.png

Imported from trac ticket #243, created by guyer on 11-02-2009 at 11:14, last modified: 12-08-2010 at 16:12

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

guyer attached after_dump.png on 11-02-2009 at 11:15

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

guyer attached original.png on 11-02-2009 at 11:15

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

Fixed in 3765/branches/version-2_1 and 3766/trunk

Trac comment by guyer on 07-30-2010 at 10:26

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

works on

Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin

fipy version 2.2-dev4018
numpy version 2.0.0.dev8324
pysparse version 1.2a1
PyTrilinos version 4.3
scipy version 0.8.0.dev6304
matplotlib version 1.0.svn
gist is not installed
mayavi is not installed
mpi4py version 1.2.1

Fails with

Python 2.5.2 (r252:60911, Jan 24 2010, 14:53:14) 
[GCC 4.3.2] on linux2

fipy version 2.2-dev4018
numpy version 1.3.0
pysparse version 1.1.1-dev
PyTrilinos version 4.1
scipy version 0.7.2
matplotlib version 1.0.0
gist is not installed
mayavi is not installed
mpi4py version 1.2.1

Trac comment by guyer on 11-30-2010 at 11:15

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

This was a manifestation of numpy:issue #979 (F_CONTIGUOUS masked arrays don't pickle correctly).

Fixed with 4025/trunk and 4026/branches/version-2_1.

Trac comment by guyer on 12-08-2010 at 16:12

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

No branches or pull requests

2 participants