Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Futility
Futility
Commits
8f561a8f
Commit
8f561a8f
authored
Aug 27, 2021
by
Graham, Aaron
Browse files
Merge remote-tracking branch 'origin/master' into hdf5_bool_attribute
parents
569187da
9bc4a357
Pipeline
#162087
passed with stage
in 2 minutes and 5 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
src/ArrayUtils.f90
View file @
8f561a8f
...
...
@@ -866,17 +866,18 @@ PURE FUNCTION findIndex_1DReal(r,pos,delta,incl,tol) RESULT(ind)
ENDIF
!If there is a tolerance specified, assign it
l_tol
=
EPSREAL
l_tol
=
EPSREAL
*
10.0_SRK
IF
(
PRESENT
(
tol
))
THEN
!Give tolerance a range of say 1000*EPSREAL
IF
((
0.0_SRK
<
tol
))
l_tol
=
tol
ENDIF
!Below the array
IF
(
pos
<
tmp
(
1
))
THEN
ind
=
-4
IF
(
pos
<
tmp
(
1
)
-
l_tol
)
THEN
ind
=
-1
!Above the array
ELSEIF
(
tmp
(
n
)
<
pos
)
THEN
ELSEIF
(
tmp
(
n
)
+
l_tol
<
pos
)
THEN
ind
=
-2
!Inbetween, error if on mesh
ELSEIF
(
l_incl
==
0
)
THEN
...
...
@@ -891,10 +892,9 @@ PURE FUNCTION findIndex_1DReal(r,pos,delta,incl,tol) RESULT(ind)
ENDIF
!Inbetween, don't error on mesh
ELSEIF
(
l_incl
>
0
)
THEN
IF
((
tmp
(
1
)
.APPROXLE.
pos
)
.AND.
(
pos
.APPROXLE.
tmp
(
n
)
))
THEN
IF
(
SOFTLE
(
tmp
(
1
)
,
pos
,
l_tol
)
.AND.
SOFTLE
(
pos
,
tmp
(
n
),
l_tol
))
THEN
ind
=
1
DO
WHILE
(
SOFTGE
(
pos
,
tmp
(
ind
),
l_tol
))
!DO WHILE(pos .APPROXGE. tmp(ind))
ind
=
ind
+1
IF
(
ind
>
n
)
EXIT
ENDDO
...
...
unit_tests/testArrayUtils/testArrayUtils.f90
View file @
8f561a8f
This diff is collapsed.
Click to expand it.
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