• 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

68.75
/Source/Curves/ContinuousCurves/SMPolynomialInterpolantCurveClass.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
! --- End License
24
!
25
!////////////////////////////////////////////////////////////////////////
26
!
27
!      SMPolynomialInterpolant.f90
28
!      Created: April 13, 2026 at 3:10 PM 
29
!      By: David Kopriva  
30
!
31
!      This class is  a wrapper around the older
32
!      CurveInterpolantClass to make it a subclass of SMCurve. It
33
!      defines a curve by a Lagrange interpolating polynomial
34
!      through a set of nodes and values.
35
!
36
!////////////////////////////////////////////////////////////////////////
37
!
38
      Module SMPolynomialInterpolantClass
39
      USE SMCurveClass
40
      USE SMConstants
41
      USE CurveInterpolantClass
42
      
43
      IMPLICIT NONE
44
!
45
!     ---------------------
46
!     Class type definition
47
!     ---------------------
48
!
49
      TYPE, EXTENDS(SMCurve) :: SMPolynomialInterpolant
50
         TYPE(CurveInterpolant) :: selfInterpolant 
51
!
52
!        ========
53
         CONTAINS
54
!        ========
55
!
56
         PROCEDURE :: initWithNodesValuesAndID
57
         FINAL     :: destructPoly
58
         PROCEDURE :: positionAt       => positionOnPolyAt
59
         PROCEDURE :: tangentAt        => tangentOnPolyAt
60
         PROCEDURE :: derivativeAt     => derivativeOnPolyAt
61
         PROCEDURE :: printDescription => printPolyDescription
62
         PROCEDURE :: className        => PolyClassName
63
      END TYPE SMPolynomialInterpolant
64
!
65
!     ========
66
      CONTAINS
67
!     ========
68
!
69
!//////////////////////////////////////////////////////////////////////// 
70
! 
71
      SUBROUTINE initWithNodesValuesAndID( self, N, nodes, values, cName, id )  
1✔
72
         IMPLICIT NONE
73
         CLASS(SMPolynomialInterpolant)    :: self
74
         CHARACTER(LEN=*)                             :: cName
75
         INTEGER                                      :: id
76
         INTEGER                        , INTENT(IN)  :: N
77
         REAL(KIND=RP), DIMENSION(0:N)  , INTENT(IN)  :: nodes
78
         REAL(KIND=RP), DIMENSION(0:N,3), INTENT(IN)  :: values
79
         
80
         CALL self % SMCurve % initWithNameAndID(cName,id)
1✔
81
         CALL ConstructCurveInterpolant( self % selfInterpolant, N, nodes, values)
1✔
82
                  
83
      END SUBROUTINE initWithNodesValuesAndID
1✔
84
!
85
!//////////////////////////////////////////////////////////////////////// 
86
! 
87
      SUBROUTINE destructPoly(self)  
1✔
88
         IMPLICIT NONE
89
         TYPE(SMPolynomialInterpolant) :: self
90
         
91
         CALL DestructCurveInterpolant(self % selfInterpolant)
1✔
92
         
93
      END SUBROUTINE destructPoly
1✔
94
!
95
!//////////////////////////////////////////////////////////////////////// 
96
! 
NEW
97
      SUBROUTINE releasePoly(self)  
×
98
         IMPLICIT NONE
99
         TYPE (SMPolynomialInterpolant)  , POINTER :: self
100
         CLASS(FTObject), POINTER :: obj
101
         
NEW
102
         IF(.NOT. ASSOCIATED(self)) RETURN
×
103
         
NEW
104
         obj => self
×
NEW
105
         CALL releaseFTObject(self = obj)
×
NEW
106
         IF ( .NOT. ASSOCIATED(obj) )     THEN
×
NEW
107
            self => NULL() 
×
108
         END IF      
109
      END SUBROUTINE releasePoly
110
!
111
!//////////////////////////////////////////////////////////////////////// 
112
! 
113
     FUNCTION positionOnPolyAt(self,t)  RESULT(x)
21✔
114
        IMPLICIT NONE  
115
        CLASS(SMPolynomialInterpolant) :: self
116
        REAL(KIND=RP) :: t
117
        REAL(KIND=RP) :: x(3)
118
        
119
        CALL EvaluateAt(self % selfInterpolant,t,x)
21✔
120
        
121
     END FUNCTION positionOnPolyAt
21✔
122
!
123
!//////////////////////////////////////////////////////////////////////// 
124
! 
125
     FUNCTION tangentOnPolyAt(self,t)  RESULT(x)
21✔
126
        IMPLICIT NONE  
127
        CLASS(SMPolynomialInterpolant) :: self
128
        REAL(KIND=RP) :: t
129
        REAL(KIND=RP) :: x(3)
130
        
131
        CALL Derivative_At(self % selfInterpolant,t,x)
21✔
132
        x = x/SQRT(x(1)**2 + x(2)**2 + x(3)**2)
84✔
133
        
134
     END FUNCTION tangentOnPolyAt
21✔
135
!
136
!//////////////////////////////////////////////////////////////////////// 
137
! 
138
     FUNCTION derivativeOnPolyAt(self,t)  RESULT(x)
21✔
139
        IMPLICIT NONE  
140
        CLASS(SMPolynomialInterpolant) :: self
141
        REAL(KIND=RP) :: t
142
        REAL(KIND=RP) :: x(3)
143
        
144
        CALL Derivative_At(self % selfInterpolant,t,x)
21✔
145
        
146
     END FUNCTION derivativeOnPolyAt
21✔
147
!
148
!//////////////////////////////////////////////////////////////////////// 
149
! 
NEW
150
     SUBROUTINE printPolyDescription(self,iUnit)  
×
151
        IMPLICIT NONE
152
        CLASS(SMPolynomialInterpolant) :: self
153
        INTEGER       :: iUnit
NEW
154
        WRITE(iUnit,'(A)') "SMPolynomialInterpolant Object"
×
NEW
155
        IF(self % refCount() >= 0)     CONTINUE 
×
NEW
156
     END SUBROUTINE printPolyDescription
×
157
!
158
!//////////////////////////////////////////////////////////////////////// 
159
! 
160
!      -----------------------------------------------------------------
161
!> Class name returns a string with the name of the type of the object
162
!>
163
!>  ### Usage:
164
!>
165
!>        PRINT *,  obj % className()
166
!>        if( obj % className = "Poly")
167
!>
168
      FUNCTION PolyClassName(self)  RESULT(s)
1✔
169
         IMPLICIT NONE  
170
         CLASS(SMPolynomialInterpolant)                              :: self
171
         CHARACTER(LEN=CLASS_NAME_CHARACTER_LENGTH) :: s
172
         
173
         s = "Polynomial Interpolant"
1✔
174
         IF( self % refCount() >= 0 ) CONTINUE 
1✔
175
 
176
      END FUNCTION PolyClassName
1✔
177
      
178
      END Module SMPolynomialInterpolantClass
2✔
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