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
c334892d
Commit
c334892d
authored
Oct 14, 2008
by
mattijs
Browse files
use point merge information
parent
2726b577
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
View file @
c334892d
...
...
@@ -586,8 +586,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
"fvMeshDistribute::repatch(const labelList&, labelListList&)"
)
<<
"reverseFaceMap contains -1 at index:"
<<
index
<<
endl
<<
"This means that the repatch operation was not just
a shuffle?
"
<<
abort
(
FatalError
);
<<
"This means that the repatch operation was not just"
<<
" a shuffle?"
<<
abort
(
FatalError
);
}
}
...
...
@@ -622,9 +622,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints
)
);
bool
merged
=
pointToMaster
.
size
()
>
0
;
if
(
!
returnReduce
(
merged
,
orOp
<
bool
>
()))
if
(
returnReduce
(
pointToMaster
.
size
(),
sumOp
<
label
>
())
==
0
)
{
return
autoPtr
<
mapPolyMesh
>
(
NULL
);
}
...
...
@@ -639,14 +637,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints
// Update fields. No inflation, parallel sync.
mesh_
.
updateMesh
(
map
);
// Move mesh (since morphing does not do this)
if
(
map
().
hasMotionPoints
())
{
mesh_
.
movePoints
(
map
().
preMotionPoints
());
}
// Adapt constructMaps for merged points.
// 1.4.1: use reversePointMap < -1 feature.
forAll
(
constructPointMap
,
procI
)
{
labelList
&
constructMap
=
constructPointMap
[
procI
];
...
...
@@ -655,16 +646,38 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints
{
label
oldPointI
=
constructMap
[
i
];
// See if merged into other point
Map
<
label
>::
const_iterator
iter
=
pointToMaster
.
find
(
oldPointI
);
label
newPointI
=
map
().
reversePointMap
()[
oldPointI
];
if
(
iter
!=
pointToMaster
.
end
()
)
if
(
newPointI
<
-
1
)
{
oldPointI
=
iter
();
constructMap
[
i
]
=
-
newPointI
-
2
;
}
else
if
(
newPointI
>=
0
)
{
constructMap
[
i
]
=
newPointI
;
}
else
{
FatalErrorIn
(
"fvMeshDistribute::mergeSharedPoints()"
)
<<
"Problem. oldPointI:"
<<
oldPointI
<<
" newPointI:"
<<
newPointI
<<
abort
(
FatalError
);
}
constructMap
[
i
]
=
map
().
reversePointMap
()[
oldPointI
];
}
//- old: use pointToMaster map.
//forAll(constructMap, i)
//{
// label oldPointI = constructMap[i];
//
// // See if merged into other point
// Map<label>::const_iterator iter = pointToMaster.find(oldPointI);
//
// if (iter != pointToMaster.end())
// {
// oldPointI = iter();
// }
//
// constructMap[i] = map().reversePointMap()[oldPointI];
//}
}
return
map
;
}
...
...
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