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

Function correct

src/dynamicMesh/pointPatchDist/pointPatchDist.C:67–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
66
67void Foam::pointPatchDist::correct()
68{
69 const pointBoundaryMesh& pbm = mesh().boundary();
70
71 label nPoints = 0;
72
73 forAllConstIter(labelHashSet, patchIDs_, iter)
74 {
75 label patchi = iter.key();
76 nPoints += pbm[patchi].meshPoints().size();
77 }
78
79 externalPointEdgePoint::trackingData td(points_);
80
81 // Set initial changed points to all the patch points(if patch present)
82 List<externalPointEdgePoint> wallInfo(nPoints);
83 labelList wallPoints(nPoints);
84 nPoints = 0;
85
86 forAllConstIter(labelHashSet, patchIDs_, iter)
87 {
88 label patchi = iter.key();
89 // Retrieve the patch now we have its index in patches.
90
91 const labelList& mp = pbm[patchi].meshPoints();
92
93 forAll(mp, ppI)
94 {
95 label meshPointi = mp[ppI];
96 wallPoints[nPoints] = meshPointi;
97 wallInfo[nPoints] = externalPointEdgePoint
98 (
99 td.points_[meshPointi],
100 0.0
101 );
102 nPoints++;
103 }
104 }
105
106 // Current info on points
107 List<externalPointEdgePoint> allPointInfo(mesh()().nPoints());
108
109 // Current info on edges
110 List<externalPointEdgePoint> allEdgeInfo(mesh()().nEdges());
111
112 PointEdgeWave
113 <
114 externalPointEdgePoint,
115 externalPointEdgePoint::trackingData
116 > wallCalc
117 (
118 mesh()(),
119 wallPoints,
120 wallInfo,
121
122 allPointInfo,
123 allEdgeInfo,
124 mesh().globalData().nTotalPoints(), // max iterations

Callers 1

pointPatchDist.CFile · 0.70

Calls 12

meshFunction · 0.85
sqrtFunction · 0.85
nTotalPointsMethod · 0.80
forAllConstIterFunction · 0.50
forAllFunction · 0.50
keyMethod · 0.45
sizeMethod · 0.45
nPointsMethod · 0.45
nEdgesMethod · 0.45
validMethod · 0.45
distSqrMethod · 0.45

Tested by

no test coverage detected