Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenFOAM-plus
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
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Development
OpenFOAM-plus
Commits
9aa56e9a
Commit
9aa56e9a
authored
6 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: pointToPoint: better checking.
parent
83170581
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C
+15
-5
15 additions, 5 deletions
...Surface/triSurfaceTools/pointToPointPlanarInterpolation.C
with
15 additions
and
5 deletions
src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C
+
15
−
5
View file @
9aa56e9a
...
...
@@ -63,7 +63,7 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
// Find furthest away point
vector
e1
;
label
index1
=
-
1
;
scalar
maxDist
=
-
GREAT
;
scalar
maxDist
=
ROOTVSMALL
;
for
(
label
i
=
1
;
i
<
points
.
size
();
i
++
)
{
...
...
@@ -77,11 +77,21 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
maxDist
=
magD
;
}
}
if
(
index1
==
-
1
)
{
FatalErrorInFunction
<<
"Cannot find any point that is different from first point"
<<
p0
<<
". Are all your points coincident?"
<<
exit
(
FatalError
);
}
// Find point that is furthest away from line p0-p1
const
point
&
p1
=
points
[
index1
];
label
index2
=
-
1
;
maxDist
=
-
GREAT
;
maxDist
=
ROOTVSMALL
;
for
(
label
i
=
1
;
i
<
points
.
size
();
i
++
)
{
if
(
i
!=
index1
)
...
...
@@ -101,9 +111,9 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
if
(
index2
==
-
1
)
{
FatalErrorInFunction
<<
"Cannot find points that
make
valid normal."
<<
nl
<<
"Have so far points "
<<
p0
<<
" and "
<<
p1
<<
"
Need at least three points which are not in a li
ne
.
"
<<
"Cannot find points that
define a plane with a
valid normal."
<<
nl
<<
"Have so far points "
<<
p0
<<
" and "
<<
p1
<<
"
. Are all your points on a single line instead of a pla
ne
?
"
<<
exit
(
FatalError
);
}
...
...
This diff is collapsed.
Click to expand it.
Kutalmış Berçin
@kuti
mentioned in issue
#1107 (closed)
·
5 years ago
mentioned in issue
#1107 (closed)
mentioned in issue #1107
Toggle commit list
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