• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

trixi-framework / HOHQMesh / 30318764346

28 Jul 2026 12:55AM UTC coverage: 76.972% (+1.1%) from 75.909%
30318764346

Pull #166

github

web-flow
Merge 3346edfd3 into 955f92dca
Pull Request #166: Add L2/H1 boundary optimization

1631 of 1964 new or added lines in 40 files covered. (83.04%)

48 existing lines in 4 files now uncovered.

9563 of 12424 relevant lines covered (76.97%)

634449.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.95
/Source/BoundaryOptimization/IntervalSearch.f90
1
! MIT License
2
!
3
! Copyright (c) 2010-present David A. Kopriva and other contributors: AUTHORS.md
4
!
5
! Permission is hereby granted, free of charge, to any person obtaining a copy
6
! of this software and associated documentation files (the "Software"), to deal
7
! in the Software without restriction, including without limitation the rights
8
! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
! copies of the Software, and to permit persons to whom the Software is
10
! furnished to do so, subject to the following conditions:
11
!
12
! The above copyright notice and this permission notice shall be included in all
13
! copies or substantial portions of the Software.
14
!
15
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
! SOFTWARE.
22
!
23
! FTObjectLibrary contains code that, to the best of our knowledge, has been released as
24
! public domain software:
25
! * `b3hs_hash_key_jenkins`: originally by Rich Townsend,
26
! https://groups.google.com/forum/#!topic/comp.lang.fortran/RWoHZFt39ng, 2005
27
!
28
! --- End License
29
!
30
!////////////////////////////////////////////////////////////////////////
31
!
32
!      IntervalSearch.f90
33
!      Created: February 27, 2026 at 8:19 AM
34
!      By: David Kopriva
35
!
36
!////////////////////////////////////////////////////////////////////////
37
!
38
   Module IntervalSearchModule
39
      USE ProgramGlobals
40
      IMPLICIT NONE
41

42
!
43
!     ========
44
      CONTAINS
45
!     ========
46
!
47
!
48
!////////////////////////////////////////////////////////////////////////
49
!
50
      FUNCTION findInterval(array, t) RESULT(s)
69,772✔
51
!
52
!     --------------------------------------------------
53
!     Given the parametric location t, find the interval
54
!     in which that value of t appears.
55
!     --------------------------------------------------
56
!
57
         IMPLICIT NONE
58
!
59
!        ---------
60
!        Arguments
61
!        ---------
62
!
63
         REAL(KIND=RP)                 :: array(0:)
64
         REAL(KIND=RP)                 :: t
65
         INTEGER                       :: s
66
 !
67
!        ---------------
68
!        Local Variables
69
!        ---------------
70
!
71
         INTEGER       :: nSegments
72
         INTEGER       :: j, lft = 0, rgt, mid
73
         SAVE          :: lft
74

75
         nSegments = SIZE(array) - 1
69,772✔
76
!
77
!        ------------
78
!        Find segment
79
!        ------------
80
!
81
         IF( lft >= nSegments ) lft= 0
69,772✔
82
         IF ( t > array(lft) .AND. t < array(lft+1) )     THEN
69,772✔
83
            s = lft+1
55,363✔
84
         ELSE
85
            rgt = nSegments
14,409✔
86
            lft = 0
14,409✔
87
            DO j = 1, nSegments
89,505✔
88
              mid = (lft+ rgt)/2
89,505✔
89
              IF ( t < array(mid) )     THEN
89,505✔
90
                  rgt = mid
40,340✔
91
               ELSE
92
                  lft = mid
49,165✔
93
               END IF
94
               IF(rgt-lft == 1) EXIT
89,505✔
95
            END DO
96
            s = lft+1
14,409✔
97
         END IF
98

99
      END FUNCTION findInterval
69,772✔
100
!
101
!////////////////////////////////////////////////////////////////////////
102
!
NEW
103
      REAL(KIND=RP) FUNCTION searchArrayForValue(searchArray, array, t)
×
104
         IMPLICIT NONE
105
!
106
!        ---------
107
!        Arguments
108
!        ---------
109
!
110
         REAL(KIND=RP) :: searchArray(0:)
111
         REAL(KIND=RP) :: array(:)
112
         REAL(KIND=RP) :: t
113
!
114
!        ---------------
115
!        Local Variables
116
!        ---------------
117
!
118
         INTEGER       :: k
119

NEW
120
         k                   = findInterval(searchArray, t)
×
NEW
121
         searchArrayForValue = array(k)
×
122

NEW
123
      END FUNCTION searchArrayForValue
×
124

125
   END Module IntervalSearchModule
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc