Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
0496e181
Commit
0496e181
authored
Jan 13, 2010
by
mattijs
Browse files
Modified tolerances to take truncation error into account
parent
1e78a148
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C
View file @
0496e181
...
...
@@ -199,13 +199,20 @@ Foam::scalarField Foam::coupledPolyPatch::calcFaceTol
const
face
&
f
=
faces
[
faceI
];
// 1. calculate a typical size of the face. Use maximum distance
// to face centre
scalar
maxLenSqr
=
-
GREAT
;
// 2. as measure of truncation error when comparing two coordinates
// use SMALL * maximum component
scalar
maxCmpt
=
-
GREAT
;
forAll
(
f
,
fp
)
{
maxLenSqr
=
max
(
maxLenSqr
,
magSqr
(
points
[
f
[
fp
]]
-
cc
));
const
point
&
pt
=
points
[
f
[
fp
]];
maxLenSqr
=
max
(
maxLenSqr
,
magSqr
(
pt
-
cc
));
maxCmpt
=
max
(
maxCmpt
,
cmptMax
(
cmptMag
(
pt
)));
}
tols
[
faceI
]
=
matchTol
*
Foam
::
sqrt
(
maxLenSqr
);
tols
[
faceI
]
=
max
(
SMALL
*
maxCmpt
,
matchTol
*
Foam
::
sqrt
(
maxLenSqr
)
)
;
}
return
tols
;
}
...
...
Write
Preview
Markdown
is supported
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