Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
5bbbcdd5
Commit
5bbbcdd5
authored
12 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: syncTools: additional face selection routines
parent
333d37ea
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
+63
-4
63 additions, 4 deletions
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
+13
-3
13 additions, 3 deletions
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
with
76 additions
and
7 deletions
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
+
63
−
4
View file @
5bbbcdd5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
========= |
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2012
OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
...
@@ -27,7 +27,6 @@ License
...
@@ -27,7 +27,6 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Determines for every point whether it is coupled and if so sets only one.
Foam
::
PackedBoolList
Foam
::
syncTools
::
getMasterPoints
(
const
polyMesh
&
mesh
)
Foam
::
PackedBoolList
Foam
::
syncTools
::
getMasterPoints
(
const
polyMesh
&
mesh
)
{
{
PackedBoolList
isMasterPoint
(
mesh
.
nPoints
());
PackedBoolList
isMasterPoint
(
mesh
.
nPoints
());
...
@@ -72,7 +71,6 @@ Foam::PackedBoolList Foam::syncTools::getMasterPoints(const polyMesh& mesh)
...
@@ -72,7 +71,6 @@ Foam::PackedBoolList Foam::syncTools::getMasterPoints(const polyMesh& mesh)
}
}
// Determines for every edge whether it is coupled and if so sets only one.
Foam
::
PackedBoolList
Foam
::
syncTools
::
getMasterEdges
(
const
polyMesh
&
mesh
)
Foam
::
PackedBoolList
Foam
::
syncTools
::
getMasterEdges
(
const
polyMesh
&
mesh
)
{
{
PackedBoolList
isMasterEdge
(
mesh
.
nEdges
());
PackedBoolList
isMasterEdge
(
mesh
.
nEdges
());
...
@@ -117,7 +115,6 @@ Foam::PackedBoolList Foam::syncTools::getMasterEdges(const polyMesh& mesh)
...
@@ -117,7 +115,6 @@ Foam::PackedBoolList Foam::syncTools::getMasterEdges(const polyMesh& mesh)
}
}
// Determines for every face whether it is coupled and if so sets only one.
Foam
::
PackedBoolList
Foam
::
syncTools
::
getMasterFaces
(
const
polyMesh
&
mesh
)
Foam
::
PackedBoolList
Foam
::
syncTools
::
getMasterFaces
(
const
polyMesh
&
mesh
)
{
{
PackedBoolList
isMasterFace
(
mesh
.
nFaces
(),
1
);
PackedBoolList
isMasterFace
(
mesh
.
nFaces
(),
1
);
...
@@ -145,4 +142,66 @@ Foam::PackedBoolList Foam::syncTools::getMasterFaces(const polyMesh& mesh)
...
@@ -145,4 +142,66 @@ Foam::PackedBoolList Foam::syncTools::getMasterFaces(const polyMesh& mesh)
}
}
Foam
::
PackedBoolList
Foam
::
syncTools
::
getInternalOrMasterFaces
(
const
polyMesh
&
mesh
)
{
PackedBoolList
isMasterFace
(
mesh
.
nFaces
(),
1
);
const
polyBoundaryMesh
&
patches
=
mesh
.
boundaryMesh
();
forAll
(
patches
,
patchI
)
{
const
polyPatch
&
pp
=
patches
[
patchI
];
if
(
pp
.
coupled
())
{
if
(
!
refCast
<
const
coupledPolyPatch
>
(
pp
).
owner
())
{
forAll
(
pp
,
i
)
{
isMasterFace
.
unset
(
pp
.
start
()
+
i
);
}
}
}
else
{
forAll
(
pp
,
i
)
{
isMasterFace
.
unset
(
pp
.
start
()
+
i
);
}
}
}
return
isMasterFace
;
}
Foam
::
PackedBoolList
Foam
::
syncTools
::
getInternalOrCoupledFaces
(
const
polyMesh
&
mesh
)
{
PackedBoolList
isMasterFace
(
mesh
.
nFaces
(),
1
);
const
polyBoundaryMesh
&
patches
=
mesh
.
boundaryMesh
();
forAll
(
patches
,
patchI
)
{
const
polyPatch
&
pp
=
patches
[
patchI
];
if
(
!
pp
.
coupled
())
{
forAll
(
pp
,
i
)
{
isMasterFace
.
unset
(
pp
.
start
()
+
i
);
}
}
}
return
isMasterFace
;
}
// ************************************************************************* //
// ************************************************************************* //
This diff is collapsed.
Click to expand it.
src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
+
13
−
3
View file @
5bbbcdd5
...
@@ -579,15 +579,25 @@ public:
...
@@ -579,15 +579,25 @@ public:
// Other
// Other
//- Get per point whether is it master (of a coupled set of points)
//- Get per point whether it is uncoupled or a master of a
// coupled set of points
static
PackedBoolList
getMasterPoints
(
const
polyMesh
&
);
static
PackedBoolList
getMasterPoints
(
const
polyMesh
&
);
//- Get per edge whether is it master (of a coupled set of edges)
//- Get per edge whether it is uncoupled or a master of a
// coupled set of edges
static
PackedBoolList
getMasterEdges
(
const
polyMesh
&
);
static
PackedBoolList
getMasterEdges
(
const
polyMesh
&
);
//- Get per face whether is it master (of a coupled set of faces)
//- Get per face whether it is uncoupled or a master of a
// coupled set of faces
static
PackedBoolList
getMasterFaces
(
const
polyMesh
&
);
static
PackedBoolList
getMasterFaces
(
const
polyMesh
&
);
//- Get per face whether it is internal or a master of a
// coupled set of faces
static
PackedBoolList
getInternalOrMasterFaces
(
const
polyMesh
&
);
//- Get per face whether it is internal or coupled
static
PackedBoolList
getInternalOrCoupledFaces
(
const
polyMesh
&
);
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment