[petsc-users] VTS writer

Jed Brown jed at jedbrown.org
Wed Apr 29 07:03:01 CDT 2015


"Kharche, Sanjay" <S.R.Kharche at exeter.ac.uk> writes:

> Dear All
>
> I forgot to put the "3" or more lines of code I am using. Here they are.
>
>> I am using the following 3 lines to write vts files. It is a structured FD mesh. I now have difference space steps in the 3 directions: it is 1 and 1 in X and Y directions, and 2 in Z direction. Can anyone say how to write this to the vts header?
>
>
> // FD spacing in each direction
> #define DX           0.250                /* X internode spacing                    */
> #define DY           0.250                /* Y internode spacing                    */
> #define DZ           0.500                /* Z internode spacing: See suppl of paper. */

DMDASetUniformCoordinates

> .
> .
> main(){
> .
> .
> 			sprintf(str,"my_3d%d.vts",file_Counter++);
> 			PetscViewer viewer;
> 				PetscViewerVTKOpen(PETSC_COMM_WORLD,str,FILE_MODE_WRITE, &viewer);
> 				VecView(u, viewer);
> 			PetscViewerDestroy(&viewer);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150429/fcdfbc99/attachment.pgp>


More information about the petsc-users mailing list