| 166 | // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // |
| 167 | |
| 168 | bool Foam::hexCellLooper::cut |
| 169 | ( |
| 170 | const vector& refDir, |
| 171 | const label celli, |
| 172 | const boolList& vertIsCut, |
| 173 | const boolList& edgeIsCut, |
| 174 | const scalarField& edgeWeight, |
| 175 | |
| 176 | labelList& loop, |
| 177 | scalarField& loopWeights |
| 178 | ) const |
| 179 | { |
| 180 | bool success = false; |
| 181 | |
| 182 | if (mesh().cellShapes()[celli].model() == hex_) |
| 183 | { |
| 184 | // Get starting edge. Note: should be compatible with way refDir is |
| 185 | // determined. |
| 186 | label edgeI = meshTools::cutDirToEdge(mesh(), celli, refDir); |
| 187 | |
| 188 | // Get any face using edge |
| 189 | label face0; |
| 190 | label face1; |
| 191 | meshTools::getEdgeFaces(mesh(), celli, edgeI, face0, face1); |
| 192 | |
| 193 | // Walk circumference of hex, cutting edges only |
| 194 | loop.setSize(4); |
| 195 | loopWeights.setSize(4); |
| 196 | |
| 197 | success = walkHex(celli, face0, edgeI, loop, loopWeights); |
| 198 | } |
| 199 | else |
| 200 | { |
| 201 | success = geomCellLooper::cut |
| 202 | ( |
| 203 | refDir, |
| 204 | celli, |
| 205 | vertIsCut, |
| 206 | edgeIsCut, |
| 207 | edgeWeight, |
| 208 | |
| 209 | loop, |
| 210 | loopWeights |
| 211 | ); |
| 212 | } |
| 213 | |
| 214 | if (debug) |
| 215 | { |
| 216 | if (loop.empty()) |
| 217 | { |
| 218 | WarningInFunction |
| 219 | << "could not cut cell " << celli << endl; |
| 220 | |
| 221 | fileName cutsFile("hexCellLooper_" + name(celli) + ".obj"); |
| 222 | |
| 223 | Pout<< "hexCellLooper : writing cell to " << cutsFile << endl; |
| 224 | |
| 225 | OFstream cutsStream(cutsFile); |
nothing calls this directly
no test coverage detected