shape mismatch in crystallite, invalid names for variables(pos, size) in homogenization corrected. polishing of DAMASK_spectral_interface and makefile

This commit is contained in:
Martin Diehl 2011-08-01 18:10:55 +00:00
parent 3adb7ab382
commit 564eb5009f
4 changed files with 45 additions and 57 deletions

View File

@ -39,8 +39,7 @@ subroutine DAMASK_interface_init()
write(6,*) '$Id$'
write(6,*)
return
endsubroutine
endsubroutine DAMASK_interface_init
!********************************************************************
! extract working directory from loadcase file
@ -64,9 +63,7 @@ function getSolverWorkingDirectoryName()
getSolverWorkingDirectoryName = rectifyPath(getSolverWorkingDirectoryName)
return
endfunction
endfunction getSolverWorkingDirectoryName
!********************************************************************
! basename of geometry file from command line arguments
@ -81,7 +78,7 @@ function getSolverJobName()
character(1024) getSolverJobName
getSolverJobName = trim(getModelName())//'_'//trim(getLoadCase())
endfunction
endfunction getSolverJobName
!********************************************************************
! basename of geometry file from command line arguments
@ -115,8 +112,7 @@ function getModelName()
getModelName = makeRelativePath(getSolverWorkingDirectoryName(),&
getModelName)
return
endfunction
endfunction getModelName
!********************************************************************
! name of load case file exluding extension
@ -142,8 +138,7 @@ function getLoadCase()
if (posExt <= posSep) posExt = len_trim(outName)+1 ! no extension present
getLoadCase = outName(posSep+1:posExt-1) ! name of load case file exluding extension
return
endfunction
endfunction getLoadCase
!********************************************************************
@ -175,8 +170,7 @@ function getLoadcaseName()
getLoadcaseName = makeRelativePath(getSolverWorkingDirectoryName(),&
getLoadcaseName)
return
endfunction
endfunction getLoadcaseName
!********************************************************************
@ -211,7 +205,7 @@ function rectifyPath(path)
i = j+index(rectifyPath(j+1:l),'../')
enddo
if(len_trim(rectifyPath) == 0) rectifyPath = '/'
return
endfunction rectifyPath
@ -239,7 +233,7 @@ function makeRelativePath(a,b)
if (a(i:i) == '/') remainingSlashes = remainingSlashes + 1
enddo
makeRelativePath = repeat('../',remainingSlashes)//b(posLastCommonSlash+1:len_trim(b))
return
endfunction makeRelativePath
END MODULE

View File

@ -3058,60 +3058,55 @@ function crystallite_postResults(&
c = c + 1_pInt
do o = 1,crystallite_Noutput(crystID)
mySize = 0_pInt
select case(crystallite_output(o,crystID))
case ('phase')
mySize = 1_pInt
crystallite_postResults(c+1) = material_phase(g,i,e) ! phaseID of grain
c = c + 1_pInt
case ('texture')
mySize = 1_pInt
crystallite_postResults(c+1) = material_texture(g,i,e) ! textureID of grain
c = c + 1_pInt
case ('volume')
mySize = 1_pInt
crystallite_postResults(c+1) = material_volume(g,i,e) ! grain volume (not fraction but absolute, right?)
c = c + 1_pInt
case ('orientation')
crystallite_postResults(c+1:c+4) = crystallite_orientation(1:4,g,i,e) ! grain orientation as quaternion
c = c + 4_pInt
mySize = 4_pInt
crystallite_postResults(c+1:c+mySize) = crystallite_orientation(1:4,g,i,e) ! grain orientation as quaternion
case ('eulerangles')
crystallite_postResults(c+1:c+3) = inDeg * math_QuaternionToEuler(crystallite_orientation(1:4,g,i,e)) ! grain orientation as Euler angles in degree
c = c + 3_pInt
mySize = 3_pInt
crystallite_postResults(c+1:c+mySize) = inDeg * math_QuaternionToEuler(crystallite_orientation(1:4,g,i,e)) ! grain orientation as Euler angles in degree
case ('grainrotation')
crystallite_postResults(c+1:c+4) = math_QuaternionToAxisAngle(crystallite_rotation(1:4,g,i,e)) ! grain rotation away from initial orientation as axis-angle
mySize = 4_pInt
crystallite_postResults(c+1:c+mySize) = math_QuaternionToAxisAngle(crystallite_rotation(1:4,g,i,e)) ! grain rotation away from initial orientation as axis-angle
crystallite_postResults(c+4) = inDeg * crystallite_postResults(c+4) ! angle in degree
c = c + 4_pInt
! remark: tensor output is of the form 11,12,13, 21,22,23, 31,32,33
! thus row index i is slow, while column index j is fast. reminder: "row is slow"
case ('defgrad','f')
mySize = 9_pInt
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_partionedF(1:3,1:3,g,i,e)),(/mySize/))
c = c + mySize
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_partionedF(1:3,1:3,g,i,e)),(/mySize/))
case ('fe')
mySize = 9_pInt
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_Fe(1:3,1:3,g,i,e)),(/mySize/))
c = c + mySize
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_Fe(1:3,1:3,g,i,e)),(/mySize/))
case ('ee')
Ee = 0.5_pReal * (math_mul33x33(math_transpose3x3(crystallite_Fe(1:3,1:3,g,i,e)), crystallite_Fe(1:3,1:3,g,i,e)) - math_I3)
mySize = 9_pInt
crystallite_postResults(c+1:c+1+mySize) = reshape(Ee,(/mySize/))
c = c + mySize
crystallite_postResults(c+1:c+mySize) = reshape(Ee,(/mySize/))
case ('fp')
mySize = 9_pInt
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_Fp(1:3,1:3,g,i,e)),(/mySize/))
c = c + mySize
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_Fp(1:3,1:3,g,i,e)),(/mySize/))
case ('lp')
mySize = 9_pInt
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_Lp(1:3,1:3,g,i,e)),(/mySize/))
c = c + mySize
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_Lp(1:3,1:3,g,i,e)),(/mySize/))
case ('p','firstpiola','1stpiola')
mySize = 9_pInt
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_P(1:3,1:3,g,i,e)),(/mySize/))
c = c + mySize
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_P(1:3,1:3,g,i,e)),(/mySize/))
case ('s','tstar','secondpiola','2ndpiola')
mySize = 9_pInt
crystallite_postResults(c+1:c+1+mySize) = reshape(math_Mandel6to33(crystallite_Tstar_v(1:6,g,i,e)),(/mySize/))
c = c + mySize
crystallite_postResults(c+1:c+mySize) = reshape(math_Mandel6to33(crystallite_Tstar_v(1:6,g,i,e)),(/mySize/))
end select
c = c + mySize
enddo
crystallite_postResults(c+1) = constitutive_sizePostResults(g,i,e) ! size of constitutive results

View File

@ -553,31 +553,31 @@ subroutine materialpoint_postResults(dt)
implicit none
real(pReal), intent(in) :: dt
integer(pInt) g,i,e,pos,size,myNgrains,myCrystallite
integer(pInt) g,i,e,thePos,theSize,myNgrains,myCrystallite
!$OMP PARALLEL DO PRIVATE(myNgrains,myCrystallite,pos,size)
!$OMP PARALLEL DO PRIVATE(myNgrains,myCrystallite,thePos,theSize)
do e = FEsolving_execElem(1),FEsolving_execElem(2) ! iterate over elements to be processed
myNgrains = homogenization_Ngrains(mesh_element(3,e))
myCrystallite = microstructure_crystallite(mesh_element(4,e))
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed
pos = 0_pInt
thePos = 0_pInt
materialpoint_results(pos+1,i,e) = myNgrains ! tell number of grains at materialpoint
pos = pos + 1_pInt
materialpoint_results(thePos+1,i,e) = myNgrains ! tell number of grains at materialpoint
thePos = thePos + 1_pInt
size = homogenization_sizePostResults(i,e)
materialpoint_results(pos+1,i,e) = size ! tell size of homogenization results
pos = pos + 1_pInt
theSize = homogenization_sizePostResults(i,e)
materialpoint_results(thePos+1,i,e) = theSize ! tell size of homogenization results
thePos = thePos + 1_pInt
if (size > 0_pInt) then ! any homogenization results to mention?
materialpoint_results(pos+1:pos+size,i,e) = homogenization_postResults(i,e) ! tell homogenization results
pos = pos + size
if (theSize > 0_pInt) then ! any homogenization results to mention?
materialpoint_results(thePos+1:thePos+theSize,i,e) = homogenization_postResults(i,e) ! tell homogenization results
thePos = thePos + theSize
endif
do g = 1,myNgrains ! loop over all grains
size = (1 + crystallite_sizePostResults(myCrystallite)) + (1 + constitutive_sizePostResults(g,i,e))
materialpoint_results(pos+1:pos+size,i,e) = crystallite_postResults(dt,g,i,e) ! tell crystallite results
pos = pos + size
theSize = (1 + crystallite_sizePostResults(myCrystallite)) + (1 + constitutive_sizePostResults(g,i,e))
materialpoint_results(thePos+1:thePos+theSize,i,e) = crystallite_postResults(dt,g,i,e) ! tell crystallite results
thePos = thePos + theSize
enddo
enddo
enddo

View File

@ -23,7 +23,6 @@ OPENMP_FLAG =-fopenmp
OPTIMIZATION_AGGRESSIVE =-O3
OPTIMIZATION_DEFENSIVE =-O2
COMPILE_OPTIONS =-xf95-cpp-input
#COMPILE_OPTIONS =
HEAP_ARRAYS =
else
@ -35,12 +34,12 @@ endif
OPENMP_FLAG =-openmp
HEAP_ARRAYS =-heap-arrays 500000000
COMPILE_OPTIONS =-fpp -diag-disable 8291 #for preprocessor, switch off messages on formatting of output
COMPILE_OPTIONS =-fpp -diag-disable 8291,8290
#fpp: for preprocessor, diag-disable: switch off messages on formatting of output
OPTIMIZATION_AGGRESSIVE =-O3 -static $(PORTABLE_SWITCH)
ifeq ($(VERSION), 12)
OPTIMIZATION_DEFENSIVE =$(OPTIMIZATION_AGGRESIVE)
else
OPTIMIZATION_DEFENSIVE =-O2
endif
@ -48,9 +47,9 @@ endif
endif
COMPILE = $(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_AGGRESSIVE) -c
COMPILE_HEAP = $(COMPILE) $(HEAP_ARRAYS)
COMPILE_HEAP_DEFENSIVE = $(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_DEFENSIVE) -c $(HEAP_ARRAYS)
COMPILE =$(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_AGGRESSIVE) -c
COMPILE_HEAP =$(COMPILE) $(HEAP_ARRAYS)
COMPILE_HEAP_DEFENSIVE =$(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_DEFENSIVE) -c $(HEAP_ARRAYS)
ifeq ($(PRECISION),single)