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

Function reset

src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C:205–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203
204
205void Foam::primitiveMesh::reset
206(
207 const label nPoints,
208 const label nInternalFaces,
209 const label nFaces,
210 const label nCells
211)
212{
213 clearOut();
214
215 nPoints_ = nPoints;
216 nEdges_ = -1;
217 nInternal0Edges_ = -1;
218 nInternal1Edges_ = -1;
219 nInternalEdges_ = -1;
220
221 nInternalFaces_ = nInternalFaces;
222 nFaces_ = nFaces;
223 nCells_ = nCells;
224
225 // Check if points are ordered
226 label nInternalPoints;
227 labelList pointMap;
228
229 bool isOrdered = calcPointOrder
230 (
231 nInternalPoints,
232 pointMap,
233 faces(),
234 nInternalFaces_,
235 nPoints_
236 );
237
238 if (isOrdered)
239 {
240 nInternalPoints_ = nInternalPoints;
241 }
242 else
243 {
244 nInternalPoints_ = -1;
245 }
246
247 if (debug)
248 {
249 Pout<< "primitiveMesh::reset : mesh reset to"
250 << " nInternalPoints:" << nInternalPoints_
251 << " nPoints:" << nPoints_
252 << " nEdges:" << nEdges_
253 << " nInternalFaces:" << nInternalFaces_
254 << " nFaces:" << nFaces_
255 << " nCells:" << nCells_
256 << endl;
257 }
258}
259
260
261void Foam::primitiveMesh::reset

Callers 3

clearMethod · 0.50
operator=Method · 0.50
initMeshFunction · 0.50

Calls 2

calcPointOrderFunction · 0.85
clearOutFunction · 0.70

Tested by

no test coverage detected