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

Function calcCutTypes

src/sampling/sampledSurface/isoSurface/isoSurface.C:339–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337
338
339void Foam::isoSurface::calcCutTypes
340(
341 const labelList& boundaryRegion,
342 const volVectorField& meshC,
343 const volScalarField& cVals,
344 const scalarField& pVals
345)
346{
347 const polyBoundaryMesh& patches = mesh_.boundaryMesh();
348 const labelList& own = mesh_.faceOwner();
349 const labelList& nei = mesh_.faceNeighbour();
350
351 faceCutType_.setSize(mesh_.nFaces());
352 faceCutType_ = NOTCUT;
353
354 for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
355 {
356 // CC edge.
357 bool ownLower = (cVals[own[facei]] < iso_);
358
359 scalar nbrValue;
360 point nbrPoint;
361 getNeighbour
362 (
363 boundaryRegion,
364 meshC,
365 cVals,
366 own[facei],
367 facei,
368 nbrValue,
369 nbrPoint
370 );
371
372 bool neiLower = (nbrValue < iso_);
373
374 if (ownLower != neiLower)
375 {
376 faceCutType_[facei] = CUT;
377 }
378 else
379 {
380 // See if any mesh edge is cut by looping over all the edges of the
381 // face.
382 const face f = mesh_.faces()[facei];
383
384 if (isEdgeOfFaceCut(pVals, f, ownLower, neiLower))
385 {
386 faceCutType_[facei] = CUT;
387 }
388 }
389 }
390
391 forAll(patches, patchi)
392 {
393 const polyPatch& pp = patches[patchi];
394
395 label facei = pp.start();
396

Callers 1

isoSurface.CFile · 0.70

Calls 9

getNeighbourFunction · 0.85
isEdgeOfFaceCutFunction · 0.85
forAllFunction · 0.50
setSizeMethod · 0.45
nFacesMethod · 0.45
nInternalFacesMethod · 0.45
facesMethod · 0.45
startMethod · 0.45
nCellsMethod · 0.45

Tested by

no test coverage detected