GCC Code Coverage Report


Directory: src/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 0.0% 0 / 0 / 27
Functions: 0.0% 0 / 0 / 8
Branches: 0.0% 0 / 0 / 16

coord_transform/m_coord_transform_no.f90
Line Branch Exec Source
1 !> @brief Module for empty coordinate transformation
2 module m_coord_transform_no
3 use m_common, only: wp
4 use m_coord_transform_abstract, only: CoordTransformAbstract
5
6 implicit none
7
8 private
9 public :: NoTransform, no_transform, no_inverse_transform
10 public :: no_jacobian, no_jacobian_matrix, no_jacobian_matrix_inv
11 public :: no_G_matrix, no_G_matrix_inv
12
13 type, extends(CoordTransformAbstract) :: NoTransform
14 end type NoTransform
15 contains
16 !> @brief The i-th component of the no transformation
17 !> @param[in] this The NoTransform object
18 !> @param[in] i The index of the component
19 !> @param[in] xp The radial coordinate
20 !> @param[in] yp The angular coordinate
21 !> @param[in] zp The height coordinate
22 !> @return The i-th component of the transformation
23 pure real(wp) function no_transform(this, i, xp, yp, zp) result(ans)
24 !$acc routine seq
25 type(NoTransform), intent(in) :: this
26 integer, intent(in) :: i
27 real(wp), intent(in) :: xp, yp, zp
28
29 select case (i)
30 case (1)
31 ans = xp
32 case (2)
33 ans = yp
34 case (3)
35 ans = zp
36 end select
37 end function no_transform
38
39 !> @brief The i-th component of the inverse no transformation
40 !> @param[in] this The NoTransform object
41 !> @param[in] i The index of the component
42 !> @param[in] x The x coordinate
43 !> @param[in] y The y coordinate
44 !> @param[in] z The z coordinate
45 !> @return The i-th coordinate
46 pure real(wp) function no_inverse_transform(this, i, x, y, z) result(ans)
47 !$acc routine seq
48 type(NoTransform), intent(in) :: this
49 integer, intent(in) :: i
50 real(wp), intent(in) :: x, y, z
51
52 select case (i)
53 case (1)
54 ans = x
55 case (2)
56 ans = y
57 case (3)
58 ans = z
59 end select
60 end function no_inverse_transform
61
62 !> @brief The Jacobian determinant of the no transformation
63 !> @param[in] this The NoTransform object
64 !> @param[in] xp The radial coordinate
65 !> @param[in] yp The angular coordinate
66 !> @param[in] zp The height coordinate
67 !> @return The Jacobian determinant
68 pure real(wp) function no_jacobian(this, xp, yp, zp) result(ans)
69 !$acc routine seq
70 type(NoTransform), intent(in) :: this
71 real(wp), intent(in) :: xp, yp, zp
72
73 ans = 1.0_wp
74 end function no_jacobian
75
76 !> @brief The (i, j)-th component of the Jacobian matrix of the no transformation
77 !> @param[in] this The NoTransform object
78 !> @param[in] i The row index
79 !> @param[in] j The column index
80 !> @param[in] xp The radial coordinate
81 !> @param[in] yp The angular coordinate
82 !> @param[in] zp The height coordinate
83 !> @return The (i, j)-th component of the Jacobian matrix
84 pure real(wp) function no_jacobian_matrix(this, i, j, xp, yp, zp) result(ans)
85 !$acc routine seq
86 type(NoTransform), intent(in) :: this
87 integer, intent(in) :: i, j
88 real(wp), intent(in) :: xp, yp, zp
89 if (i == j) then
90 ans = 1.0_wp
91 else
92 ans = 0.0_wp
93 end if
94 end function no_jacobian_matrix
95
96 !> @brief The (i, j)-th component of the inverse of the Jacobian matrix of the no transformation
97 !> @param[in] this The NoTransform object
98 !> @param[in] i The row index
99 !> @param[in] j The column index
100 !> @param[in] xp The radial coordinate
101 !> @param[in] yp The angular coordinate
102 !> @param[in] zp The height coordinate
103 !> @return The (i, j)-th component of the inverse of the Jacobian matrix
104 pure real(wp) function no_jacobian_matrix_inv(this, i, j, xp, yp, zp) result(ans)
105 !$acc routine seq
106 type(NoTransform), intent(in) :: this
107 integer, intent(in) :: i, j
108 real(wp), intent(in) :: xp, yp, zp
109
110 if (i == j) then
111 ans = 1.0_wp
112 else
113 ans = 0.0_wp
114 end if
115 end function no_jacobian_matrix_inv
116
117 !> @brief The (i, j)-th component of the metric tensor of the no transformation
118 !> @param[in] this The NoTransform object
119 !> @param[in] i The row index
120 !> @param[in] j The column index
121 !> @param[in] xp The radial coordinate
122 !> @param[in] yp The angular coordinate
123 !> @param[in] zp The height coordinate
124 !> @return The (i, j)-th component of the metric tensor
125 pure real(wp) function no_G_matrix(this, i, j, xp, yp, zp) result(ans)
126 !$acc routine seq
127 type(NoTransform), intent(in) :: this
128 integer, intent(in) :: i, j
129 real(wp), intent(in) :: xp, yp, zp
130
131 if (i == j) then
132 ans = 1.0_wp
133 else
134 ans = 0.0_wp
135 end if
136 end function no_G_matrix
137
138 !> @brief The (i, j)-th component of the inverse metric tensor of the no transformation
139 !> @param[in] this The NoTransform object
140 !> @param[in] i The row index
141 !> @param[in] j The column index
142 !> @param[in] xp The radial coordinate
143 !> @param[in] yp The angular coordinate
144 !> @param[in] zp The height coordinate
145 !> @return The (i, j)-th component of the inverse metric tensor
146 pure real(wp) function no_G_matrix_inv(this, i, j, xp, yp, zp) result(ans)
147 !$acc routine seq
148 type(NoTransform), intent(in) :: this
149 integer, intent(in) :: i, j
150 real(wp), intent(in) :: xp, yp, zp
151
152 if (i == j) then
153 ans = 1.0_wp
154 else
155 ans = 0.0_wp
156 end if
157 end function no_G_matrix_inv
158
159 end module m_coord_transform_no
160