[petsc-users] Load Vec from 1D HDF5 dataset MATT READ THIS EMAIL!
Håkon Strandenes
haakon at hakostra.net
Fri Mar 20 11:31:03 CDT 2015
Yes, in the HDF5 file. Currently a dof=1 DMDA Vec is saved as a NZ x NY
x NX dataset, wile a dof > 1 is saved as NZ x NY x NX x dof in the HDF5
file.
In my humble opinion, it is best to leave the DMDA's as it is, and fix
up the code related to the plain Vecs. That code is already full of "if
(bs >= 1) dim++" etc. which is useless (as Barry points out).
My final point is that one should handle this in a CONSISTENT manner for
both "plain Vecs" and "DMDA Vecs", i.e. decide wither one want to always
add one dimension for bs and dof or leave that dimension out for the
special case with bs=1/dof=1.
Håkon
On 20. mars 2015 16:57, Jed Brown wrote:
> Håkon Strandenes <haakon at hakostra.net> writes:
>> I mean that if you decide to stick with the current way of
>> reading/writing a "plain 1D" Vec with N elements as a N x 1
>> array/dataset, you should treat a dof=1 DMDA Vec as an NZ x NY x NX x 1
>> array/dataset.
>
> In the HDF5 file? I agree.
>
More information about the petsc-users
mailing list