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 volScalarField scalarField
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 celli=0; celli<nCells; celli++)
47 const cellShape& cellShape = cellShapes[celli];
48 const cellModel& cellModel = cellShape.model();
50 if (cellModel == hex) // || (cellModel == wedge))
52 var_array[counter++] = scalarField[celli];
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++] = scalarField[n];
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++] = scalarField[n];
94 if (which_type == Z_TET04)
96 const cellModel& tet = *(cellModeller::lookup("tet"));
99 for (label n=0; n<nCells; n++)
101 const cellShape& cellShape = cellShapes[n];
102 const cellModel& cellModel = cellShape.model();
104 if (cellModel == tet)
106 var_array[counter++] = scalarField[n];
111 if (which_type == Z_NFACED)
113 const cellList& cells = secondMeshPtr->cells();
116 for (label n=0; n<nCells; n++)
118 const labelList& points = cellShapes[n];
119 label nFacesInCell = cells[n].size();
121 if ((nFacesInCell == 6) && (points.size() == 8))
123 else if ((nFacesInCell == 4) && (points.size() == 4))
125 else if (nFacesInCell == 5)
127 if (points.size() == 6)
129 else if (points.size() == 5)
133 var_array[counter++] = scalarField[n];
138 var_array[counter++] = scalarField[n];