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:
parent
3adb7ab382
commit
564eb5009f
|
@ -39,8 +39,7 @@ subroutine DAMASK_interface_init()
|
||||||
write(6,*) '$Id$'
|
write(6,*) '$Id$'
|
||||||
write(6,*)
|
write(6,*)
|
||||||
|
|
||||||
return
|
endsubroutine DAMASK_interface_init
|
||||||
endsubroutine
|
|
||||||
|
|
||||||
!********************************************************************
|
!********************************************************************
|
||||||
! extract working directory from loadcase file
|
! extract working directory from loadcase file
|
||||||
|
@ -64,9 +63,7 @@ function getSolverWorkingDirectoryName()
|
||||||
|
|
||||||
getSolverWorkingDirectoryName = rectifyPath(getSolverWorkingDirectoryName)
|
getSolverWorkingDirectoryName = rectifyPath(getSolverWorkingDirectoryName)
|
||||||
|
|
||||||
return
|
endfunction getSolverWorkingDirectoryName
|
||||||
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
!********************************************************************
|
!********************************************************************
|
||||||
! basename of geometry file from command line arguments
|
! basename of geometry file from command line arguments
|
||||||
|
@ -81,7 +78,7 @@ function getSolverJobName()
|
||||||
character(1024) getSolverJobName
|
character(1024) getSolverJobName
|
||||||
getSolverJobName = trim(getModelName())//'_'//trim(getLoadCase())
|
getSolverJobName = trim(getModelName())//'_'//trim(getLoadCase())
|
||||||
|
|
||||||
endfunction
|
endfunction getSolverJobName
|
||||||
|
|
||||||
!********************************************************************
|
!********************************************************************
|
||||||
! basename of geometry file from command line arguments
|
! basename of geometry file from command line arguments
|
||||||
|
@ -115,8 +112,7 @@ function getModelName()
|
||||||
|
|
||||||
getModelName = makeRelativePath(getSolverWorkingDirectoryName(),&
|
getModelName = makeRelativePath(getSolverWorkingDirectoryName(),&
|
||||||
getModelName)
|
getModelName)
|
||||||
return
|
endfunction getModelName
|
||||||
endfunction
|
|
||||||
|
|
||||||
!********************************************************************
|
!********************************************************************
|
||||||
! name of load case file exluding extension
|
! name of load case file exluding extension
|
||||||
|
@ -142,8 +138,7 @@ function getLoadCase()
|
||||||
if (posExt <= posSep) posExt = len_trim(outName)+1 ! no extension present
|
if (posExt <= posSep) posExt = len_trim(outName)+1 ! no extension present
|
||||||
getLoadCase = outName(posSep+1:posExt-1) ! name of load case file exluding extension
|
getLoadCase = outName(posSep+1:posExt-1) ! name of load case file exluding extension
|
||||||
|
|
||||||
return
|
endfunction getLoadCase
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!********************************************************************
|
||||||
|
@ -175,8 +170,7 @@ function getLoadcaseName()
|
||||||
|
|
||||||
getLoadcaseName = makeRelativePath(getSolverWorkingDirectoryName(),&
|
getLoadcaseName = makeRelativePath(getSolverWorkingDirectoryName(),&
|
||||||
getLoadcaseName)
|
getLoadcaseName)
|
||||||
return
|
endfunction getLoadcaseName
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!********************************************************************
|
||||||
|
@ -211,7 +205,7 @@ function rectifyPath(path)
|
||||||
i = j+index(rectifyPath(j+1:l),'../')
|
i = j+index(rectifyPath(j+1:l),'../')
|
||||||
enddo
|
enddo
|
||||||
if(len_trim(rectifyPath) == 0) rectifyPath = '/'
|
if(len_trim(rectifyPath) == 0) rectifyPath = '/'
|
||||||
return
|
|
||||||
endfunction rectifyPath
|
endfunction rectifyPath
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,7 +233,7 @@ function makeRelativePath(a,b)
|
||||||
if (a(i:i) == '/') remainingSlashes = remainingSlashes + 1
|
if (a(i:i) == '/') remainingSlashes = remainingSlashes + 1
|
||||||
enddo
|
enddo
|
||||||
makeRelativePath = repeat('../',remainingSlashes)//b(posLastCommonSlash+1:len_trim(b))
|
makeRelativePath = repeat('../',remainingSlashes)//b(posLastCommonSlash+1:len_trim(b))
|
||||||
return
|
|
||||||
endfunction makeRelativePath
|
endfunction makeRelativePath
|
||||||
|
|
||||||
END MODULE
|
END MODULE
|
|
@ -3058,60 +3058,55 @@ function crystallite_postResults(&
|
||||||
c = c + 1_pInt
|
c = c + 1_pInt
|
||||||
|
|
||||||
do o = 1,crystallite_Noutput(crystID)
|
do o = 1,crystallite_Noutput(crystID)
|
||||||
|
mySize = 0_pInt
|
||||||
select case(crystallite_output(o,crystID))
|
select case(crystallite_output(o,crystID))
|
||||||
case ('phase')
|
case ('phase')
|
||||||
|
mySize = 1_pInt
|
||||||
crystallite_postResults(c+1) = material_phase(g,i,e) ! phaseID of grain
|
crystallite_postResults(c+1) = material_phase(g,i,e) ! phaseID of grain
|
||||||
c = c + 1_pInt
|
|
||||||
case ('texture')
|
case ('texture')
|
||||||
|
mySize = 1_pInt
|
||||||
crystallite_postResults(c+1) = material_texture(g,i,e) ! textureID of grain
|
crystallite_postResults(c+1) = material_texture(g,i,e) ! textureID of grain
|
||||||
c = c + 1_pInt
|
|
||||||
case ('volume')
|
case ('volume')
|
||||||
|
mySize = 1_pInt
|
||||||
crystallite_postResults(c+1) = material_volume(g,i,e) ! grain volume (not fraction but absolute, right?)
|
crystallite_postResults(c+1) = material_volume(g,i,e) ! grain volume (not fraction but absolute, right?)
|
||||||
c = c + 1_pInt
|
|
||||||
case ('orientation')
|
case ('orientation')
|
||||||
crystallite_postResults(c+1:c+4) = crystallite_orientation(1:4,g,i,e) ! grain orientation as quaternion
|
mySize = 4_pInt
|
||||||
c = c + 4_pInt
|
crystallite_postResults(c+1:c+mySize) = crystallite_orientation(1:4,g,i,e) ! grain orientation as quaternion
|
||||||
case ('eulerangles')
|
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
|
mySize = 3_pInt
|
||||||
c = c + 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')
|
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
|
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
|
! 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"
|
! thus row index i is slow, while column index j is fast. reminder: "row is slow"
|
||||||
|
|
||||||
case ('defgrad','f')
|
case ('defgrad','f')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_partionedF(1:3,1:3,g,i,e)),(/mySize/))
|
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_partionedF(1:3,1:3,g,i,e)),(/mySize/))
|
||||||
c = c + mySize
|
|
||||||
case ('fe')
|
case ('fe')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_Fe(1:3,1:3,g,i,e)),(/mySize/))
|
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_Fe(1:3,1:3,g,i,e)),(/mySize/))
|
||||||
c = c + mySize
|
|
||||||
case ('ee')
|
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)
|
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
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+1+mySize) = reshape(Ee,(/mySize/))
|
crystallite_postResults(c+1:c+mySize) = reshape(Ee,(/mySize/))
|
||||||
c = c + mySize
|
|
||||||
case ('fp')
|
case ('fp')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_Fp(1:3,1:3,g,i,e)),(/mySize/))
|
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_Fp(1:3,1:3,g,i,e)),(/mySize/))
|
||||||
c = c + mySize
|
|
||||||
case ('lp')
|
case ('lp')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_Lp(1:3,1:3,g,i,e)),(/mySize/))
|
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_Lp(1:3,1:3,g,i,e)),(/mySize/))
|
||||||
c = c + mySize
|
|
||||||
case ('p','firstpiola','1stpiola')
|
case ('p','firstpiola','1stpiola')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+1+mySize) = reshape(math_transpose3x3(crystallite_P(1:3,1:3,g,i,e)),(/mySize/))
|
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose3x3(crystallite_P(1:3,1:3,g,i,e)),(/mySize/))
|
||||||
c = c + mySize
|
|
||||||
case ('s','tstar','secondpiola','2ndpiola')
|
case ('s','tstar','secondpiola','2ndpiola')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+1+mySize) = reshape(math_Mandel6to33(crystallite_Tstar_v(1:6,g,i,e)),(/mySize/))
|
crystallite_postResults(c+1:c+mySize) = reshape(math_Mandel6to33(crystallite_Tstar_v(1:6,g,i,e)),(/mySize/))
|
||||||
c = c + mySize
|
|
||||||
end select
|
end select
|
||||||
|
c = c + mySize
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
crystallite_postResults(c+1) = constitutive_sizePostResults(g,i,e) ! size of constitutive results
|
crystallite_postResults(c+1) = constitutive_sizePostResults(g,i,e) ! size of constitutive results
|
||||||
|
|
|
@ -553,31 +553,31 @@ subroutine materialpoint_postResults(dt)
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
real(pReal), intent(in) :: dt
|
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
|
do e = FEsolving_execElem(1),FEsolving_execElem(2) ! iterate over elements to be processed
|
||||||
myNgrains = homogenization_Ngrains(mesh_element(3,e))
|
myNgrains = homogenization_Ngrains(mesh_element(3,e))
|
||||||
myCrystallite = microstructure_crystallite(mesh_element(4,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
|
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
|
materialpoint_results(thePos+1,i,e) = myNgrains ! tell number of grains at materialpoint
|
||||||
pos = pos + 1_pInt
|
thePos = thePos + 1_pInt
|
||||||
|
|
||||||
size = homogenization_sizePostResults(i,e)
|
theSize = homogenization_sizePostResults(i,e)
|
||||||
materialpoint_results(pos+1,i,e) = size ! tell size of homogenization results
|
materialpoint_results(thePos+1,i,e) = theSize ! tell size of homogenization results
|
||||||
pos = pos + 1_pInt
|
thePos = thePos + 1_pInt
|
||||||
|
|
||||||
if (size > 0_pInt) then ! any homogenization results to mention?
|
if (theSize > 0_pInt) then ! any homogenization results to mention?
|
||||||
materialpoint_results(pos+1:pos+size,i,e) = homogenization_postResults(i,e) ! tell homogenization results
|
materialpoint_results(thePos+1:thePos+theSize,i,e) = homogenization_postResults(i,e) ! tell homogenization results
|
||||||
pos = pos + size
|
thePos = thePos + theSize
|
||||||
endif
|
endif
|
||||||
|
|
||||||
do g = 1,myNgrains ! loop over all grains
|
do g = 1,myNgrains ! loop over all grains
|
||||||
size = (1 + crystallite_sizePostResults(myCrystallite)) + (1 + constitutive_sizePostResults(g,i,e))
|
theSize = (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
|
materialpoint_results(thePos+1:thePos+theSize,i,e) = crystallite_postResults(dt,g,i,e) ! tell crystallite results
|
||||||
pos = pos + size
|
thePos = thePos + theSize
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
|
@ -23,7 +23,6 @@ OPENMP_FLAG =-fopenmp
|
||||||
OPTIMIZATION_AGGRESSIVE =-O3
|
OPTIMIZATION_AGGRESSIVE =-O3
|
||||||
OPTIMIZATION_DEFENSIVE =-O2
|
OPTIMIZATION_DEFENSIVE =-O2
|
||||||
COMPILE_OPTIONS =-xf95-cpp-input
|
COMPILE_OPTIONS =-xf95-cpp-input
|
||||||
#COMPILE_OPTIONS =
|
|
||||||
HEAP_ARRAYS =
|
HEAP_ARRAYS =
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -35,12 +34,12 @@ endif
|
||||||
|
|
||||||
OPENMP_FLAG =-openmp
|
OPENMP_FLAG =-openmp
|
||||||
HEAP_ARRAYS =-heap-arrays 500000000
|
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)
|
OPTIMIZATION_AGGRESSIVE =-O3 -static $(PORTABLE_SWITCH)
|
||||||
|
|
||||||
ifeq ($(VERSION), 12)
|
ifeq ($(VERSION), 12)
|
||||||
OPTIMIZATION_DEFENSIVE =$(OPTIMIZATION_AGGRESIVE)
|
OPTIMIZATION_DEFENSIVE =$(OPTIMIZATION_AGGRESIVE)
|
||||||
|
|
||||||
else
|
else
|
||||||
OPTIMIZATION_DEFENSIVE =-O2
|
OPTIMIZATION_DEFENSIVE =-O2
|
||||||
endif
|
endif
|
||||||
|
@ -48,9 +47,9 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
COMPILE = $(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_AGGRESSIVE) -c
|
COMPILE =$(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_AGGRESSIVE) -c
|
||||||
COMPILE_HEAP = $(COMPILE) $(HEAP_ARRAYS)
|
COMPILE_HEAP =$(COMPILE) $(HEAP_ARRAYS)
|
||||||
COMPILE_HEAP_DEFENSIVE = $(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_DEFENSIVE) -c $(HEAP_ARRAYS)
|
COMPILE_HEAP_DEFENSIVE =$(OPENMP_FLAG) $(COMPILE_OPTIONS) $(OPTIMIZATION_DEFENSIVE) -c $(HEAP_ARRAYS)
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(PRECISION),single)
|
ifeq ($(PRECISION),single)
|
||||||
|
|
Loading…
Reference in New Issue