Test+Problem+Data+Format+Conversion

=Converting to your preferred data format= Test problem pages: Overview, CADAC, Data Access, Work Area Setup, Path Setup, Utilities, Grid Data, SPH Data, Running, Reporting

There are precompiled binaries on **datastar** for interpolating the initial value data to any desired resolution and centering. These have been used to precompute some grid data and SPH data initial value files. You may want to either convert theses files to your private data format, or else include code that can read this data format in your simulation code.

To read for example the **data/hd256.dat** file, use this code snippet: code ... integer mx,my,mz,mv real sx,sy,sz real, allocatable, dimension:: rho,ux,uy,uz,bx,by,bz character(len=60) infile

infile='data/hd256.dat' call openr_grid(1,infile,mx,my,mz,mv,sx,sy,sz) allocate(rho(mx,my,mz),ux(mx,my,mz),uy(mx,my,mz),uz(mx,my,mz)) call read_grid(1,mx,my,mz,1,rho) call read_grid(1,mx,my,mz,2,ux) call read_grid(1,mx,my,mz,3,uy) call read_grid(1,mx,my,mz,4,uz) close(1) ... code Compile with (if on **datastar**) code xlf90_r params.f90 io_grid.f90 utils.f90 mycode.f90 -o mycode.x code and execute with code ./mycode.x code

To write output files directly in your preferred format
If you prefer to produce files in a form readable directly by your code, replace the routines **openw_grid** and **write_grid** with suitable code, recompile and run the utility again.