Skip to content
GitLab
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
f1e7cae6
Commit
f1e7cae6
authored
Apr 12, 2010
by
mattijs
Browse files
ENH: Have edge addressing from coupledPatch to mesh
parent
b1484b37
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C
View file @
f1e7cae6
...
...
@@ -1122,6 +1122,9 @@ void Foam::globalMeshData::clearOut()
deleteDemandDrivenData
(
sharedEdgeAddrPtr_
);
coupledPatchPtr_
.
clear
();
coupledPatchMeshEdgesPtr_
.
clear
();
coupledPatchMeshEdgeMapPtr_
.
clear
();
// Point
globalPointNumberingPtr_
.
clear
();
globalPointSlavesPtr_
.
clear
();
...
...
@@ -1409,6 +1412,45 @@ const Foam::indirectPrimitivePatch& Foam::globalMeshData::coupledPatch() const
}
const
Foam
::
labelList
&
Foam
::
globalMeshData
::
coupledPatchMeshEdges
()
const
{
if
(
!
coupledPatchMeshEdgesPtr_
.
valid
())
{
coupledPatchMeshEdgesPtr_
.
reset
(
new
labelList
(
coupledPatch
().
meshEdges
(
mesh_
.
edges
(),
mesh_
.
pointEdges
()
)
)
);
}
return
coupledPatchMeshEdgesPtr_
();
}
const
Foam
::
Map
<
Foam
::
label
>&
Foam
::
globalMeshData
::
coupledPatchMeshEdgeMap
()
const
{
if
(
!
coupledPatchMeshEdgeMapPtr_
.
valid
())
{
const
labelList
&
me
=
coupledPatchMeshEdges
();
coupledPatchMeshEdgeMapPtr_
.
reset
(
new
Map
<
label
>
(
2
*
me
.
size
()));
Map
<
label
>&
em
=
coupledPatchMeshEdgeMapPtr_
();
forAll
(
me
,
i
)
{
em
.
insert
(
me
[
i
],
i
);
}
}
return
coupledPatchMeshEdgeMapPtr_
();
}
const
Foam
::
globalIndex
&
Foam
::
globalMeshData
::
globalPointNumbering
()
const
{
if
(
!
globalPointNumberingPtr_
.
valid
())
...
...
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H
View file @
f1e7cae6
...
...
@@ -208,6 +208,10 @@ class globalMeshData
mutable
autoPtr
<
indirectPrimitivePatch
>
coupledPatchPtr_
;
mutable
autoPtr
<
labelList
>
coupledPatchMeshEdgesPtr_
;
mutable
autoPtr
<
Map
<
label
>
>
coupledPatchMeshEdgeMapPtr_
;
// Collocated
// Coupled point to collocated coupled points
...
...
@@ -506,6 +510,13 @@ public:
//- Return patch of all coupled faces
const
indirectPrimitivePatch
&
coupledPatch
()
const
;
//- Return map from coupledPatch edges to mesh edges
const
labelList
&
coupledPatchMeshEdges
()
const
;
//- Return map from mesh edges to coupledPatch edges
const
Map
<
label
>&
coupledPatchMeshEdgeMap
()
const
;
// Coupled point to collocated coupled points. Coupled points are
// points on any coupled patch.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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