Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module quads                                                                                                                                                                                                      
  2.   implicit none                                                                                                                                                                                                    
  3.   real(kind=8) :: pc_pi, trd,frd,erd,it1,it2                                                                                                                                                                      
  4.   real(kind=8), allocatable, dimension(:,:) :: vr,vph,vth,rho                                                                                                                                                      
  5.   integer :: lmax                                                                                                                                                                                                  
  6.   parameter(pc_pi = acos(-1.d0))                                                                                                                                                                                  
  7.   parameter(trd = 2.d0/3.d0)                                                                                                                                                                                      
  8.   parameter(frd = 4.d0/3.d0)                                                                                                                                                                                      
  9.   parameter(erd = 8.d0/3.d0)                                                                                                                                                                                      
  10.   parameter(it1 = 1.0d0/sqrt(4.0d0*pc_pi))                                                                                                                                                                        
  11.   parameter(it2 = 1.0d0/(4.0d0*pc_pi))                                                                                                                                                                            
  12.   lmax = 20                                                                                                                                                                                                        
  13.                                                                                                                                                                                                                    
  14.                                                                                                                                                                                                                    
  15. contains                                                                                                                                                                                                          
  16.                                                                                                                                                                                                                    
  17.   subroutine set_vars(vel1,vel2,vel3,den)                                                                                                                                                                          
  18.     real(kind=8), intent(in) :: vel1,vel2,vel3,den                                                                                                                                                                
  19.     integer :: i,ast                                                                                                                                                                                              
  20.     ALLOCATE (vr(0:lmax,-lmax:lmax), STAT = ast)                                                                                                                                                                  
  21.     ALLOCATE (vph(0:lmax,-lmax:lmax), STAT = ast)                                                                                                                                                                  
  22.     ALLOCATE (vth(0:lmax,-lmax:lmax), STAT = ast)                                                                                                                                                                  
  23.     ALLOCATE (rho(0:lmax,-lmax:lmax), STAT = ast)                                                                                                                                                                  
  24.                                                                                                                                                                                                                    
  25.     vr = vel1 ; vph = vel2; vth = vel3; rho = den;                                                                                                                                                                
  26.   end subroutine set_vars
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement