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

Function main

applications/test/patchRegion/Test-patchRegion.C:45–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// Main program:
44
45int main(int argc, char *argv[])
46{
47 argList::validArgs.append("patch");
48
49 #include "setRootCase.H"
50 #include "createTime.H"
51
52 const word patchName = args[1];
53
54 #include "createPolyMesh.H"
55
56 Info<< "Mesh read in = "
57 << runTime.cpuTimeIncrement()
58 << " s\n" << endl << endl;
59
60
61 const polyBoundaryMesh& pbm = mesh.boundaryMesh();
62 label patchi = pbm.findPatchID(patchName);
63 const polyPatch& patch = pbm[patchi];
64
65 Info<< "Patch:" << patch.name() << endl;
66
67
68
69 // Data on all edges and faces
70 List<patchEdgeFaceRegions> allEdgeInfo(patch.nEdges());
71 List<patchEdgeFaceRegions> allFaceInfo(patch.size());
72
73 // Determine parallel global indexing
74 const globalIndex globalNumbering(patch.size());
75
76 DynamicList<label> changedEdges(4*patch.size());
77 DynamicList<patchEdgeFaceRegions> changedInfo(changedEdges.size());
78
79 forAll(patch, facei)
80 {
81 const labelList& fEdges = patch.faceEdges()[facei];
82
83 label globalFacei = globalNumbering.toGlobal(facei);
84
85 forAll(fEdges, i)
86 {
87 changedEdges.append(fEdges[i]);
88 changedInfo.append
89 (
90 patchEdgeFaceRegions(labelPair(globalFacei, globalFacei))
91 );
92 }
93 }
94
95 // Walk
96 PatchEdgeFaceWave
97 <
98 primitivePatch,
99 patchEdgeFaceRegions
100 > calc
101 (
102 mesh,

Callers

nothing calls this directly

Calls 10

returnReduceFunction · 0.85
toGlobalMethod · 0.80
localPointsMethod · 0.80
forAllFunction · 0.50
calcFunction · 0.50
appendMethod · 0.45
nameMethod · 0.45
nEdgesMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected