[Nek5000-users] fld output

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Nov 5 06:49:33 CST 2013


Hi JP,

>From mfo_outv() in prepost .f, I see that the .f0000 file format
for a vector field (like velocity or xyz), will be:

nxyz values of x
nxyz values of y
nxyz values of z  (if ndim=3)

for each element e=1,...,E, where nxyz = lx1*ly1*lz1.
They will be in 32-bit reals, unless otherwise specified
by the user.

Crucial question here is what order the elements are
written.   That is also specified near the header.
Here is the relevant code:


#ifdef MPIIO
       ioff = iHeaderSize + 4 + nelB*isize
       call byte_set_view (ioff,ifh_mbyte)
       call byte_write_mpi(lglel,nelt,-1,ifh_mbyte,ierr)
#else
       call byte_write(lglel,nelt,ierr)
#endif

The array lglel() is the Local-to-Global Element numbering.
So, on a given processor, for e=1,...,E_local (aka nelt),
spans some ordering in the global element numbering.  This
ordering is a function of how the domain is partitioned 
across processors - which impacts the contents of the output
file but is not crucial because all of the relevant information
(i.e., lglel) is encoded in the header of the f0000 files.


The endian (big or little) can be determined when the
file is opened for reading by looking at the test word,
6.54321, which is the first real written after the 132 byte header

I would recommend looking either at ic.f (where the files
are read) or prepost.f (where they are written) to get
the precise details.

Are you using MPIIO ?  If so, the file structure is a bit
different -- I didn't write that part so would have to dig 
to find the precise format in that case.

Paul





On Tue, 5 Nov 2013, nek5000-users at lists.mcs.anl.gov wrote:

> Hi Paul,
>
> I basically would like to know the exact format of the files to be able to
> manipulate them. But knowing where the format is set and being able to edit
> it would allow me to write the files directly in any format.
>
> Thank you,
> JP
>


More information about the Nek5000-users mailing list