forked from moebiusband/NuSiF-Solver
		
	Update VTK output format
This commit is contained in:
		@@ -88,8 +88,7 @@ void vtkScalar(VtkOptions* o, char* name, double* s)
 | 
			
		||||
    char* header = (char*)malloc(MAX_HEADER);
 | 
			
		||||
    char* cursor = header;
 | 
			
		||||
 | 
			
		||||
    cursor += sprintf(cursor, "SCALARS %s double 1\n", name);
 | 
			
		||||
    cursor += sprintf(cursor, "LOOKUP_TABLE default\n");
 | 
			
		||||
    cursor += sprintf(cursor, "SCALARS %s double\n", name);
 | 
			
		||||
 | 
			
		||||
    if (commIsMaster(&o->comm)) {
 | 
			
		||||
        MPI_File_write(o->fh, header, strlen(header), MPI_CHAR, MPI_STATUS_IGNORE);
 | 
			
		||||
 
 | 
			
		||||
@@ -69,8 +69,7 @@ void vtkScalar(VtkOptions* o, char* name, double* s)
 | 
			
		||||
        printf("vtkWriter not initialize! Call vtkOpen first!\n");
 | 
			
		||||
        exit(EXIT_FAILURE);
 | 
			
		||||
    }
 | 
			
		||||
    fprintf(o->fh, "SCALARS %s float 1\n", name);
 | 
			
		||||
    fprintf(o->fh, "LOOKUP_TABLE default\n");
 | 
			
		||||
    fprintf(o->fh, "SCALARS %s float\n", name);
 | 
			
		||||
 | 
			
		||||
    for (int k = 0; k < kmax; k++) {
 | 
			
		||||
        for (int j = 0; j < jmax; j++) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user