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
7a43ab40
Commit
7a43ab40
authored
Jan 14, 2011
by
mattijs
Browse files
ENH: cyclicPolyPatch : additional checking for neighbourPatch name
parent
5de788ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
View file @
7a43ab40
...
...
@@ -703,9 +703,43 @@ Foam::cyclicPolyPatch::~cyclicPolyPatch()
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam
::
label
Foam
::
cyclicPolyPatch
::
neighbPatchID
()
const
{
if
(
neighbPatchID_
==
-
1
)
{
neighbPatchID_
=
this
->
boundaryMesh
().
findPatchID
(
neighbPatchName_
);
if
(
neighbPatchID_
==
-
1
)
{
FatalErrorIn
(
"cyclicPolyPatch::neighbPatchID() const"
)
<<
"Illegal neighbourPatch name "
<<
neighbPatchName_
<<
endl
<<
"Valid patch names are "
<<
this
->
boundaryMesh
().
names
()
<<
exit
(
FatalError
);
}
// Check that it is a cyclic
const
cyclicPolyPatch
&
nbrPatch
=
refCast
<
const
cyclicPolyPatch
>
(
this
->
boundaryMesh
()[
neighbPatchID_
]
);
if
(
nbrPatch
.
neighbPatchName
()
!=
name
())
{
WarningIn
(
"cyclicPolyPatch::neighbPatchID() const"
)
<<
"Patch "
<<
name
()
<<
" specifies neighbour patch "
<<
neighbPatchName
()
<<
endl
<<
" but that in return specifies "
<<
nbrPatch
.
neighbPatchName
()
<<
endl
;
}
}
return
neighbPatchID_
;
}
void
Foam
::
cyclicPolyPatch
::
transformPosition
(
pointField
&
l
)
const
{
if
(
!
parallel
())
...
...
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H
View file @
7a43ab40
...
...
@@ -325,25 +325,7 @@ public:
}
//- Neighbour patchID.
virtual
label
neighbPatchID
()
const
{
if
(
neighbPatchID_
==
-
1
)
{
neighbPatchID_
=
this
->
boundaryMesh
().
findPatchID
(
neighbPatchName_
);
if
(
neighbPatchID_
==
-
1
)
{
FatalErrorIn
(
"cyclicPolyPatch::neighbPatchID() const"
)
<<
"Illegal neighbourPatch name "
<<
neighbPatchName_
<<
endl
<<
"Valid patch names are "
<<
this
->
boundaryMesh
().
names
()
<<
exit
(
FatalError
);
}
}
return
neighbPatchID_
;
}
virtual
label
neighbPatchID
()
const
;
virtual
bool
owner
()
const
{
...
...
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