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 > <fipy@nist.gov> wrote: > > Thank you for the feedback. I'm inclined to agree. > > - Jon > >> On Jan 9, 2020, at 3:47 AM, Marcel UJI (IMAP) <a...@uji.es> 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 much an issue, as I can >> simply save phi and later recompute phi.faceGrad, which is also much more >> economic in terms of storage. >> >> Thank you anyway for spending some time on this >> >> Marcel >> >> >> >> El 20/12/19 a les 16:27, Guyer, Jonathan E. Dr. (Fed) via fipy ha escrit: >>> 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 pickling phi >>> OR >>> - pickle itself as a plain FaceVariable, losing connection to phi on >>> unpickling (which is what your solution does) >>> >>> Do you have an opinion on which behavior you'd like? >>> >>> >>>> On Dec 20, 2019, at 2:35 AM, Marcel UJI (IMAP) <a...@uji.es> >>>> wrote: >>>> >>>> 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 19/12/19 a les 19:04, Keller, Trevor (Fed) via fipy ha escrit: >>>> >>>>> 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. >>>>> >>>>> >>>>> >>>> -- >>>> Dr. Marcel Aguilella-Arzo >>>> Professor Titular d'Universitat, Física Aplicada >>>> Coordinador de la Subespecialitat de CCEETT del Màster en Professor >>>> d'Educació Secundària >>>> Departament de Física >>>> Escola Superior de Tecnologia i Ciències Experimentals >>>> Universitat Jaume I >>>> Av. Sos Baynat, s/n >>>> 12071 Castelló de la Plana (Spain) >>>> +34 964 728 046 >>>> >>>> >>>> a...@uji.es >>>> >>>> _______________________________________________ >>>> fipy mailing list >>>> >>>> fipy@nist.gov >>>> http://www.ctcms.nist.gov/fipy >>>> >>>> [ NIST internal ONLY: >>>> https://email.nist.gov/mailman/listinfo/fipy >>>> ] >>>> >>> >>> _______________________________________________ >>> fipy mailing list >>> >>> fipy@nist.gov >>> http://www.ctcms.nist.gov/fipy >>> >>> [ NIST internal ONLY: >>> https://email.nist.gov/mailman/listinfo/fipy >>> ] >>> >> -- >> Dr. Marcel Aguilella-Arzo >> Professor Titular d'Universitat, Física Aplicada >> Coordinador de la Subespecialitat de CCEETT del Màster en Professor >> d'Educació Secundària >> Departament de Física >> Escola Superior de Tecnologia i Ciències Experimentals >> Universitat Jaume I >> Av. Sos Baynat, s/n >> 12071 Castelló de la Plana (Spain) >> +34 964 728 046 >> >> a...@uji.es >> _______________________________________________ >> fipy mailing list >> fipy@nist.gov >> http://www.ctcms.nist.gov/fipy >> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]