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

Function setFromCellCutter

src/dynamicMesh/meshCut/cellCuts/cellCuts.C:2338–2461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2336
2337
2338void Foam::cellCuts::setFromCellCutter
2339(
2340 const cellLooper& cellCutter,
2341 const List<refineCell>& refCells
2342)
2343{
2344 // 'Uncut' edges/vertices that are not used in loops.
2345 pointIsCut_ = false;
2346
2347 edgeIsCut_ = false;
2348
2349 // storage for loop of cuts (cut vertices and/or cut edges)
2350 labelList cellLoop;
2351 scalarField cellLoopWeights;
2352
2353 // For debugging purposes
2354 DynamicList<label> invalidCutCells(2);
2355 DynamicList<labelList> invalidCutLoops(2);
2356 DynamicList<scalarField> invalidCutLoopWeights(2);
2357
2358
2359 forAll(refCells, refCelli)
2360 {
2361 const refineCell& refCell = refCells[refCelli];
2362
2363 label celli = refCell.cellNo();
2364
2365 const vector& refDir = refCell.direction();
2366
2367
2368 // Cut cell. Determines cellLoop and cellLoopWeights
2369 bool goodCut =
2370 cellCutter.cut
2371 (
2372 refDir,
2373 celli,
2374
2375 pointIsCut_,
2376 edgeIsCut_,
2377 edgeWeight_,
2378
2379 cellLoop,
2380 cellLoopWeights
2381 );
2382
2383 // Check whether edge refinement is on a per face basis compatible with
2384 // current pattern.
2385 if (goodCut)
2386 {
2387 if (setFromCellLoop(celli, cellLoop, cellLoopWeights))
2388 {
2389 // Valid loop. Will have updated all info already.
2390 }
2391 else
2392 {
2393 cellLoops_[celli].setSize(0);
2394
2395 WarningInFunction

Callers 1

cellCuts.CFile · 0.85

Calls 12

setFromCellLoopFunction · 0.85
meshFunction · 0.85
cellNoMethod · 0.80
cutMethod · 0.80
shrinkMethod · 0.80
writeOBJFunction · 0.70
forAllFunction · 0.50
setSizeMethod · 0.45
appendMethod · 0.45
sizeMethod · 0.45
facesMethod · 0.45
pointsMethod · 0.45

Tested by

no test coverage detected