coord_transform/s_coord_transform_box.f90
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | !> @file s_coord_transform_box.f90 | ||
| 2 | !> @brief Submodule implementing BoxTransform methods | ||
| 3 | submodule(m_coord_transform_box) s_coord_transform_box | ||
| 4 | implicit none | ||
| 5 | |||
| 6 | contains | ||
| 7 | |||
| 8 | 3 | module procedure init_BoxTransform | |
| 9 | 3 | this%length_x = length_x | |
| 10 | 3 | this%length_y = length_y | |
| 11 | 3 | this%length_z = length_z | |
| 12 | this%is_orthogonal = .true. | ||
| 13 | this%has_polar_xy_singularity = .false. | ||
| 14 | 3 | end procedure init_BoxTransform | |
| 15 | |||
| 16 | 2100 | module procedure box_transform | |
| 17 | !$acc routine seq | ||
| 18 | 2800 | select case (i) | |
| 19 | case (1) | ||
| 20 | 700 | ans = this%length_x * xp | |
| 21 | case (2) | ||
| 22 | 700 | ans = this%length_y * yp | |
| 23 | case (3) | ||
| 24 |
3/4✓ Branch 2 → 3 taken 700 times.
✓ Branch 2 → 4 taken 700 times.
✓ Branch 2 → 5 taken 700 times.
✗ Branch 2 → 6 not taken.
|
2100 | ans = this%length_z * zp |
| 25 | end select | ||
| 26 | 2100 | end procedure box_transform | |
| 27 | |||
| 28 | 300 | module procedure box_inverse_transform | |
| 29 | !$acc routine seq | ||
| 30 | 400 | select case (i) | |
| 31 | case (1) | ||
| 32 | 100 | ans = x / this%length_x | |
| 33 | case (2) | ||
| 34 | 100 | ans = y / this%length_y | |
| 35 | case (3) | ||
| 36 |
3/4✓ Branch 2 → 3 taken 100 times.
✓ Branch 2 → 4 taken 100 times.
✓ Branch 2 → 5 taken 100 times.
✗ Branch 2 → 6 not taken.
|
300 | ans = z / this%length_z |
| 37 | end select | ||
| 38 | 300 | end procedure box_inverse_transform | |
| 39 | |||
| 40 | 200 | module procedure box_jacobian | |
| 41 | !$acc routine seq | ||
| 42 | 200 | ans = this%length_x * this%length_y * this%length_z | |
| 43 | 200 | end procedure box_jacobian | |
| 44 | |||
| 45 | 4500 | module procedure box_jacobian_matrix | |
| 46 | !$acc routine seq | ||
| 47 |
2/2✓ Branch 2 → 3 taken 1500 times.
✓ Branch 2 → 7 taken 3000 times.
|
4500 | if (i /= j) then |
| 48 | ans = 0._wp | ||
| 49 | return | ||
| 50 | end if | ||
| 51 | |||
| 52 | 500 | select case (i) | |
| 53 | case (1) | ||
| 54 | 500 | ans = this%length_x | |
| 55 | case (2) | ||
| 56 | 500 | ans = this%length_y | |
| 57 | case (3) | ||
| 58 |
3/4✓ Branch 3 → 4 taken 500 times.
✓ Branch 3 → 5 taken 500 times.
✓ Branch 3 → 6 taken 500 times.
✗ Branch 3 → 7 not taken.
|
1500 | ans = this%length_z |
| 59 | end select | ||
| 60 | end procedure box_jacobian_matrix | ||
| 61 | |||
| 62 | 900 | module procedure box_jacobian_matrix_inv | |
| 63 | !$acc routine seq | ||
| 64 |
2/2✓ Branch 2 → 3 taken 300 times.
✓ Branch 2 → 7 taken 600 times.
|
900 | if (i /= j) then |
| 65 | ans = 0._wp | ||
| 66 | return | ||
| 67 | end if | ||
| 68 | |||
| 69 | 100 | select case (i) | |
| 70 | case (1) | ||
| 71 | 100 | ans = 1._wp / this%length_x | |
| 72 | case (2) | ||
| 73 | 100 | ans = 1._wp / this%length_y | |
| 74 | case (3) | ||
| 75 |
3/4✓ Branch 3 → 4 taken 100 times.
✓ Branch 3 → 5 taken 100 times.
✓ Branch 3 → 6 taken 100 times.
✗ Branch 3 → 7 not taken.
|
300 | ans = 1._wp / this%length_z |
| 76 | end select | ||
| 77 | end procedure box_jacobian_matrix_inv | ||
| 78 | |||
| 79 | 2100 | module procedure box_G_matrix | |
| 80 | !$acc routine seq | ||
| 81 |
2/2✓ Branch 2 → 3 taken 900 times.
✓ Branch 2 → 7 taken 1200 times.
|
2100 | if (i /= j) then |
| 82 | ans = 0._wp | ||
| 83 | return | ||
| 84 | end if | ||
| 85 | |||
| 86 | 300 | select case (i) | |
| 87 | case (1) | ||
| 88 | 300 | ans = this%length_x**2 | |
| 89 | case (2) | ||
| 90 | 300 | ans = this%length_y**2 | |
| 91 | case (3) | ||
| 92 |
3/4✓ Branch 3 → 4 taken 300 times.
✓ Branch 3 → 5 taken 300 times.
✓ Branch 3 → 6 taken 300 times.
✗ Branch 3 → 7 not taken.
|
900 | ans = this%length_z**2 |
| 93 | end select | ||
| 94 | end procedure box_G_matrix | ||
| 95 | |||
| 96 | 900 | module procedure box_G_matrix_inv | |
| 97 | !$acc routine seq | ||
| 98 |
2/2✓ Branch 2 → 3 taken 300 times.
✓ Branch 2 → 4 taken 600 times.
|
900 | if (i /= j) then |
| 99 | ans = 0._wp | ||
| 100 | return | ||
| 101 | end if | ||
| 102 | 300 | ans = 1._wp / box_G_matrix(this, i, i, xp, yp, zp) | |
| 103 | 300 | end procedure box_G_matrix_inv | |
| 104 | |||
| 105 | end submodule s_coord_transform_box | ||
| 106 |