fluxes now always periodic for spectral solver, no need to explicitly state this in the geom file by use of "periodic" keyword

This commit is contained in:
Christoph Kords 2013-04-22 08:32:51 +00:00
parent 60fa91be9a
commit ca99274a5d
1 changed files with 11 additions and 21 deletions

View File

@ -3608,17 +3608,18 @@ use IO, only: &
implicit none implicit none
integer(pInt), intent(in) :: myUnit integer(pInt), intent(in) :: myUnit
#ifndef Spectral
integer(pInt), parameter :: maxNchunks = 5_pInt integer(pInt), parameter :: maxNchunks = 5_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt) chunk, Nchunks integer(pInt) chunk, Nchunks
character(len=300) :: line, damaskOption, v character(len=300) :: line, damaskOption, v
#ifndef Spectral
character(len=300) :: keyword character(len=300) :: keyword
#endif #endif
#ifdef Spectral
mesh_periodicSurface = .true.
#else
mesh_periodicSurface = .false. mesh_periodicSurface = .false.
610 FORMAT(A300)
#ifdef Marc #ifdef Marc
keyword = '$damask' keyword = '$damask'
#endif #endif
@ -3631,33 +3632,22 @@ use IO, only: &
read (myUnit,610,END=620) line read (myUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks) myPos = IO_stringPos(line,maxNchunks)
Nchunks = myPos(1) Nchunks = myPos(1)
#ifndef Spectral if (IO_lc(IO_stringValue(line,myPos,1_pInt)) == keyword .and. Nchunks > 1_pInt) then ! found keyword for damask option and there is at least one more chunk to read
if (IO_lc(IO_stringValue(line,myPos,1_pInt)) == keyword .and. Nchunks > 1_pInt) then ! found keyword for damask option and there is at least one more chunk to read
damaskOption = IO_lc(IO_stringValue(line,myPos,2_pInt)) damaskOption = IO_lc(IO_stringValue(line,myPos,2_pInt))
select case(damaskOption) select case(damaskOption)
case('periodic') ! damask Option that allows to specify periodic fluxes case('periodic') ! damask Option that allows to specify periodic fluxes
do chunk = 3_pInt,Nchunks ! loop through chunks (skipping the keyword) do chunk = 3_pInt,Nchunks ! loop through chunks (skipping the keyword)
v = IO_lc(IO_stringValue(line,myPos,chunk)) ! chunk matches keyvalues x,y, or z? v = IO_lc(IO_stringValue(line,myPos,chunk)) ! chunk matches keyvalues x,y, or z?
mesh_periodicSurface(1) = mesh_periodicSurface(1) .or. v == 'x' mesh_periodicSurface(1) = mesh_periodicSurface(1) .or. v == 'x'
mesh_periodicSurface(2) = mesh_periodicSurface(2) .or. v == 'y' mesh_periodicSurface(2) = mesh_periodicSurface(2) .or. v == 'y'
mesh_periodicSurface(3) = mesh_periodicSurface(3) .or. v == 'z' mesh_periodicSurface(3) = mesh_periodicSurface(3) .or. v == 'z'
enddo enddo
endselect endselect
endif endif
#else
damaskOption = IO_lc(IO_stringValue(line,myPos,1_pInt))
select case(damaskOption)
case('periodic') ! damask Option that allows to specify periodic fluxes
do chunk = 2_pInt,Nchunks ! loop through chunks (skipping the keyword)
v = IO_lc(IO_stringValue(line,myPos,chunk)) ! chunk matches keyvalues x,y, or z?
mesh_periodicSurface(1) = mesh_periodicSurface(1) .or. v == 'x'
mesh_periodicSurface(2) = mesh_periodicSurface(2) .or. v == 'y'
mesh_periodicSurface(3) = mesh_periodicSurface(3) .or. v == 'z'
enddo
endselect
#endif
enddo enddo
#endif
610 FORMAT(A300)
620 end subroutine mesh_get_damaskOptions 620 end subroutine mesh_get_damaskOptions