Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
1b9980a5
Commit
1b9980a5
authored
Jul 24, 2008
by
Mattijs Janssens
Browse files
did not handle internal faces correctly
parent
4f041874
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dynamicMesh/polyTopoChange/polyTopoChange/duplicatePoints.C
View file @
1b9980a5
...
...
@@ -155,17 +155,35 @@ void Foam::duplicatePoints::setRefinement
zoneFlip
=
fZone
.
flipMap
()[
fZone
.
whichFace
(
faceI
)];
}
meshMod
.
modifyFace
(
newFace
,
// modified face
faceI
,
// label of face being modified
mesh_
.
faceOwner
()[
faceI
],
// owner
-
1
,
// neighbour
false
,
// face flip
patches
.
whichPatch
(
faceI
),
// patch for face
zoneID
,
// zone for face
zoneFlip
// face flip in zone
);
if
(
mesh_
.
isInternalFace
(
faceI
))
{
meshMod
.
modifyFace
(
newFace
,
// modified face
faceI
,
// label of face being modified
mesh_
.
faceOwner
()[
faceI
],
// owner
mesh_
.
faceNeighbour
()[
faceI
],
// neighbour
false
,
// face flip
-
1
,
// patch for face
zoneID
,
// zone for face
zoneFlip
// face flip in zone
);
}
else
{
meshMod
.
modifyFace
(
newFace
,
// modified face
faceI
,
// label of face being modified
mesh_
.
faceOwner
()[
faceI
],
// owner
-
1
,
// neighbour
false
,
// face flip
patches
.
whichPatch
(
faceI
),
// patch for face
zoneID
,
// zone for face
zoneFlip
// face flip in zone
);
}
}
...
...
src/dynamicMesh/polyTopoChange/polyTopoChange/localPointRegion.C
View file @
1b9980a5
...
...
@@ -43,15 +43,22 @@ class minEqOpFace
{
public:
void
operator
()(
face
&
x
,
const
face
&
y
)
const
void
operator
()(
face
&
x
,
const
face
&
y
)
const
{
forAll
(
x
,
i
)
if
(
x
.
size
()
>
0
)
{
x
[
i
]
=
min
(
x
[
i
],
y
[
i
]);
label
j
=
0
;
forAll
(
x
,
i
)
{
x
[
i
]
=
min
(
x
[
i
],
y
[
j
]);
j
=
y
.
rcIndex
(
j
);
}
}
};
};
// Dummy transform for faces. Used in synchronisation
void
transformList
(
...
...
@@ -120,7 +127,7 @@ void Foam::localPointRegion::countPointRegions
forAllConstIter
(
Map
<
label
>
,
candidateFace
,
iter
)
{
label
faceI
=
iter
();
label
faceI
=
iter
.
key
();
if
(
!
mesh
.
isInternalFace
(
faceI
))
{
...
...
@@ -174,6 +181,29 @@ void Foam::localPointRegion::countPointRegions
}
}
minPointRegion
.
clear
();
// Add internal faces that use any duplicated point. Can only have one
// region!
forAllConstIter
(
Map
<
label
>
,
candidateFace
,
iter
)
{
label
faceI
=
iter
.
key
();
if
(
mesh
.
isInternalFace
(
faceI
))
{
const
face
&
f
=
mesh
.
faces
()[
faceI
];
forAll
(
f
,
fp
)
{
if
(
meshPointMap_
.
found
(
f
[
fp
]))
{
label
meshFaceMapI
=
meshFaceMap_
.
size
();
meshFaceMap_
.
insert
(
faceI
,
meshFaceMapI
);
}
}
}
}
// Transfer to member data
pointRegions
.
shrink
();
pointRegions_
.
setSize
(
pointRegions
.
size
());
...
...
@@ -285,7 +315,7 @@ void Foam::localPointRegion::calcPointRegions
faceList
minRegion
(
mesh
.
nFaces
());
forAllConstIter
(
Map
<
label
>
,
candidateFace
,
iter
)
{
label
faceI
=
iter
();
label
faceI
=
iter
.
key
();
const
face
&
f
=
mesh
.
faces
()[
faceI
];
if
(
mesh
.
isInternalFace
(
faceI
))
...
...
Write
Preview
Supports
Markdown
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