#include "vocabs.hpp" #include "vtkFile.hpp" #include "triSurfaceFieldToVTK.hpp" bool pFlow::TSFtoVTK::convertTimeFolderTriSurfaceFields( systemControl &control, const fileSystem &destPath, const word &bName, bool separate, wordList& surfNames, wordList& fileNames) { auto timeFolder = control.geometry().path(); surfNames.clear(); fileNames.clear(); // check if pointStructure exist in this folder IOfileHeader triSurfaeHeader( objectFile( triSurfaceFile__, timeFolder, objectFile::READ_ALWAYS, objectFile::WRITE_ALWAYS)); if (!triSurfaeHeader.headerOk(true)) { WARNING << "Time folder " << timeFolder << " does not contain any triSurface data file." << " Skipping this folder . . ." << END_WARNING; return true; } auto triSurfaceObj = multiTriSurface( objectFile( triSurfaceFile__, "", objectFile::READ_ALWAYS, objectFile::WRITE_ALWAYS), &control.geometry()); if(separate) { return convertTimeFolderTriSurfaceFieldsSeparate( triSurfaceObj, destPath, control.time().currentTime(), bName, surfNames, fileNames); } else { return convertTimeFolderTriSurfaceFieldsSingle( triSurfaceObj, destPath, control.time().currentTime(), bName, surfNames, fileNames ); } } bool pFlow::TSFtoVTK::triSurfaceToVTK( Ostream &os, const realx3 *points, const uint32x3 *vertices, const subSurface &subSurf) { auto nP = subSurf.numPoints(); os << "DATASET UNSTRUCTURED_GRID" << endl; os << "POINTS " << nP << " float" << endl; for ( auto i=subSurf.pointStart(); i(objectType))return false; auto field = realx3TriSurfaceField_H ( header, tSurface, static_cast(0) ); const realx3* data = field.deviceViewAll().data(); REPORT(1)<<"writing "<< greenColor <(objectType))return false; auto field = realx3TriSurfaceField_H ( header, tSurface, static_cast(0) ); const realx3* data = field.deviceViewAll().data(); /*REPORT(1)<<"writing "<< greenColor <