-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
825 additions
and
581 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,119 @@ | ||
module IDmodule | ||
! | ||
! Define Globals here | ||
! | ||
contains | ||
subroutine ID_name(name,theta,nx,P_deg,RK_stages,tau,IC_case,fmodel,f_case,method,IDn,IDf) | ||
! Define the inputs and outputs | ||
character(len=*), intent(in) :: name | ||
integer, intent(in) :: theta,nx,P_deg,RK_stages,IC_case,fmodel,f_case,method | ||
real, intent(in) :: tau | ||
character(len=*), intent(out) :: IDn,IDf | ||
! Define working variables | ||
character(len=20) :: name1,name2,name3,statistic,feq,advec,p_degree,elements,RKs,IC,omega,f | ||
! Define format for ID files names | ||
character(len=80) :: format_string,format_string2 | ||
|
||
! Break Name into useful parts "SBBGK1d" | ||
name1=name(1:2) | ||
name2=name(3:5) | ||
name3=name(6:7) | ||
|
||
! Define statistic | ||
select case (theta) | ||
case (-1) | ||
statistic = "BE" | ||
case (0) | ||
statistic = "MB" | ||
case (1) | ||
statistic = "FD" | ||
case default | ||
print *, 'Not a valid statistic' | ||
end select | ||
|
||
! Define equilibrium distirbution model useq | ||
select case (fmodel) | ||
case (1) ! UU | ||
feq = "-UU" | ||
case (2) ! ES | ||
feq = "-ES" | ||
case default | ||
print *, 'Model not available' | ||
end select | ||
|
||
! Define the Method to use | ||
select case (method) | ||
case (1) | ||
advec = "Upwind" | ||
P_degree = "1" | ||
case (2) | ||
advec = "*TVD**" | ||
P_degree = "1" | ||
case (3) | ||
advec = "WENO_3" | ||
P_degree = "3" | ||
case (4) | ||
advec = "WENO_5" | ||
P_degree = "5" | ||
case (5) | ||
advec = "DGWENO" | ||
P_degree = char(P_deg+48) | ||
case default | ||
print *, 'Advection method not available' | ||
end select | ||
|
||
! Define the number of cells to be used, | ||
write(elements,"(A1,I3)") 'X',nx | ||
|
||
! Define the number of RK stages | ||
write(Rks,"(I1)") RK_stages | ||
|
||
! Define the ID of Initial Condition used | ||
write(IC,"(I1)") IC_case | ||
|
||
! Define how to evolve f, | ||
select case (f_case) | ||
case (1) ! with Collision term-BGK approx | ||
write(omega,"(A1,I5)") 'W',ceiling(1.0/tau) | ||
case (2) ! no-collison-Euler limit | ||
omega = "EL" | ||
case default | ||
print *, 'case not available' | ||
end select | ||
|
||
! Define Format for file | ||
f = ".plt" | ||
|
||
format_string = "(A2,A3,A3,A1,A2,A6,A2,A2,I3,A1,I1,A2,I1,A1,A6,A2,A1,A4)" | ||
write(IDf,format_string) trim(name1),trim(feq),trim(name2),'-', & | ||
trim(statistic),trim(advec),trim(name3), & | ||
'-X',nx,'P',P_deg,'RK',RK_stages,'-',omega,'IC',IC,trim(f) | ||
format_string2 = "(A2,A3,A3,A1,A2,A6,A2,A2,I3,A1,I1,A2,I1,A1,A6,A2,A1)" | ||
write(IDn,format_string2) trim(name1),trim(feq),trim(name2),' ', & | ||
trim(statistic),trim(advec),trim(name3), & | ||
' X',nx,'P',P_deg,'RK',RK_stages,' ',omega,'IC',IC | ||
end subroutine ID_name | ||
|
||
subroutine output_names | ||
! I desided to preserve this idea for the future | ||
implicit none | ||
|
||
! character names | ||
character(len=12) :: filename | ||
character(len=12) :: format_string | ||
integer :: counter | ||
|
||
do counter=1, 10 | ||
if (counter < 10) then | ||
format_string = "(A5,I1)" | ||
else | ||
format_string = "(A5,I2)" | ||
endif | ||
|
||
write (filename,format_string) "hello", counter | ||
print *, trim(filename) | ||
end do | ||
|
||
end subroutine output_names | ||
|
||
end module IDmodule |
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,42 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
<CodeBlocks_project_file> | ||
<FileVersion major="1" minor="6" /> | ||
<Project> | ||
<Option title="TestingDGWENO" /> | ||
<Option pch_mode="2" /> | ||
<Option compiler="gfortran" /> | ||
<Build> | ||
<Target title="Debug"> | ||
<Option output="bin/Debug/TestingDGWENO" prefix_auto="1" extension_auto="1" /> | ||
<Option object_output="obj/Debug/" /> | ||
<Option type="1" /> | ||
<Option compiler="gfortran" /> | ||
<Compiler> | ||
<Add option="-g" /> | ||
</Compiler> | ||
</Target> | ||
<Target title="Release"> | ||
<Option output="bin/Release/TestingDGWENO" prefix_auto="1" extension_auto="1" /> | ||
<Option object_output="obj/Release/" /> | ||
<Option type="1" /> | ||
<Option compiler="gfortran" /> | ||
<Compiler> | ||
<Add option="-O2" /> | ||
</Compiler> | ||
<Linker> | ||
<Add option="-s" /> | ||
</Linker> | ||
</Target> | ||
</Build> | ||
<Compiler> | ||
<Add option="-Wall" /> | ||
</Compiler> | ||
<Unit filename="IDmodule.f90" /> | ||
<Unit filename="configuration.in" /> | ||
<Unit filename="main.f95" /> | ||
<Extensions> | ||
<code_completion /> | ||
<debugger /> | ||
</Extensions> | ||
</Project> | ||
</CodeBlocks_project_file> |
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,5 @@ | ||
# depslib dependency file v1.0 | ||
1374927848 source:/home/manuel/git/aero-shock/myf90/ESBGK/TestingDGWENO/TestingDGWENO/main.f95 | ||
|
||
1374928209 source:/home/manuel/git/aero-shock/myf90/ESBGK/TestingDGWENO/TestingDGWENO/IDmodule.f90 | ||
|
14 changes: 14 additions & 0 deletions
14
myf90/ESBGK/TestingDGWENO/TestingDGWENO/TestingDGWENO.layout
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,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
<CodeBlocks_layout_file> | ||
<ActiveTarget name="Debug" /> | ||
<File name="IDmodule.f90" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> | ||
<Cursor> | ||
<Cursor1 position="236" topLine="0" /> | ||
</Cursor> | ||
</File> | ||
<File name="main.f95" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> | ||
<Cursor> | ||
<Cursor1 position="1482" topLine="19" /> | ||
</Cursor> | ||
</File> | ||
</CodeBlocks_layout_file> |
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,44 @@ | ||
! the common block | ||
module data_module | ||
implicit none | ||
integer nx,md,nv | ||
|
||
!real*8, allocatable :: ph_q_v(:), ph_q_w(:) | ||
!real*8 pv_begin,pv_end | ||
|
||
real*8 nh | ||
parameter (nx=2560,md=5,nh=nx/2,nv=20) | ||
|
||
real*8 u(0:md,-md:nx+md,1:nv),ueq(0:md,-md:nx+md,1:nv) | ||
real*8 v(0:md,0:nx+1,1:nv),hg(0:md,0:nx+1,1:nv) | ||
real*8 rki(0:md,-md:nx+md),uki(0:md,-md:nx+md),pki(0:md,-md:nx+md),tki(0:md,-md:nx+md) | ||
real*8 eki(0:md,-md:nx+md) | ||
|
||
real x(-md:nx+md),dx(-md:nx+md),bl(0:10),br(0:10),bi(0:md) | ||
real*8 ai(0:10,0:10),am1(0:md),xx(200),uu(200),alim(3,3) | ||
real*8 aintt(0:10,0:10,0:10) | ||
real coef(10,10,10),rco(10,2,10),gauss(10,2),coef9(5,5,6) | ||
real*8 rco9(5,5,6) | ||
real sigma(2,6),gau(6,2),aii(0:10,0:10),sr | ||
real*8 gh(1:nv),w(1:nv),cc(1:nv),vv(1:nv) | ||
|
||
real*8 pi,cfld,dxmin,xm2 | ||
integer mp,kcmax,indexmax,indexmin | ||
integer indexnum,indx1(0:nx), index | ||
real*8 t,dt,mm | ||
|
||
!! Input Param !! | ||
integer mo !ooa in space | ||
integer mt !ooa in time | ||
integer kflux !common flux '1=Roe, 2=LF, 3=LLF' | ||
real*8 cflc !CFL number, 0.3 for P1, 0.18 for P2 and 0.1 for P3 | ||
integer ierror !0=initial runs; 1=restart | ||
real*8 tprint !input the terminal time | ||
integer n !n cells | ||
real*8 xmmm !TVB constant M | ||
real*8 tau | ||
integer phase_quadrature_rule | ||
integer init_value !init values 0: 0.5+sin(pi*x) 1:sod problem | ||
|
||
namelist/proj_list/mo,mt,kflux,cflc,tau,phase_quadrature_rule,init_value,ierror,tprint,n,xmmm | ||
end module data_module |
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,18 @@ | ||
$Parameters_list | ||
name="SBBGK1d", | ||
theta=0, | ||
nx=100, | ||
P_deg=3, | ||
RK_stages=3, | ||
IC_case=1, | ||
fmodel=1, | ||
f_case=1, | ||
method=1, | ||
tau=0.0001, | ||
kflux=1, | ||
tEnd=0.1, | ||
MM=1.0 | ||
/ | ||
!End of list | ||
!Coded by Manuel Diaz | ||
NTU, 2013.06.16 |
Oops, something went wrong.