Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Community
integration-cfmesh
Commits
033a99f3
Commit
033a99f3
authored
Aug 26, 2014
by
Franjo
Browse files
Merge branch 'defect-edgeExtractorMPI-t15' into development
parents
06c36ada
d2578e7b
Changes
5
Hide whitespace changes
Inline
Side-by-side
meshLibrary/utilities/boundaryLayers/boundaryLayers.C
View file @
033a99f3
...
...
@@ -133,14 +133,10 @@ void boundaryLayers::findPatchesToBeTreatedTogether()
const
labelHashSet
&
invertedVertices
=
vertexCheck
.
invertedVertices
();
std
::
map
<
std
::
pair
<
label
,
label
>
,
Pair
<
label
>
>
edgeClassification
;
labelLongList
procEdges
;
forAll
(
eFaces
,
eI
)
{
if
(
eFaces
.
sizeOfRow
(
eI
)
!=
2
)
{
procEdges
.
append
(
eI
);
continue
;
}
//- check if the any of the face vertices is tangled
const
edge
&
e
=
edges
[
eI
];
...
...
@@ -185,9 +181,10 @@ void boundaryLayers::findPatchesToBeTreatedTogether()
if
(
Pstream
::
parRun
()
)
{
const
labelList
&
bPoints
=
mse
.
boundaryPoints
();
//- check faces over processor edges
const
labelList
&
globalEdgeLabel
=
mse
.
globalBoundaryEdgeLabel
();
const
VRWGraph
&
beAtProcs
=
mse
.
beAtProcs
();
const
Map
<
label
>&
globalToLocal
=
mse
.
globalToLocalBndEdgeAddressing
();
const
DynList
<
label
>&
neiProcs
=
mse
.
beNeiProcs
();
...
...
@@ -211,9 +208,10 @@ void boundaryLayers::findPatchesToBeTreatedTogether()
}
//- store faces for sending
forAll
(
procEdges
,
eI
)
forAll
ConstIter
(
Map
<
label
>
,
otherFaceProc
,
it
)
{
const
label
beI
=
procEdges
[
eI
];
const
label
beI
=
it
.
key
();
if
(
eFaces
.
sizeOfRow
(
beI
)
==
0
)
continue
;
...
...
@@ -232,30 +230,25 @@ void boundaryLayers::findPatchesToBeTreatedTogether()
const
face
&
f
=
bFaces
[
eFaces
(
beI
,
0
)];
forAllRow
(
beAtProcs
,
beI
,
procI
)
{
const
label
neiProc
=
beAtProcs
(
beI
,
procI
);
if
(
neiProc
==
Pstream
::
myProcNo
()
)
continue
;
const
label
neiProc
=
it
();
//- each face is sent as follows
//- 1. global edge label
//- 2. number of face nodes
//- 3. faces nodes and vertex coordinates
LongList
<
labelledPoint
>&
dps
=
exchangePoints
[
neiProc
];
dps
.
append
(
labelledPoint
(
globalEdgeLabel
[
beI
],
point
()));
dps
.
append
(
labelledPoint
(
f
.
size
(),
point
()));
forAll
(
f
,
pI
)
{
dps
.
append
//- each face is sent as follows
//- 1. global edge label
//- 2. number of face nodes
//- 3. faces nodes and vertex coordinates
LongList
<
labelledPoint
>&
dps
=
exchangePoints
[
neiProc
];
dps
.
append
(
labelledPoint
(
globalEdgeLabel
[
beI
],
point
()));
dps
.
append
(
labelledPoint
(
f
.
size
(),
point
()));
forAll
(
f
,
pI
)
{
dps
.
append
(
labelledPoint
(
labelledPoint
(
globalPointLabel
[
bp
[
f
[
pI
]]],
points
[
f
[
pI
]]
)
);
}
globalPointLabel
[
bp
[
f
[
pI
]]],
points
[
f
[
pI
]]
)
);
}
}
...
...
@@ -270,14 +263,15 @@ void boundaryLayers::findPatchesToBeTreatedTogether()
{
const
label
beI
=
globalToLocal
[
receivedData
[
counter
++
].
pointLabel
()];
face
f
(
receivedData
[
counter
++
].
pointLabel
());
DynList
<
label
>
f
(
receivedData
[
counter
++
].
pointLabel
());
forAll
(
f
,
pI
)
{
const
labelledPoint
&
lp
=
receivedData
[
counter
++
];
if
(
globalPointToLocal
.
found
(
lp
.
pointLabel
())
)
{
//- this point already exist on this processor
f
[
pI
]
=
globalPointToLocal
[
lp
.
pointLabel
()];
f
[
pI
]
=
bPoints
[
globalPointToLocal
[
lp
.
pointLabel
()]
]
;
}
else
{
...
...
meshLibrary/utilities/helperFunctions/helperFunctionsGeometryQueries.H
View file @
033a99f3
...
...
@@ -66,19 +66,21 @@ namespace help
bool
isinf
(
const
ListType
&
);
//- check if the faces share a convex edge
template
<
class
Face1
,
class
Face2
>
inline
bool
isSharedEdgeConvex
(
const
pointField
&
points
,
const
f
ace
&
f1
,
const
f
ace
&
f2
const
F
ace
1
&
f1
,
const
F
ace
2
&
f2
);
//- angle between the two faces in radians
template
<
class
Face1
,
class
Face2
>
inline
scalar
angleBetweenFaces
(
const
pointField
&
points
,
const
f
ace
&
f1
,
const
f
ace
&
f2
const
F
ace
1
&
f1
,
const
F
ace
2
&
f2
);
// merge faces which are in the same patch
...
...
meshLibrary/utilities/helperFunctions/helperFunctionsGeometryQueriesI.H
View file @
033a99f3
...
...
@@ -70,11 +70,12 @@ bool isinf(const ListType& l)
return
false
;
}
template
<
class
Face1
,
class
Face2
>
inline
bool
isSharedEdgeConvex
(
const
pointField
&
points
,
const
f
ace
&
f1
,
const
f
ace
&
f2
const
F
ace
1
&
f1
,
const
F
ace
2
&
f2
)
{
DynList
<
label
,
3
>
triOwn
(
3
);
...
...
@@ -82,17 +83,24 @@ inline bool isSharedEdgeConvex
forAll
(
f1
,
pI
)
{
label
pos
=
f2
.
which
(
f1
[
pI
]);
if
(
pos
==
-
1
)
label
pos
(
-
1
);
forAll
(
f2
,
pJ
)
if
(
f2
[
pJ
]
==
f1
[
pI
]
)
{
pos
=
pJ
;
break
;
}
if
(
pos
<
0
)
continue
;
triNei
[
0
]
=
f2
[
pos
];
triNei
[
1
]
=
f2
.
nextLabel
(
pos
);
triNei
[
2
]
=
f2
.
prevLabel
(
pos
);
triNei
[
1
]
=
f2
[
f2
.
fcIndex
(
pos
)
]
;
triNei
[
2
]
=
f2
[
f2
.
rcIndex
(
pos
)
]
;
triOwn
[
0
]
=
f1
[
pI
];
triOwn
[
1
]
=
f1
.
nextLabel
(
pI
);
triOwn
[
2
]
=
f1
.
prevLabel
(
pI
);
triOwn
[
1
]
=
f1
[
f1
.
fcIndex
(
pI
)
]
;
triOwn
[
2
]
=
f1
[
f1
.
rcIndex
(
pI
)
]
;
scalar
vol
(
0.0
);
...
...
@@ -120,11 +128,12 @@ inline bool isSharedEdgeConvex
return
true
;
}
template
<
class
Face1
,
class
Face2
>
inline
scalar
angleBetweenFaces
(
const
pointField
&
points
,
const
f
ace
&
f1
,
const
f
ace
&
f2
const
F
ace
1
&
f1
,
const
F
ace
2
&
f2
)
{
DynList
<
label
,
3
>
triOwn
(
3
);
...
...
@@ -135,17 +144,24 @@ inline scalar angleBetweenFaces
forAll
(
f1
,
pI
)
{
label
pos
=
f2
.
which
(
f1
[
pI
]);
if
(
pos
==
-
1
)
label
pos
(
-
1
);
forAll
(
f2
,
pJ
)
if
(
f2
[
pJ
]
==
f1
[
pI
]
)
{
pos
=
pJ
;
break
;
}
if
(
pos
<
0
)
continue
;
triNei
[
0
]
=
f2
[
pos
];
triNei
[
1
]
=
f2
.
nextLabel
(
pos
);
triNei
[
2
]
=
f2
.
prevLabel
(
pos
);
triNei
[
1
]
=
f2
[
f2
.
fcIndex
(
pos
)
]
;
triNei
[
2
]
=
f2
[
f2
.
rcIndex
(
pos
)
]
;
triOwn
[
0
]
=
f1
[
pI
];
triOwn
[
1
]
=
f1
.
nextLabel
(
pI
);
triOwn
[
2
]
=
f1
.
prevLabel
(
pI
);
triOwn
[
1
]
=
f1
[
f1
.
fcIndex
(
pI
)
]
;
triOwn
[
2
]
=
f1
[
f1
.
rcIndex
(
pI
)
]
;
scalar
vol
(
0.0
);
...
...
@@ -206,7 +222,8 @@ inline scalar angleBetweenFaces
(
"scalar angleBetweenFaces"
"(const pointField&, const face&, const face&)"
)
<<
"Faces do no share an edge"
<<
abort
(
FatalError
);
)
<<
"Faces "
<<
f1
<<
" and "
<<
f2
<<
" do no share an edge"
<<
abort
(
FatalError
);
}
return
angle
/
counter
;
...
...
meshLibrary/utilities/surfaceTools/edgeExtraction/edgeExtractor/edgeExtractor.C
View file @
033a99f3
...
...
@@ -1776,7 +1776,7 @@ bool edgeExtractor::checkFacePatchesTopology()
}
}
//- e
a
vluate the new situation and ensure that no oscillation occur
//- ev
a
luate the new situation and ensure that no oscillation occur
reduce
(
nCorrected
,
sumOp
<
label
>
());
if
(
nCorrected
)
{
...
...
@@ -1806,7 +1806,8 @@ bool edgeExtractor::checkFacePatchesTopology()
facePatch_
.
transfer
(
newBoundaryPatches
);
}
}
while
(
nCorrected
!=
0
&&
(
nIter
++
<
30
)
);
}
while
(
nCorrected
!=
0
&&
(
nIter
++
<
3
)
);
return
changed
;
}
...
...
meshLibrary/utilities/surfaceTools/edgeExtraction/edgeExtractor/edgeExtractorCorners.C
View file @
033a99f3
...
...
@@ -256,7 +256,7 @@ void edgeExtractor::faceEvaluator::neiPatchesOverEdges
neiPatches
[
feI
]
=
fPatches
[
nei
];
}
else
if
(
edgeFaces
.
sizeOfRow
(
beI
)
==
1
)
else
if
(
Pstream
::
parRun
()
&&
(
edgeFaces
.
sizeOfRow
(
beI
)
==
1
)
)
{
neiPatches
[
feI
]
=
otherFacePatch
[
beI
];
}
...
...
@@ -422,8 +422,8 @@ label edgeExtractor::faceEvaluator::bestPatchAfterModification
forAll
(
neiFaces
,
eI
)
{
const
label
origPatchI
=
extractor_
.
facePatch_
[
neiFac
es
[
eI
]
]
;
const
label
newPatchI
=
(
*
new
BoundaryPatchesPtr_
)[
neiFac
es
[
eI
]
]
;
const
label
origPatchI
=
oldNeiPatch
es
[
eI
];
const
label
newPatchI
=
new
NeiPatch
es
[
eI
];
if
(
neiFaces
[
eI
]
>
bfI
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment