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
79593777
Commit
79593777
authored
Sep 10, 2008
by
mattijs
Browse files
avoid cellEdges
parent
1b2c360e
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
View file @
79593777
...
...
@@ -282,8 +282,7 @@ const Foam::labelList& Foam::polyPatch::meshEdges() const
primitivePatch
::
meshEdges
(
boundaryMesh
().
mesh
().
edges
(),
boundaryMesh
().
mesh
().
cellEdges
(),
faceCells
()
boundaryMesh
().
mesh
().
pointEdges
()
)
);
}
...
...
src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
View file @
79593777
...
...
@@ -362,16 +362,27 @@ const Foam::labelList& Foam::faceZone::meshEdges() const
{
if
(
!
mePtr_
)
{
labelList
faceCells
(
size
());
const
labelList
&
own
=
zoneMesh
().
mesh
().
faceOwner
();
const
labelList
&
faceLabels
=
*
this
;
forAll
(
faceCells
,
faceI
)
{
faceCells
[
faceI
]
=
own
[
faceLabels
[
faceI
]];
}
//labelList faceCells(size());
//
//const labelList& own = zoneMesh().mesh().faceOwner();
//
//const labelList& faceLabels = *this;
//
//forAll (faceCells, faceI)
//{
// faceCells[faceI] = own[faceLabels[faceI]];
//}
//
//mePtr_ =
// new labelList
// (
// operator()().meshEdges
// (
// zoneMesh().mesh().edges(),
// zoneMesh().mesh().cellEdges(),
// faceCells
// )
// );
mePtr_
=
new
labelList
...
...
@@ -379,8 +390,7 @@ const Foam::labelList& Foam::faceZone::meshEdges() const
operator
()().
meshEdges
(
zoneMesh
().
mesh
().
edges
(),
zoneMesh
().
mesh
().
cellEdges
(),
faceCells
zoneMesh
().
mesh
().
pointEdges
()
)
);
}
...
...
src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H
View file @
79593777
...
...
@@ -348,7 +348,8 @@ public:
// index in the edge list. If the edge is not found, return -1
label
whichEdge
(
const
edge
&
e
)
const
;
//- Return labels of patch edges in the global edge list
//- Return labels of patch edges in the global edge list using
// cell addressing
labelList
meshEdges
(
const
edgeList
&
allEdges
,
...
...
@@ -356,6 +357,14 @@ public:
const
labelList
&
faceCells
)
const
;
//- Return labels of patch edges in the global edge list using
// basic edge addressing.
labelList
meshEdges
(
const
edgeList
&
allEdges
,
const
labelListList
&
pointEdges
)
const
;
//- Return face normals for patch
const
Field
<
PointType
>&
faceNormals
()
const
;
...
...
src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchMeshEdges.C
View file @
79593777
...
...
@@ -111,6 +111,60 @@ labelList PrimitivePatch<Face, FaceList, PointField, PointType>::meshEdges
}
template
<
class
Face
,
template
<
class
>
class
FaceList
,
class
PointField
,
class
PointType
>
labelList
PrimitivePatch
<
Face
,
FaceList
,
PointField
,
PointType
>::
meshEdges
(
const
edgeList
&
allEdges
,
const
labelListList
&
pointEdges
)
const
{
if
(
debug
)
{
Info
<<
"labelList PrimitivePatch<Face, FaceList, PointField, PointType>"
<<
"::meshEdges() : "
<<
"calculating labels of patch edges in mesh edge list"
<<
endl
;
}
// get reference to the list of edges on the patch
const
edgeList
&
PatchEdges
=
edges
();
// create the storage
labelList
meshEdges
(
PatchEdges
.
size
());
// get reference to the points on the patch
const
labelList
&
pp
=
meshPoints
();
// WARNING: Remember that local edges address into local point list;
// local-to-global point label translation is necessary
forAll
(
PatchEdges
,
edgeI
)
{
const
label
globalPointI
=
pp
[
PatchEdges
[
edgeI
].
start
()];
const
edge
curEdge
(
globalPointI
,
pp
[
PatchEdges
[
edgeI
].
end
()]);
const
labelList
&
pe
=
pointEdges
[
globalPointI
];
forAll
(
pe
,
i
)
{
if
(
allEdges
[
pe
[
i
]]
==
curEdge
)
{
meshEdges
[
edgeI
]
=
pe
[
i
];
break
;
}
}
}
return
meshEdges
;
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
...
...
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