diff --git a/Post/PViewData.h b/Post/PViewData.h index db1bd9a8d87fff3ae1e07123a47f45b9ddc8b187..5e01ed472e6da27bd4d9869825f86121b999236c 100644 --- a/Post/PViewData.h +++ b/Post/PViewData.h @@ -43,9 +43,9 @@ class PViewData { std::string _fileName; // index of the view in the file int _fileIndex; + protected: // adaptive visualization data adaptiveData *_adaptive; - protected: // interpolation matrices, indexed by the number of edges per // element (1 for lines, 3 for triangles, etc.) std::map<int, std::vector<List_T*> > _interpolation; diff --git a/Post/PViewDataListIO.cpp b/Post/PViewDataListIO.cpp index 5e139135589b379dac7af87fe98468de1ae5c27a..a15e76481a4f47575624342d3e5a295a7a8da6f4 100644 --- a/Post/PViewDataListIO.cpp +++ b/Post/PViewDataListIO.cpp @@ -1,4 +1,4 @@ -// $Id: PViewDataListIO.cpp,v 1.20 2008-05-04 08:31:24 geuzaine Exp $ +// $Id: PViewDataListIO.cpp,v 1.21 2008-06-27 10:09:19 remacle Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -28,6 +28,7 @@ #include "Numeric.h" #include "Message.h" #include "Context.h" +#include "adaptiveData.h" extern Context_T CTX; @@ -318,6 +319,11 @@ static void writeTextPOS(FILE *fp, int nbc, int nb, List_T *TD, List_T *TC) bool PViewDataList::writePOS(std::string fileName, bool binary, bool parsed, bool append) { + + if ( _adaptive ){ + return _adaptive->getData()->writePOS (fileName,binary,parsed,append); + } + FILE *fp = fopen(fileName.c_str(), append ? (binary ? "ab" : "a") : (binary ? "wb" : "w")); if(!fp){ @@ -338,7 +344,10 @@ bool PViewDataList::writePOS(std::string fileName, bool binary, bool parsed, boo if(!parsed){ fprintf(fp, "$View /* %s */\n", getName().c_str()); - fprintf(fp, "%s ", str); + if (strlen(str) == 0) + fprintf(fp, "noname "); + else + fprintf(fp, "%s ", str); fprintf(fp, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d " "%d %d %d %d %d %d %d %d %d %d %d %d\n", List_Nbr(Time),