Main output driver.
More...
WriteData() is the main driver for writing data arrays in any of the available formats (binary, VTK, HDF5, etc...).
- For .dbl, .flt or .vtk file formats, access to binary files is provided by the functions in bin_io.c.
- HDF5 files are handled by hdf5_io.c.
- image files are handled by write_img.c
- tabulated ascii files are handled by write_tab.c
This function also updates the corresponding .out file associated with the output data format.
- Authors
- A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
G. Muscianisi (g.mus.nosp@m.cian.nosp@m.isi@c.nosp@m.inec.nosp@m.a.it)
- Date
- Aug 24, 2012
void ConsToPrim3D |
( |
const Data * |
d, |
|
|
int |
where |
|
) |
| |
Convert the data array d->Uc into d->Vc inside the computational domain.
void PrimToCons3D |
( |
const Data * |
d, |
|
|
int |
where |
|
) |
| |
Convert the data array d->Vc into d->Uc inside the computational domain.
Write data to disk using any of the available formats.
- Parameters
-
[in] | d | pointer to PLUTO Data structre |
[in] | output | the output structure corresponding to a given format |
[in] | grid | pointer to an array of Grid structures |
- DBL output: Double-precision data files can be written using single or multiple file mode.
- for single file, serial: we open the file just once before the main variable loop, dump variables and then close.
- for single file, parallel the distributed array descriptor sz is different for cell-centered or staggered data type and we thus have to open and close the file after each variable has been dumped.
- when writing multiple files we open, write to and close the file one each loop cycle.
- Note
- In all cases, the pointer to the data array that has to be written must be cast into (void *) and the starting index of the array must be zero.
- VTK output: in order to enable parallel writing, files must be closed and opened again for scalars, since the distributed array descriptors used by ArrayLib (Float_Vect) and (float) are different. This is done using the AL_Get_offset() and AL_Set_offset() functions.