9 #ifndef POSTPROCESSING_H_INCLUDED
10 #define POSTPROCESSING_H_INCLUDED
20 #define TEST_POSTPROCESSING
54 static const int autoselect = 0;
55 static const int polyhedron = 1;
56 static const int polygon = 2;
57 static const int line = 3;
58 static const int point = 4;
60 static const int nosharedzone = -1;
61 static const auto __issharedzone = [](
int z) ->
bool {
return z > 0; };
64 static const std::string snaxel =
"snaxel";
65 static const std::string normal =
"normal";
66 static const std::string laplacian =
"laplacian";
67 static const std::string direction =
"direction";
68 static const std::string __default = snaxel;
86 bool isStrand(
int strandID)
88 return rsvs3d::logicals::__isfound(this->strands.find(strandID));
90 int OpenFile(
const char *str,
const char *mode =
"w");
93 return this->fid !=
nullptr;
101 int PrintMesh(
const mesh &meshout,
int strandID = 0,
double timeStep = 0,
102 int forceOutType = rsvs3d::constants::tecplot::autoselect,
const std::vector<int> &vertList = {});
103 int PrintSnakeInternalPts(
const snake &snakein,
int strandID = 0,
double timeStep = 0);
104 int VolDataBlock(
const mesh &meshout,
int nVert,
int nVolu,
int nVertDat,
const std::vector<int> &voluList = {},
105 const std::vector<int> &vertList = {});
106 int SurfDataBlock(
const mesh &meshout,
int nVert,
int nSurf,
int nVertDat);
107 int LineDataBlock(
const mesh &meshout,
int nVert,
int nEdge,
int nVertDat,
int nCellDat);
108 int VertDataBlock(
const mesh &meshout,
int nVert,
int nVertDat,
int nCellDat,
109 const std::vector<int> &vertList = {});
110 int VolFaceMap(
const mesh &meshout,
int nSurf);
111 int VolFaceMap(
const mesh &meshout,
const std::vector<int> &surfList,
const std::vector<int> &voluList,
112 const std::vector<int> &vertList);
113 int SurfFaceMap(
const mesh &meshout,
int nEdge);
114 int LineFaceMap(
const mesh &meshout,
int nEdge);
116 int PrintVolumeDat(
const mesh &meshout,
int shareZone,
int strandID,
double timeStep);
117 int DefShareZoneVolume(
int shareZone,
int nVertDat);
125 int nCellDat,
const std::vector<int> &triList);
128 int LineFaceMap(
const std::vector<int> &triList);
131 double timeStep = 0,
int forceOutType = rsvs3d::constants::tecplot::autoselect,
132 const std::vector<int> &triList = {});
143 double timeStep = 0,
int forceOutType = rsvs3d::constants::tecplot::autoselect);
146 int SnakeDataBlock(
const snake &snakeout,
int nVert,
int nVertDat,
147 std::string = rsvs3d::constants::tecplot::snakedata::__default,
bool printCoord =
true);
148 int PrintSnake(
const snake &snakeout,
int strandID = 0,
double timeStep = 0,
149 int forceOutType = rsvs3d::constants::tecplot::autoselect,
const std::vector<int> &vertList = {});
150 int PrintSnake(std::string snakeData,
const snake &snakeout,
int strandID = 0,
double timeStep = 0,
151 int forceOutType = rsvs3d::constants::tecplot::autoselect,
152 int coordConnShareZone = rsvs3d::constants::tecplot::nosharedzone,
153 const std::vector<int> &vertList = {});
155 void ZoneHeaderPolyhedron(
int nVert,
int nVolu,
int nSurf,
int totNumFaceNode,
int nVertDat,
int nCellDat);
156 void ZoneHeaderPolygon(
int nVert,
int nEdge,
int nSurf,
int nVertDat,
int nCellDat);
157 void ZoneHeaderFelineseg(
int nVert,
int nEdge,
int nVertDat,
int nCellDat);
158 void ZoneHeaderOrdered(
int nVert,
int nVertDat,
int nCellDat,
int nSensDat = 0);
160 void ZoneHeaderPolyhedronSnake(
int nVert,
int nVolu,
int nSurf,
int totNumFaceNode,
int nVertDat,
int nCellDat,
162 void ZoneHeaderPolygonSnake(
int nVert,
int nEdge,
int nSurf,
int nVertDat,
int nCellDat,
int nSensDat = 0);
163 void ZoneHeaderFelinesegSnake(
int nVert,
int nEdge,
int nVertDat,
int nCellDat,
int nSensDat = 0);
167 double timeStep = 0,
int forceOutType = rsvs3d::constants::tecplot::autoselect,
168 const std::vector<int> &vertList = {});
169 int RSVScalcDataBlock(
const triangulation &triRSVS,
const RSVScalc &calcObj,
int nVert,
int nSensDat,
170 int sensStart = 0,
int methodProcess = 1);
171 int RSVScalcVectorDataBlock(
const triangulation &triRSVS,
const RSVScalc &calcObj,
int nVert,
int numConstrPlot = 0,
172 int methodProcess = 1);
173 int PrintSnakeSensitivityTime(
const triangulation &triRSVS,
const RSVScalc &calcObj,
int strandID = 0,
174 double timeStep = 0,
int forceOutType = rsvs3d::constants::tecplot::autoselect,
175 const std::vector<int> &vertList = {});
176 int PrintSnakeSensitivityVector(
const triangulation &triRSVS,
const RSVScalc &calcObj,
int strandID = 0,
177 double timeStep = 0,
int forceOutType = rsvs3d::constants::tecplot::autoselect,
178 const std::vector<int> &vertList = {});
180 double timeStep = 0,
int forceOutType = rsvs3d::constants::tecplot::autoselect,
181 const std::vector<int> &vertList = {});
186 this->lengthLine = 0;
187 this->isloud =
false;
193 this->isloud = isloudIn;
196 std::cout <<
"tecplot file object created" << std::endl;
206 std::cout <<
"Object deleted - File Closed" << std::endl;
213 std::cout <<
"Object deleted - No File Closed" << std::endl;
220 this->Print(
"ZONE\n");
223 void StrandTime(
int strandID,
double timeStep)
225 this->Print(
"STRANDID = %i \nSOLUTIONTIME = %.10lf \n", strandID, timeStep);
226 if (!rsvs3d::logicals::__isfound(this->strands.find(strandID)))
228 this->strands.push_back(strandID);
232 int Print(
const char *format, ...)
241 va_start(arg, format);
242 i = vfprintf(fid, format, arg);
245 if (lengthLine > 25000)
269 void Coord(
tecplotfile &tecout,
const mesh &meshout,
int nVert,
int nVertDat);
272 void VertexLaplacian(
tecplotfile &tecout,
const mesh &meshin,
int nVert);
275 int Test_tecplotfile();
276 int TestCompareReadWrite(
const char *fileToOpen,
mesh &blockGrid,
tecplotfile &outmesh1);
Provide std::vector container with hashed index mapping.
Class to handle the RSVS calculation.
std::tuple< coordvec, double > VertexNormal(const std::vector< double > ¢re, const grid::coordlist &vecPts)
Calculates the vertex normal weighted by surface angle partitions.
Namespace for general purpose tools of the RSVS project.