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

Function check

src/mesh/blockMesh/blockMesh/blockMeshCheck.C:30–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
29
30void Foam::blockMesh::check(const polyMesh& bm, const dictionary& dict) const
31{
32 Info<< nl << "Check topology" << endl;
33
34 bool ok = true;
35
36 // Check for duplicate curved edge definitions
37 forAll(edges_, cei)
38 {
39 for (label cej=cei+1; cej<edges_.size(); cej++)
40 {
41 if (edges_[cei].compare(edges_[cej]) != 0)
42 {
43 Info<< " Curved edge ";
44 edges_[cej].write(Info, dict);
45 Info<< " is a duplicate of curved edge " << edges_[cei]
46 << endl;
47 ok = false;
48 break;
49 }
50 }
51 }
52
53 // Check curved-edge/block-edge correspondence
54 //
55 // Loop over the edges of each block rather than the edgeList of the
56 // topological mesh due to problems with calcEdges for blocks with
57 // repeated point labels
58 const blockList& blocks = *this;
59
60 forAll(edges_, cei)
61 {
62 bool found = false;
63
64 forAll(blocks, blocki)
65 {
66 edgeList edges = blocks[blocki].blockShape().edges();
67
68 forAll(edges, ei)
69 {
70 found = edges_[cei].compare(edges[ei][0], edges[ei][1]) != 0;
71 if (found) break;
72 }
73 if (found) break;
74 }
75
76 if (!found)
77 {
78 Info<< " Curved edge ";
79 edges_[cei].write(Info, dict);
80 Info<< " does not correspond to a block edge."
81 << endl;
82 ok = false;
83 }
84 }
85
86 const faceList& faces = bm.faces();
87

Callers 1

Calls 12

forAllFunction · 0.70
exitFunction · 0.50
sizeMethod · 0.45
compareMethod · 0.45
writeMethod · 0.45
edgesMethod · 0.45
facesMethod · 0.45
pointsMethod · 0.45
nFacesMethod · 0.45
nInternalFacesMethod · 0.45
normalMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected