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
dumux-repositories
dumux
Commits
31755e9f
Commit
31755e9f
authored
Jan 08, 2020
by
Timo Koch
Browse files
[intersectingentities] Use std::size_t as index type
parent
7419d40f
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/common/geometry/intersectingentities.hh
View file @
31755e9f
...
...
@@ -57,7 +57,7 @@ intersectingEntities(const Dune::FieldVector<ctype, dimworld>& point,
* \brief Compute all intersections between entities and a point
*/
template
<
class
ctype
,
int
dimworld
>
inline
std
::
pair
<
bool
,
unsigned
in
t
>
inline
std
::
pair
<
bool
,
std
::
size_
t
>
intersectingEntityCartesian
(
const
Dune
::
FieldVector
<
ctype
,
dimworld
>&
point
,
const
Dune
::
FieldVector
<
ctype
,
dimworld
>&
min
,
const
Dune
::
FieldVector
<
ctype
,
dimworld
>&
max
,
...
...
@@ -73,14 +73,14 @@ intersectingEntityCartesian(const Dune::FieldVector<ctype, dimworld>& point,
min
[
2
]
-
eps2
<=
point
[
2
]
&&
point
[
2
]
<=
max
[
2
]
+
eps2
)
{
auto
ijk
=
point
-
min
;
using
std
::
min
;
using
std
::
max
;
using
std
::
min
;
using
std
::
max
;
using
std
::
floor
;
for
(
int
i
=
0
;
i
<
dimworld
;
++
i
)
ijk
[
i
]
=
max
(
min
(
std
::
floor
(
ijk
[
i
]
*
cells
[
i
]
/
dist
[
i
]),
cells
[
i
]
-
1
),
0.0
);
ijk
[
i
]
=
max
(
min
(
floor
(
ijk
[
i
]
*
cells
[
i
]
/
dist
[
i
]),
cells
[
i
]
-
1
),
0.0
);
return
std
::
make_pair
(
true
,
(
unsigned
in
t
)(
cells
[
1
]
*
cells
[
0
]
*
int
(
ijk
[
2
])
+
cells
[
0
]
*
int
(
ijk
[
1
])
+
int
(
ijk
[
0
])));
return
std
::
make_pair
(
true
,
(
std
::
size_
t
)(
cells
[
1
]
*
cells
[
0
]
*
int
(
ijk
[
2
])
+
cells
[
0
]
*
int
(
ijk
[
1
])
+
int
(
ijk
[
0
])));
}
else
return
std
::
make_pair
(
false
,
(
unsigned
int
)(
0
)
);
return
std
::
make_pair
(
false
,
std
::
size_t
{}
);
}
/*!
...
...
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