1 label offset = Num_variables - nSecondMeshVariables - nFaMeshVariables;
3 if (nVar < offset || nVar >= (Num_variables-nFaMeshVariables))
8 IOobject fieldObjectPtr
10 secondMeshFieldNames[secondMeshVar2field[nVar-offset]],
16 if (!fieldObjectPtr.headerOk())
23 secondMeshFieldNames[secondMeshVar2field[nVar-offset]],
30 volVectorField vectorField
36 const cellShapeList& cellShapes = secondMeshPtr->cellShapes();
39 if (which_type == Z_HEX08)
41 const cellModel& hex = *(cellModeller::lookup("hex"));
42 //const cellModel& wedge = *(cellModeller::lookup("wedge"));
45 for (label n=0; n<nCells; n++)
47 const cellShape& cellShape = cellShapes[n];
48 const cellModel& cellModel = cellShape.model();
50 if (cellModel == hex) // || (cellModel == wedge))
52 var_array[counter++] = vectorField[n][component];
58 if (which_type == Z_PEN06)
60 const cellModel& prism = *(cellModeller::lookup("prism"));
63 for (label n=0; n<nCells; n++)
65 const cellShape& cellShape = cellShapes[n];
66 const cellModel& cellModel = cellShape.model();
68 if (cellModel == prism)
70 var_array[counter++] = vectorField[n][component];
76 if (which_type == Z_PYR05)
78 const cellModel& pyr = *(cellModeller::lookup("pyr"));
81 for (label n=0; n<nCells; n++)
83 const cellShape& cellShape = cellShapes[n];
84 const cellModel& cellModel = cellShape.model();
88 var_array[counter++] = vectorField[n][component];
95 if (which_type == Z_TET04)
97 const cellModel& tet = *(cellModeller::lookup("tet"));
100 for (label n=0; n<nCells; n++)
102 const cellShape& cellShape = cellShapes[n];
103 const cellModel& cellModel = cellShape.model();
105 if (cellModel == tet)
107 var_array[counter++] = vectorField[n][component];
112 if (which_type == Z_NFACED)
114 const cellList& cells = secondMeshPtr->cells();
117 for (label n=0; n<nCells; n++)
119 const labelList& points = cellShapes[n];
120 label nFacesInCell = cells[n].size();
122 if ((nFacesInCell == 6) && (points.size() == 8))
124 else if ((nFacesInCell == 4) && (points.size() == 4))
126 else if (nFacesInCell == 5)
128 if (points.size() == 6)
130 else if (points.size() == 5)
134 var_array[counter++] = vectorField[n][component];
139 var_array[counter++] = vectorField[n][component];