00001 module def_formulation
00002 use phys_constant, only : long
00003 use grid_parameter, only : chrot, chgra, chope
00004 implicit none
00005 real(long) :: swlp(1:4), swls(1:4), swflu
00006 integer :: iswl
00007 character(1) :: char
00008
00009
00010 contains
00011 subroutine choose_formulation
00012 use grid_parameter, only : chrot, chgra, chope
00013 implicit none
00014 chrot = 'c'
00015 chgra = 'w'
00016 chope = 'L'
00017
00018
00019
00020 swlp(1) = 1.0d0
00021 swlp(2) = 1.0d0
00022 swlp(3) = 0.0d0
00023 swlp(4) = 0.0d0
00024 swls(1) = 0.0d0
00025 swls(2) = 1.0d0
00026 swls(3) = 0.0d0
00027 swls(4) = 1.0d0
00028
00029
00030
00031 if (chrot == 'c') then
00032 write(6,*) ' ### Co-rotating solutions. ###'
00033 else if (chrot == 'i') then
00034 write(6,*) ' ### Irrotating solutions. ###'
00035 else
00036 write(6,*) ' ### INVARID PARAMETER --- chrot. ###'
00037 stop
00038 end if
00039 swflu = 1.0d0
00040 if (chrot == 'c') swflu = 0.0d0
00041
00042 if (chgra == 'i') then
00043 write(6,*) ' ### IWM formalism. ###'
00044 else if (chgra == 'w') then
00045 write(6,*) ' ### SUF-Waveless formalism. ###'
00046 else if (chgra == 'c') then
00047 write(6,*) ' ### Waveless-Helical cut off formalism. ###'
00048 else if (chgra == 'C') then
00049 write(6,*) ' ### Waveless-Helical cut off formalism. ###'
00050 else if (chgra == 'h') then
00051 write(6,*) ' ### Helical formalism. ###'
00052 else if (chgra == 'H') then
00053 write(6,*) ' ### Helical cut off formalism (simple cutoff) ###'
00054 else if (chgra == 'W') then
00055 write(6,*) ' ### Helical -> Waveless source ###'
00056 else
00057 write(6,*) ' ### INVARID PARAMETER --- chgra. ###'
00058 stop
00059 end if
00060
00061 if (chope == 'L') then
00062 write(6,*) ' ### Invert Laplacian for hij. ###'
00063 else if (chope == 'H') then
00064 write(6,*) ' ### Invert Helmholtz operator for hij. ###'
00065 else
00066 write(6,*) ' ### INVARID PARAMETER --- chope. ###'
00067 stop
00068 end if
00069
00070 char = chrot//chgra//chope
00071
00072 end subroutine choose_formulation
00073
00074 end module def_formulation