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

Function makeFace

src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C:110–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109
110void Foam::hexCellLooper::makeFace
111(
112 const labelList& loop,
113 const scalarField& loopWeights,
114
115 labelList& faceVerts,
116 pointField& facePoints
117) const
118{
119 facePoints.setSize(loop.size());
120 faceVerts.setSize(loop.size());
121
122 forAll(loop, cutI)
123 {
124 label cut = loop[cutI];
125
126 if (isEdge(cut))
127 {
128 label edgeI = getEdge(cut);
129
130 const edge& e = mesh().edges()[edgeI];
131
132 const point& v0 = mesh().points()[e.start()];
133 const point& v1 = mesh().points()[e.end()];
134
135 facePoints[cutI] =
136 loopWeights[cutI]*v1 + (1.0-loopWeights[cutI])*v0;
137 }
138 else
139 {
140 label vertI = getVertex(cut);
141
142 facePoints[cutI] = mesh().points()[vertI];
143 }
144
145 faceVerts[cutI] = cutI;
146 }
147}
148
149
150// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Callers 1

cutFunction · 0.85

Calls 8

meshFunction · 0.85
forAllFunction · 0.50
setSizeMethod · 0.45
sizeMethod · 0.45
edgesMethod · 0.45
pointsMethod · 0.45
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected