-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SphericalIterative() and GradSphericalIterative() to angular_fu…
…nctions.f95 (#619) * Added IterativeHarmonics() * Made some efficiency changes * Created test_angular_benchmark * Added GradSphericalIterative * Changes to GradSphericalIterative * Changed s_c for IterativeHarmonics * Fixed issue with IterativeHarmonics output * Cleaned up variable allocations * Changed the name of IterativeHarmonics Changed IterativeHarmonics to SphericalIterative for consistency * git rm to remove some files from PR * Improved computation of s_m and c_m
- Loading branch information
Showing
4 changed files
with
257 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
program test_angular | ||
|
||
use system_module | ||
use angular_functions_module | ||
|
||
implicit none | ||
|
||
integer :: l_max, i, j, k | ||
real(dp) :: x(3, 1) | ||
real(dp), allocatable :: b(:,:,:) | ||
|
||
l_max = 4 | ||
allocate(b(-l_max:l_max, 0:l_max, SIZE(x,2))) | ||
x(1,1) = 8.0 | ||
x(2,1) = 3.0 | ||
x(3,1) = 9.0 | ||
|
||
CALL system_initialise() | ||
|
||
b = SphericalIterative(l_max, x) | ||
|
||
do k=1, SIZE(x,2) | ||
do i=0, l_max | ||
do j=-i, i | ||
print *, b(j,i,k) | ||
end do | ||
end do | ||
end do | ||
|
||
deallocate(b) | ||
CALL system_finalise() | ||
|
||
end program test_angular |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
program test_grad_sphericals | ||
|
||
use system_module | ||
use angular_functions_module | ||
|
||
implicit none | ||
|
||
integer :: l_max, i, j, k | ||
real(dp) :: x(3, 1) | ||
real(dp), allocatable :: b(:,:,:,:) | ||
|
||
l_max = 4 | ||
allocate(b(-l_max:l_max, 0:l_max, SIZE(x,2), 3)) | ||
x(1,1) = 0.0 | ||
x(2,1) = 0.0 | ||
x(3,1) = 0.0 | ||
|
||
CALL system_initialise() | ||
|
||
b = GradSphericalIterative(l_max, x) | ||
|
||
do k=1, SIZE(x,2) | ||
do i=0, l_max | ||
do j=-i, i | ||
print *, b(j,i,k,1), b(j,i,k,2), b(j,i,k,3) | ||
end do | ||
end do | ||
end do | ||
|
||
deallocate(b) | ||
CALL system_finalise() | ||
|
||
end program test_grad_sphericals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters