I filed https://github.com/usnistgov/fipy/issues/691 to address this
> On Jan 9, 2020, at 8:34 AM, Guyer, Jonathan E. Dr. (Fed) via fipy
> wrote:
>
> Thank you for the feedback. I'm inclined to agree.
>
> - Jon
>
>> On Jan 9, 2020, at 3:47 AM, Marcel UJI (IMAP) wrote:
>>
>> Hi Jonathan
>>
Thank you for the feedback. I'm inclined to agree.
- Jon
> On Jan 9, 2020, at 3:47 AM, Marcel UJI (IMAP) wrote:
>
> Hi Jonathan
>
> Sorry by my late reply
>
> I think that the second one would be enough as I only need to read this data
> later for further processing. Actually this is not
Hi Jonathan
Sorry by my late reply
I think that the second one would be enough as I only need to read this
data later for further processing. Actually this is not much an issue,
as I can simply save phi and later recompute phi.faceGrad, which is also
much more economic in terms of storage.
Glad you found a solution, Marcel.
The issue is that a FaceGradVariable doesn't pickle itself properly. It stores
the state for a generic FaceVariable, but then it doesn't know how to rebuild
itself from that.
It either should
- pickle the correct information, which would also involve
Thank you Trevor,
This works, but it saves the array values only.
I found an alternative solution with:
dump.write({'E' :
FaceVariable(mesh=mesh,value=phi.faceGrad,rank=1)},filename='prova.gz',extension='.gz')
which preserves the FaceVariable character.
Merry Christmas!
Marcel
El
The error message indicates that `dump.read` got something unexpected
-- namely, a `value` field -- and threw.
Naïvely, dumping `phi.faceGrad.value` instea dof `phi.faceGrad`
appears to do the trick.
--
Trevor Keller, Ph.D.
Materials Science and Engineering Division
National Institute of
I'm getting errors dumping *vector* variables in fipy. This minimal code
shows the problem:
from fipy import *
mesh=Grid3D(nx=10,ny=10,nz=10)
phi=CellVariable(mesh=mesh,value=(mesh.x*mesh.y))
dump.write({'E' : (phi.faceGrad)},filename='prova.gz',extension='.gz')
fitxer=dump.read('prova.gz')