Skip to content

Commit

Permalink
Added new module for the realistic morphology. Eventually I will merg…
Browse files Browse the repository at this point in the history
…e existing routines into here
  • Loading branch information
daminton committed May 1, 2020
1 parent 3bc2d8c commit 37c6c6d
Show file tree
Hide file tree
Showing 3 changed files with 659 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ init/module_init.f90\
seismic/module_seismic.f90\
regolith/module_regolith.f90\
porosity/module_porosity.f90\
realistic/module_realistic.f90\
util/util_toupper.f90\
util/util_mrgrnk.f90\
util/util_add_to_layer.f90\
Expand Down Expand Up @@ -111,5 +112,6 @@ regolith/regolith_transport.f90\
regolith/regolith_traverse_streamtube.f90\
regolith/regolith_subcrater_mix.f90\
porosity/porosity_form_interior.f90\
realistic/realistic_perlin_noise.f90\
main/CTEM.f90
CLEANFILES = *.mod
97 changes: 97 additions & 0 deletions src/realistic/module_realistic.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
module module_realistic
implicit none
public
save

interface
function realistic_turbulence(x, y, noise_height, freq, pers, num_octaves, anchor) result(noise)
use module_globals
implicit none
real(DP), intent(in) :: x, y, noise_height, freq, pers
integer(I4B) :: num_octaves
real(DP),dimension(3,num_octaves),intent(in) :: anchor
real(DP) :: noise
end function realistic_turbulence
end interface

interface
function realistic_arrayinput(x, y, num_octaves, Sarr, Aarr, anchor) result(noise)
use module_globals
implicit none
real(DP), intent(in) :: x, y
integer(I4B) :: num_octaves
real(DP), dimension(num_octaves),intent(in) :: Sarr, Aarr
real(DP), dimension(3,num_octaves),intent(in) :: anchor
real(DP) :: noise
end function realistic_arrayinput
end interface

interface
function realistic_billowedNoise(x, y, noise_height, freq, pers, num_octaves, anchor) result(noise)
use module_globals
implicit none
real(DP), intent(in) :: x, y, noise_height, freq, pers
integer(I4B) :: num_octaves
real(DP),dimension(3,num_octaves),intent(in) :: anchor
real(DP) :: noise
end function realistic_billowedNoise
end interface

interface
function realistic_plawNoise(x, y, noise_height, freq, pers, slope, num_octaves, anchor) result(noise)
use module_globals
implicit none
real(DP), intent(in) :: x, y, noise_height, freq, pers, slope
integer(I4B) :: num_octaves
real(DP),dimension(3,num_octaves),intent(in) :: anchor
real(DP) :: noise
end function realistic_plawNoise
end interface

interface
function realistic_ridgedNoise(x, y, noise_height, freq, pers, num_octaves, anchor) result(noise)
use module_globals
implicit none
real(DP), intent(in) :: x, y, noise_height, freq, pers
integer(I4B) :: num_octaves
real(DP),dimension(3,num_octaves),intent(in) :: anchor
real(DP) :: noise
end function realistic_ridgedNoise
end interface

interface
function realistic_swissTurbulence(x, y, lacunarity, gain, warp, num_octaves, anchor) result(noise)
use module_globals
implicit none
real(DP), intent(in) :: x, y, lacunarity, gain, warp
integer(I4B) :: num_octaves
real(DP),dimension(3,num_octaves) :: anchor
real(DP) :: noise
end function realistic_swissTurbulence
end interface

interface
function realistic_jordanTurbulence(x,y,lacunarity,gain1,gain,warp0,warp,damp0,damp,damp_scale,&
num_octaves, anchor) result(noise)
use module_globals
implicit none
real(DP),intent(in) :: x, y, lacunarity, gain1, gain, warp0, warp, damp0, damp, damp_scale
integer(I4B),intent(in) :: num_octaves
real(DP),dimension(3,num_octaves),intent(in) :: anchor
real(DP) :: noise
end function realistic_jordanTurbulence
end interface

interface
subroutine realistic_perlin_noise(xx,yy,noise,dx,dy)
use module_globals
implicit none
real(DP),intent(in) :: xx,yy
real(DP),intent(out) :: noise
real(DP),intent(out),optional :: dx, dy
end subroutine realistic_perlin_noise
end interface


end module module_realistic

Loading

0 comments on commit 37c6c6d

Please sign in to comment.