Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fprettify --enable-replacements --c-relations src/*f90 #43

Open
wants to merge 1 commit into
base: Fix_HC_TGV
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
506 changes: 253 additions & 253 deletions src/bc_tgv.f90

Large diffs are not rendered by default.

560 changes: 280 additions & 280 deletions src/bc_tgv2d.f90

Large diffs are not rendered by default.

182 changes: 91 additions & 91 deletions src/case.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4,142 +4,142 @@

module case

use param, only : itype, itype_tgv, itype_tgv2d
use decomp_2d, only : mytype, xsize
use param, only: itype, itype_tgv, itype_tgv2d
use decomp_2d, only: mytype, xsize

use bc_tgv
use bc_tgv2d
use bc_tgv
use bc_tgv2d

implicit none
implicit none

private ! All functions/subroutines private by default
public :: case_boot, &
case_listing, &
case_init, &
case_bc, &
case_forcing, &
case_visu, &
case_postprocess, &
case_finalize
private ! All functions/subroutines private by default
public :: case_boot, &
case_listing, &
case_init, &
case_bc, &
case_forcing, &
case_visu, &
case_postprocess, &
case_finalize

contains

!
! Read case-specific parameters in the input file
! Initialize case-specific IO
! Allocate memory
!
subroutine case_boot()
!
! Read case-specific parameters in the input file
! Initialize case-specific IO
! Allocate memory
!
subroutine case_boot()

implicit none
implicit none

if (itype == itype_tgv) call tgv_boot()
if (itype == itype_tgv) call tgv_boot()

if (itype == itype_tgv2d) call tgv2d_boot()
if (itype == itype_tgv2d) call tgv2d_boot()

end subroutine case_boot
end subroutine case_boot

!
! Print case-specific parameters in the listing
!
subroutine case_listing()
!
! Print case-specific parameters in the listing
!
subroutine case_listing()

implicit none
implicit none

if (itype == itype_tgv) call tgv_listing()
if (itype == itype_tgv) call tgv_listing()

if (itype == itype_tgv2d) call tgv2d_listing()
if (itype == itype_tgv2d) call tgv2d_listing()

end subroutine case_listing
end subroutine case_listing

!
! Case-specific initialization
!
subroutine case_init(ux1, uy1, uz1)
!
! Case-specific initialization
!
subroutine case_init(ux1, uy1, uz1)

implicit none
implicit none

! Arguments
real(mytype),intent(out),dimension(xsize(1),xsize(2),xsize(3)) :: ux1, uy1, uz1
! Arguments
real(mytype), intent(out), dimension(xsize(1), xsize(2), xsize(3)) :: ux1, uy1, uz1

if (itype == itype_tgv) call tgv_init(ux1, uy1, uz1)
if (itype == itype_tgv) call tgv_init(ux1, uy1, uz1)

if (itype == itype_tgv2d) call tgv2d_init(ux1, uy1, uz1)
if (itype == itype_tgv2d) call tgv2d_init(ux1, uy1, uz1)

end subroutine case_init
end subroutine case_init

!
! Case-specific boundary conditions
!
subroutine case_bc(ux1, uy1, uz1)
!
! Case-specific boundary conditions
!
subroutine case_bc(ux1, uy1, uz1)

implicit none
implicit none

! Arguments
real(mytype), intent(inout), dimension(xsize(1),xsize(2),xsize(3)) :: ux1, uy1, uz1
! Arguments
real(mytype), intent(inout), dimension(xsize(1), xsize(2), xsize(3)) :: ux1, uy1, uz1

end subroutine case_bc
end subroutine case_bc

!
! Add case-specific forcing term in the momentum r.h.s.
!
subroutine case_forcing(dux1, duy1, duz1)
!
! Add case-specific forcing term in the momentum r.h.s.
!
subroutine case_forcing(dux1, duy1, duz1)

use param, only : ntime
use param, only: ntime

implicit none
implicit none

! Arguments
real(mytype), intent(inout), dimension(xsize(1),xsize(2),xsize(3),ntime) :: dux1, duy1, duz1
! Arguments
real(mytype), intent(inout), dimension(xsize(1), xsize(2), xsize(3), ntime) :: dux1, duy1, duz1

end subroutine case_forcing
end subroutine case_forcing

!
! Visualization
! This is called when itime % ioutput = 0
!
subroutine case_visu()
!
! Visualization
! This is called when itime % ioutput = 0
!
subroutine case_visu()

implicit none
implicit none

end subroutine case_visu
end subroutine case_visu

!
! Case-specific post-processing
! This is called at the end of each time step
!
subroutine case_postprocess(ux1, uy1, uz1, ndt)
!
! Case-specific post-processing
! This is called at the end of each time step
!
subroutine case_postprocess(ux1, uy1, uz1, ndt)

use param, only : ivisu, ioutput
use param, only: ivisu, ioutput

implicit none
implicit none

! Arguments
real(mytype), dimension(xsize(1),xsize(2),xsize(3)), intent(in) :: ux1, uy1, uz1
integer, intent(in) :: ndt
! Arguments
real(mytype), dimension(xsize(1), xsize(2), xsize(3)), intent(in) :: ux1, uy1, uz1
integer, intent(in) :: ndt

if (itype == itype_tgv) call tgv_postprocess(ux1, uy1, uz1, ndt)
if (itype == itype_tgv) call tgv_postprocess(ux1, uy1, uz1, ndt)

if (itype == itype_tgv2d) call tgv2d_postprocess(ux1, uy1, uz1, ndt)
if (itype == itype_tgv2d) call tgv2d_postprocess(ux1, uy1, uz1, ndt)

if ((ivisu /= 0).and.(ioutput /= 0)) then
if (mod(ndt, ioutput) == 0) call case_visu()
endif
if ((ivisu /= 0) .and. (ioutput /= 0)) then
if (mod(ndt, ioutput) == 0) call case_visu()
end if

end subroutine case_postprocess
end subroutine case_postprocess

!
! Finalize case-specific IO
! Free memory
!
subroutine case_finalize()
!
! Finalize case-specific IO
! Free memory
!
subroutine case_finalize()

implicit none
implicit none

if (itype == itype_tgv) call tgv_finalize()
if (itype == itype_tgv) call tgv_finalize()

if (itype == itype_tgv2d) call tgv2d_finalize()
if (itype == itype_tgv2d) call tgv2d_finalize()

end subroutine case_finalize
end subroutine case_finalize

end module case
Loading