MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / setFromCellLoop

Function setFromCellLoop

src/dynamicMesh/meshCut/cellCuts/cellCuts.C:2203–2299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2201
2202
2203bool Foam::cellCuts::setFromCellLoop
2204(
2205 const label celli,
2206 const labelList& loop,
2207 const scalarField& loopWeights
2208)
2209{
2210 // Update basic cut information from single cellLoop. Returns true if loop
2211 // was valid.
2212
2213 // Dump loop for debugging.
2214 if (debug)
2215 {
2216 OFstream str("last_cell.obj");
2217
2218 str<< "# edges of cell " << celli << nl;
2219
2220 meshTools::writeOBJ
2221 (
2222 str,
2223 mesh().cells(),
2224 mesh().faces(),
2225 mesh().points(),
2226 labelList(1, celli)
2227 );
2228
2229
2230 OFstream loopStr("last_loop.obj");
2231
2232 loopStr<< "# looppoints for cell " << celli << nl;
2233
2234 pointField pointsOfLoop = loopPoints(loop, loopWeights);
2235
2236 forAll(pointsOfLoop, i)
2237 {
2238 meshTools::writeOBJ(loopStr, pointsOfLoop[i]);
2239 }
2240
2241 str << 'l';
2242
2243 forAll(pointsOfLoop, i)
2244 {
2245 str << ' ' << i + 1;
2246 }
2247 str << ' ' << 1 << nl;
2248 }
2249
2250 bool okLoop = false;
2251
2252 if (validEdgeLoop(loop, loopWeights))
2253 {
2254 // Storage for cuts across face
2255 Map<edge> faceSplitCuts(loop.size());
2256 // Storage for points on one side of cell
2257 labelList anchorPoints;
2258
2259 okLoop =
2260 validLoop(celli, loop, loopWeights, faceSplitCuts, anchorPoints);

Callers 2

setFromCellLoopsFunction · 0.85
setFromCellCutterFunction · 0.85

Calls 12

meshFunction · 0.85
validEdgeLoopFunction · 0.85
validLoopFunction · 0.85
writeOBJFunction · 0.70
forAllFunction · 0.50
forAllConstIterFunction · 0.50
facesMethod · 0.45
pointsMethod · 0.45
sizeMethod · 0.45
transferMethod · 0.45
insertMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected