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
43705d78
Commit
43705d78
authored
Oct 14, 2008
by
mattijs
Browse files
use average when merging points to prevent truncation error
parent
d8c44047
Changes
1
Show whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/meshTools/matchPoints.C
View file @
43705d78
...
...
@@ -45,9 +45,19 @@ bool Foam::matchPoints
bool
fullMatch
=
true
;
SortableList
<
scalar
>
pts0MagSqr
(
magSqr
(
pts0
-
origin
))
;
point
compareOrigin
=
origin
;
SortableList
<
scalar
>
pts1MagSqr
(
magSqr
(
pts1
-
origin
));
if
(
origin
==
point
(
VGREAT
,
VGREAT
,
VGREAT
))
{
if
(
pts1
.
size
()
>
0
)
{
compareOrigin
=
sum
(
pts1
)
/
pts1
.
size
();
}
}
SortableList
<
scalar
>
pts0MagSqr
(
magSqr
(
pts0
-
compareOrigin
));
SortableList
<
scalar
>
pts1MagSqr
(
magSqr
(
pts1
-
compareOrigin
));
forAll
(
pts0MagSqr
,
i
)
{
...
...
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