/[escript]/trunk/finley/src/Mesh_saveVTK.c
ViewVC logotype

Diff of /trunk/finley/src/Mesh_saveVTK.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2141 by caltinay, Tue Dec 9 04:32:32 2008 UTC revision 2256 by jfenwick, Mon Feb 9 06:20:32 2009 UTC
# Line 22  Line 22 
22  #include "paso/PasoUtil.h"  #include "paso/PasoUtil.h"
23    
24  #define INT_FORMAT "%d "  #define INT_FORMAT "%d "
25  #define LEN_INT_FORMAT (9+1)  #define LEN_INT_FORMAT (unsigned int)(9+1)
26  #define INT_NEWLINE_FORMAT "%d\n"  #define INT_NEWLINE_FORMAT "%d\n"
27  #define SCALAR_FORMAT "%12.6e\n"  #define SCALAR_FORMAT "%12.6e\n"
28  #define VECTOR_FORMAT "%12.6e %12.6e %12.6e\n"  #define VECTOR_FORMAT "%12.6e %12.6e %12.6e\n"
29  #define TENSOR_FORMAT "%12.6e %12.6e %12.6e %12.6e %12.6e %12.6e %12.6e %12.6e %12.6e\n"  #define TENSOR_FORMAT "%12.6e %12.6e %12.6e %12.6e %12.6e %12.6e %12.6e %12.6e %12.6e\n"
30  #define LEN_TENSOR_FORMAT (9*(12+1)+1)  #define LEN_TENSOR_FORMAT (unsigned int)(9*(12+1)+1)
31  #define NEWLINE "\n"  #define NEWLINE "\n"
32  #define LEN_TMP_BUFFER LEN_TENSOR_FORMAT+(MAX_numNodes*LEN_INT_FORMAT+1)+2  #define LEN_TMP_BUFFER LEN_TENSOR_FORMAT+(MAX_numNodes*LEN_INT_FORMAT+1)+2
33  #define NCOMP_MAX 9  #define NCOMP_MAX (unsigned int)9
34    
35  #define __STRCAT(dest, chunk, dest_in_use) \  #define __STRCAT(dest, chunk, dest_in_use) \
36  do {\  do {\
# Line 488  void Finley_Mesh_saveVTK(const char *fil Line 488  void Finley_Mesh_saveVTK(const char *fil
488      txtBufferSize = strlen(vtkHeader) + 3*LEN_INT_FORMAT + (30+3*maxNameLen);      txtBufferSize = strlen(vtkHeader) + 3*LEN_INT_FORMAT + (30+3*maxNameLen);
489    
490      if (mpi_size > 1) {      if (mpi_size > 1) {
491          txtBufferSize = MAX(txtBufferSize, myNumPoints * LEN_TMP_BUFFER);         txtBufferSize = MAX(txtBufferSize, myNumPoints * LEN_TMP_BUFFER);
492          txtBufferSize = MAX(txtBufferSize, numCellFactor * myNumCells *          txtBufferSize = MAX(txtBufferSize, numCellFactor * myNumCells *
493                  (LEN_INT_FORMAT * numVTKNodesPerElement + 1));                  (LEN_INT_FORMAT * numVTKNodesPerElement + 1));
494          txtBufferSize = MAX(txtBufferSize,          txtBufferSize = MAX(txtBufferSize,
# Line 1015  void Finley_Mesh_saveVTK(const char *fil Line 1015  void Finley_Mesh_saveVTK(const char *fil
1015      if ( mpi_size > 1) {      if ( mpi_size > 1) {
1016  #ifdef PASO_MPI  #ifdef PASO_MPI
1017          MPI_File_close(&mpi_fileHandle_p);          MPI_File_close(&mpi_fileHandle_p);
1018        MPI_Barrier(mesh_p->Nodes->MPIInfo->comm);
1019  #endif  #endif
1020      } else {      } else {
1021          fclose(fileHandle_p);          fclose(fileHandle_p);

Legend:
Removed from v.2141  
changed lines
  Added in v.2256

  ViewVC Help
Powered by ViewVC 1.1.26