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
4018425e
Commit
4018425e
authored
Jun 08, 2011
by
mattijs
Browse files
ENH: pointHitSort: define < operator for sorting
parent
cb96a677
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/primitiveShapes/objectHit/pointHitSort.H
View file @
4018425e
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-201
0
OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-201
1
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -65,7 +65,7 @@ public:
//- Construct null
pointHitSort
()
:
inter_
(
false
,
vector
::
zero
,
GREAT
),
inter_
(
false
,
vector
::
zero
,
GREAT
,
false
),
index_
(
-
1
)
{}
...
...
@@ -96,9 +96,9 @@ public:
return
inter_
.
distance
()
==
rhs
.
inter
().
distance
();
}
bool
operator
>
(
const
pointHitSort
&
rhs
)
const
bool
operator
<
(
const
pointHitSort
&
rhs
)
const
{
return
inter_
.
distance
()
>
rhs
.
inter
().
distance
();
return
inter_
.
distance
()
<
rhs
.
inter
().
distance
();
}
};
...
...
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