renamed subroutine "mesh_marc_get_mpieOptions" to "mesh_get_damaskOptions" which is now also used for abaqus and spectral input files. The only available option so far is "periodic", which allows for periodic fluxes in the specified direction. Examples for usage (add the following lines to the respective input file, in case of spectral file this goes into the header):

- periodicity in x and z direction for marc:
   $damask periodic x z  
- periodicity in y direction for abaqus:
   **damask periodic y
- periodicity in x and y direction for spectral:
   periodic y x
This commit is contained in:
Christoph Kords 2012-02-03 12:37:52 +00:00
parent a3e47b2d65
commit bbf4f25898
1 changed files with 50 additions and 21 deletions

View File

@ -304,7 +304,6 @@
call mesh_marc_build_nodes(fileUnit) call mesh_marc_build_nodes(fileUnit)
call mesh_marc_count_cpSizes(fileunit) call mesh_marc_count_cpSizes(fileunit)
call mesh_marc_build_elements(fileUnit) call mesh_marc_build_elements(fileUnit)
call mesh_marc_get_mpieOptions(fileUnit)
case ('Abaqus') case ('Abaqus')
noPart = IO_abaqus_hasNoPart(fileUnit) noPart = IO_abaqus_hasNoPart(fileUnit)
call mesh_abaqus_count_nodesAndElements(fileUnit) call mesh_abaqus_count_nodesAndElements(fileUnit)
@ -319,6 +318,7 @@
call mesh_abaqus_count_cpSizes(fileunit) call mesh_abaqus_count_cpSizes(fileunit)
call mesh_abaqus_build_elements(fileUnit) call mesh_abaqus_build_elements(fileUnit)
end select end select
call mesh_get_damaskOptions(fileUnit)
close (fileUnit) close (fileUnit)
call mesh_build_subNodeCoords() call mesh_build_subNodeCoords()
@ -1393,12 +1393,13 @@ FE_ipNeighbor(:FE_NipNeighbors(8),:FE_Nips(8),8) = & ! element 117
!******************************************************************** !********************************************************************
! get any additional mpie options from input file (Marc only) ! get any additional damask options from input file
! !
! mesh_periodicSurface ! mesh_periodicSurface
!******************************************************************** !********************************************************************
subroutine mesh_marc_get_mpieOptions(myUnit) subroutine mesh_get_damaskOptions(myUnit)
use DAMASK_interface, only: FEsolver
use prec, only: pInt use prec, only: pInt
use IO use IO
implicit none implicit none
@ -1407,23 +1408,35 @@ integer(pInt), intent(in) :: myUnit
integer(pInt), parameter :: maxNchunks = 5 integer(pInt), parameter :: maxNchunks = 5
integer(pInt), dimension (1+2*maxNchunks) :: myPos integer(pInt), dimension (1+2*maxNchunks) :: myPos
integer(pInt) chunk integer(pInt) chunk, Nchunks
character(len=300) line character(len=300) line
character damaskOption, keyword
mesh_periodicSurface = (/.false., .false., .false./) mesh_periodicSurface = (/.false., .false., .false./)
610 FORMAT(A300) 610 FORMAT(A300)
select case (FEsolver)
case ('Spectral') ! no special keyword needed, the damask option directly goes into the header
case ('Marc')
keyword = '$damask'
case ('Abaqus')
keyword = '**damask'
end select
rewind(myUnit) rewind(myUnit)
do do
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)
if (IO_lc(IO_stringValue(line,myPos,1)) == '$mpie') then ! found keyword for user defined input select case (FEsolver)
if (IO_lc(IO_stringValue(line,myPos,2)) == 'periodic' & ! found keyword 'periodic' case ('Marc','Abaqus')
.and. myPos(1) > 2) then ! and there is at least one more chunk to read if (IO_lc(IO_stringValue(line,myPos,1)) == keyword .and. Nchunks > 1) then ! found keyword for damask option and there is at least one more chunk to read
do chunk = 2,myPos(1) ! loop through chunks (skipping the keyword) damaskOption = IO_lc(IO_stringValue(line,myPos,2))
select case(IO_stringValue(line,myPos,chunk)) ! chunk matches keyvalues x,y or z? select case(damaskOption)
case('periodic') ! damask Option that allows to specify periodic fluxes
do chunk = 3,Nchunks ! loop through chunks (skipping the keyword)
select case(IO_stringValue(line,myPos,chunk)) ! chunk matches keyvalues x,y, or z?
case('x') case('x')
mesh_periodicSurface(1) = .true. mesh_periodicSurface(1) = .true.
case('y') case('y')
@ -1432,8 +1445,24 @@ do
mesh_periodicSurface(3) = .true. mesh_periodicSurface(3) = .true.
end select end select
enddo enddo
endselect
endif endif
endif case('Spectral')
damaskOption = IO_lc(IO_stringValue(line,myPos,1))
select case(damaskOption)
case('periodic') ! damask Option that allows to specify periodic fluxes
do chunk = 2,Nchunks ! loop through chunks (skipping the keyword)
select case(IO_stringValue(line,myPos,chunk)) ! chunk matches keyvalues x,y, or z?
case('x')
mesh_periodicSurface(1) = .true.
case('y')
mesh_periodicSurface(2) = .true.
case('z')
mesh_periodicSurface(3) = .true.
end select
enddo
endselect
endselect
enddo enddo
620 endsubroutine 620 endsubroutine