/*------------------------------- phasicFlow --------------------------------- O C enter of O O E ngineering and O O M ultiscale modeling of OOOOOOO F luid flow ------------------------------------------------------------------------------ Copyright (C): www.cemf.ir email: hamid.r.norouzi AT gmail.com ------------------------------------------------------------------------------ Licence: This file is part of phasicFlow code. It is a free software for simulating granular and multiphase flows. You can redistribute it and/or modify it under the terms of GNU General Public License v3 or any other later versions. phasicFlow is distributed to help others in their research in the field of granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -----------------------------------------------------------------------------*/ #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 <