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

Function isDuplicate

src/meshTools/regionSplit/localPointRegion.C:66–97  ·  view source on GitHub ↗

Are two lists identical either in forward or in reverse order.

Source from the content-addressed store, hash-verified

64
65// Are two lists identical either in forward or in reverse order.
66bool Foam::localPointRegion::isDuplicate
67(
68 const face& f0,
69 const face& f1,
70 const bool forward
71)
72{
73 label fp1 = findIndex(f1, f0[0]);
74
75 if (fp1 == -1)
76 {
77 return false;
78 }
79
80 forAll(f0, fp0)
81 {
82 if (f0[fp0] != f1[fp1])
83 {
84 return false;
85 }
86
87 if (forward)
88 {
89 fp1 = f1.fcIndex(fp1);
90 }
91 else
92 {
93 fp1 = f1.rcIndex(fp1);
94 }
95 }
96 return true;
97}
98
99
100// Count regions per point

Callers 1

localPointRegion.CFile · 0.85

Calls 4

findIndexFunction · 0.85
forAllFunction · 0.50
fcIndexMethod · 0.45
rcIndexMethod · 0.45

Tested by

no test coverage detected