diff --git a/Source/smokeview/IOboundary.c b/Source/smokeview/IOboundary.c index 41bd98908..21205edec 100644 --- a/Source/smokeview/IOboundary.c +++ b/Source/smokeview/IOboundary.c @@ -971,18 +971,26 @@ void GetPatchSizes1(FILE_m **stream, const char *patchfilename, unsigned char *b } // ! ------------------ GetPatchSizes2 ------------------------ - +//#define pp_PATCH_DEBUG void GetPatchSizes2(FILE_m *stream, int npatch, int nmeshes_arg, int *npatchsize, patchfacedata *patchfaceinfo, int *headersize, int *framesize){ int ijkp[9] = {0}; *npatchsize = 0; int n; +#ifdef pp_PATCH_DEBUG + FILE *fstream = fopen("patches.csv", "w"); + if(fstream!=NULL)fprintf(fstream,"patch index,i1,i2,j1,j2,k1,k2,dir,obst_index,mesh_index\n"); +#endif for(n = 0; n < npatch; n++){ patchfacedata *pfi; int obst_index, mesh_index; fseek_m(stream, 4, SEEK_CUR); fread_m(ijkp, sizeof(*ijkp), 9, stream); fseek_m(stream, 4, SEEK_CUR); +#ifdef pp_PATCH_DEBUG + if(fstream!=NULL)fprintf(fstream,"%i,%i, %i, %i, %i, %i, %i, %i, %i, %i\n", + n + 1, ijkp[0], ijkp[1], ijkp[2], ijkp[3], ijkp[4], ijkp[5], ijkp[6], ijkp[7], ijkp[8]); +#endif pfi = patchfaceinfo + n; memcpy(pfi->ib, ijkp, 6 * sizeof(int)); pfi->dir = ijkp[6]; @@ -1006,6 +1014,9 @@ void GetPatchSizes2(FILE_m *stream, int npatch, int nmeshes_arg, int *npatchsize *headersize += npatch * 4; *framesize = 8 + 4 + 8 * npatch + (*npatchsize) * 4; +#ifdef pp_PATCH_DEBUG + if(fstream!=NULL)fclose(fstream); +#endif return; } /* ------------------ DrawFace ------------------------ */ @@ -3222,7 +3233,7 @@ void DrawBoundaryCellCenter(const meshdata *meshi){ if(pfi->type==INTERIORwall)drawit = 1; if(pfi->obst == NULL && pfi->internal_mesh_face==1)drawit = 0; #ifdef pp_BNDF_DEBUG - if(bndf_vis_patch[n] == 0)drawit = 0; + if(n < NPATCHES_DEBUG && bndf_vis_patch[n] == 0)drawit = 0; #endif if(drawit==1){ nrow = pfi->nrow; @@ -3304,7 +3315,7 @@ void DrawBoundaryCellCenter(const meshdata *meshi){ } } #ifdef pp_BNDF_DEBUG - if(bndf_vis_patch[n] == 0)drawit = 0; + if(nobst == NULL && pfi->internal_mesh_face==1)drawit = 0; if(drawit==1){ @@ -3381,7 +3392,7 @@ void DrawBoundaryCellCenter(const meshdata *meshi){ } if(pfi->obst == NULL && pfi->internal_mesh_face==1)drawit = 0; #ifdef pp_BNDF_DEBUG - if(bndf_vis_patch[n] == 0)drawit = 0; + if(n < NPATCHES_DEBUG && bndf_vis_patch[n] == 0)drawit = 0; #endif if(drawit==1){ nrow = pfi->nrow;