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
eaa6a98f
Commit
eaa6a98f
authored
Apr 27, 2011
by
mattijs
Browse files
ENH: cyclicPolyPatch.C: debug printing of area match
parent
a3739657
Changes
1
Show whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
View file @
eaa6a98f
...
...
@@ -185,6 +185,9 @@ void Foam::cyclicPolyPatch::calcTransforms
vectorField
half0Normals
(
half0Areas
.
size
());
vectorField
half1Normals
(
half1Areas
.
size
());
scalar
maxAreaDiff
=
-
GREAT
;
label
maxAreaFacei
=
-
1
;
forAll
(
half0
,
facei
)
{
scalar
magSf
=
mag
(
half0Areas
[
facei
]);
...
...
@@ -199,13 +202,24 @@ void Foam::cyclicPolyPatch::calcTransforms
half0Normals
[
facei
]
=
point
(
1
,
0
,
0
);
half1Normals
[
facei
]
=
half0Normals
[
facei
];
}
else
if
(
mag
(
magSf
-
nbrMagSf
)
/
avSf
>
coupledPolyPatch
::
matchTol
)
else
{
scalar
areaDiff
=
mag
(
magSf
-
nbrMagSf
)
/
avSf
;
if
(
areaDiff
>
maxAreaDiff
)
{
maxAreaDiff
=
areaDiff
;
maxAreaFacei
=
facei
;
}
if
(
areaDiff
>
coupledPolyPatch
::
matchTol
)
{
FatalErrorIn
(
"cyclicPolyPatch::calcTransforms()"
)
<<
"face "
<<
facei
<<
" area does not match neighbour by "
<<
100
*
mag
(
magSf
-
nbrMagSf
)
/
avSf
)
<<
"face "
<<
facei
<<
" area does not match neighbour by "
<<
100
*
areaDiff
<<
"% -- possible face ordering problem."
<<
endl
<<
"patch:"
<<
name
()
<<
" my area:"
<<
magSf
...
...
@@ -226,6 +240,18 @@ void Foam::cyclicPolyPatch::calcTransforms
half1Normals
[
facei
]
=
half1Areas
[
facei
]
/
nbrMagSf
;
}
}
}
// Print area match
if
(
debug
)
{
Pout
<<
"cyclicPolyPatch::calcTransforms :"
<<
" Max area error:"
<<
100
*
maxAreaDiff
<<
"% at face:"
<<
maxAreaFacei
<<
" at:"
<<
half0Ctrs
[
maxAreaFacei
]
<<
" coupled face at:"
<<
half1Ctrs
[
maxAreaFacei
]
<<
endl
;
}
// Calculate transformation tensors
...
...
@@ -458,6 +484,9 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
<<
endl
;
}
// Note: getCentresAndAnchors gets called on the slave side
// so separationVector is owner-slave points.
half0Ctrs
-=
separationVector_
;
anchors0
-=
separationVector_
;
break
;
...
...
@@ -833,6 +862,9 @@ void Foam::cyclicPolyPatch::transformPosition(pointField& l) const
}
else
if
(
separated
())
{
// transformPosition gets called on the receiving side,
// separation gets calculated on the sending side so subtract.
const
vectorField
&
s
=
separation
();
if
(
s
.
size
()
==
1
)
{
...
...
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