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
integer(pInt), intent(in) :: myUnit
#ifndef Spectral
integer(pInt), parameter :: maxNchunks = 5_pInt
integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt) chunk, Nchunks
character(len=300) :: line, damaskOption, v
#ifndef Spectral
character(len=300) :: keyword
#endif
#ifdef Spectral
mesh_periodicSurface = .true.
#else
mesh_periodicSurface = .false.
610 FORMAT(A300)
#ifdef Marc
keyword = '$damask'
#endif
@ -3631,7 +3632,6 @@ use IO, only: &
read (myUnit,610,END=620) line
myPos = IO_stringPos(line,maxNchunks)
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
damaskOption = IO_lc(IO_stringValue(line,myPos,2_pInt))
select case(damaskOption)
@ -3644,20 +3644,10 @@ use IO, only: &
enddo
endselect
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
610 FORMAT(A300)
620 end subroutine mesh_get_damaskOptions