20 return "Plugin(MakeSimplex) decomposes all non-simplectic "
21 "elements (quadrangles, prisms, hexahedra, pyramids) in the "
22 "view `View' into simplices (triangles, tetrahedra).\n\n"
23 "If `View' < 0, the plugin is run on the current view.\n\n"
24 "Plugin(MakeSimplex) is executed in-place.";
38 std::vector<double> &listIn,
int *nbIn,
39 std::vector<double> &listOut,
int *nbOut)
43 double xNew[4], yNew[4], zNew[4];
47 int nb = listIn.size() / (*nbIn);
48 for(std::size_t i = 0; i < listIn.size(); i += nb) {
49 double *x = &listIn[i];
50 double *y = &listIn[i + nbNod];
51 double *
z = &listIn[i + 2 * nbNod];
52 double *val = &listIn[i + 3 * nbNod];
54 dec.
decompose(j, x, y,
z, val, xNew, yNew, zNew, valNew);
55 for(
int k = 0; k < dec.
numSimplexNodes(); k++) listOut.push_back(xNew[k]);
56 for(
int k = 0; k < dec.
numSimplexNodes(); k++) listOut.push_back(yNew[k]);
57 for(
int k = 0; k < dec.
numSimplexNodes(); k++) listOut.push_back(zNew[k]);
60 listOut.push_back(valNew[k]);
110 : _numNodes(numNodes), _numComponents(numComponents),
111 _numTimeSteps(numTimeSteps)
136 double *val,
double *xn,
double *yn,
double *zn,
139 for(
int i = 0; i < n; i++) {
145 int map2[4] = {map[0], map[1], map[2], map[3]};
147 for(
int i = 0; i < n; i++) {
155 double *val,
double *xn,
double *yn,
double *zn,
158 int quadTri[2][4] = {{0, 1, 2, -1}, {0, 2, 3, -1}};
159 int hexaTet[6][4] = {{0, 1, 3, 7}, {0, 4, 1, 7}, {1, 4, 5, 7},
160 {1, 2, 3, 7}, {1, 6, 2, 7}, {1, 5, 6, 7}};
161 int prisTet[3][4] = {{0, 1, 2, 4}, {0, 2, 4, 5}, {0, 3, 4, 5}};
162 int pyraTet[2][4] = {{0, 1, 3, 4}, {1, 2, 3, 4}};
170 case 4:
reorder(quadTri[num], 3, x, y,
z, val, xn, yn, zn, valn);
break;
171 case 8:
reorder(hexaTet[num], 4, x, y,
z, val, xn, yn, zn, valn);
break;
172 case 6:
reorder(prisTet[num], 4, x, y,
z, val, xn, yn, zn, valn);
break;
173 case 5:
reorder(pyraTet[num], 4, x, y,
z, val, xn, yn, zn, valn);
break;