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

Function setMRFFaces

src/finiteVolume/cfdTools/general/MRF/MRFZone.C:45–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44
45void Foam::MRFZone::setMRFFaces()
46{
47 const polyBoundaryMesh& patches = mesh_.boundaryMesh();
48
49 // Type per face:
50 // 0:not in zone
51 // 1:moving with frame
52 // 2:other
53 labelList faceType(mesh_.nFaces(), 0);
54
55 // Determine faces in cell zone
56 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 // (without constructing cells)
58
59 const labelList& own = mesh_.faceOwner();
60 const labelList& nei = mesh_.faceNeighbour();
61
62 // Cells in zone
63 boolList zoneCell(mesh_.nCells(), false);
64
65 if (cellZoneID_ != -1)
66 {
67 const labelList& cellLabels = mesh_.cellZones()[cellZoneID_];
68 forAll(cellLabels, i)
69 {
70 zoneCell[cellLabels[i]] = true;
71 }
72 }
73
74
75 label nZoneFaces = 0;
76
77 for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
78 {
79 if (zoneCell[own[facei]] || zoneCell[nei[facei]])
80 {
81 faceType[facei] = 1;
82 nZoneFaces++;
83 }
84 }
85
86
87 labelHashSet excludedPatches(excludedPatchLabels_);
88
89 forAll(patches, patchi)
90 {
91 const polyPatch& pp = patches[patchi];
92
93 if (pp.coupled() || excludedPatches.found(patchi))
94 {
95 forAll(pp, i)
96 {
97 label facei = pp.start()+i;
98
99 if (zoneCell[own[facei]])
100 {
101 faceType[facei] = 2;
102 nZoneFaces++;

Callers 2

MRFZone.CFile · 0.85
updateMeshMethod · 0.85

Calls 11

forAllFunction · 0.50
nInternalFacesMethod · 0.45
coupledMethod · 0.45
foundMethod · 0.45
startMethod · 0.45
setSizeMethod · 0.45
nFacesMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45
writeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected