further cleaning
This commit is contained in:
parent
f0f8be7840
commit
7d5f5afe01
|
@ -942,9 +942,6 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,&
|
|||
IO_error
|
||||
use numerics, only: &
|
||||
worldrank
|
||||
use debug, only: &
|
||||
debug_reset, &
|
||||
debug_info
|
||||
use math, only: &
|
||||
math_rotate_forward33, &
|
||||
math_det33
|
||||
|
@ -977,7 +974,6 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,&
|
|||
|
||||
materialpoint_F = reshape(F,[3,3,1,product(grid(1:2))*grid3]) ! set materialpoint target F to estimated field
|
||||
|
||||
call debug_reset() ! this has no effect on rank >0
|
||||
call materialpoint_stressAndItsTangent(.true.,timeinc) ! calculate P field
|
||||
|
||||
P = reshape(materialpoint_P, [3,3,grid(1),grid(2),grid3])
|
||||
|
@ -1023,8 +1019,7 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,&
|
|||
C_volAvg = sum(sum(materialpoint_dPdF,dim=6),dim=5)
|
||||
call MPI_Allreduce(MPI_IN_PLACE,C_volAvg,81,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||
C_volAvg = C_volAvg * wgt
|
||||
|
||||
call debug_info() ! this has no effect on rank >0
|
||||
|
||||
|
||||
end subroutine utilities_constitutiveResponse
|
||||
|
||||
|
|
|
@ -28,8 +28,7 @@ program DAMASK_FEM
|
|||
IO_intOut, &
|
||||
IO_warning
|
||||
use math ! need to include the whole module for FFTW
|
||||
use CPFEM2, only: &
|
||||
CPFEM_initAll
|
||||
use CPFEM2
|
||||
use FEsolving, only: &
|
||||
restartWrite, &
|
||||
restartInc
|
||||
|
@ -114,7 +113,7 @@ program DAMASK_FEM
|
|||
write(6,'(/,a)') ' <<<+- DAMASK_FEM init -+>>>'
|
||||
|
||||
! reading basic information from load case file and allocate data structure containing load cases
|
||||
call DMGetDimension(geomMesh,dimPlex,ierr)! CHKERRQ(ierr) !< dimension of mesh (2D or 3D)
|
||||
call DMGetDimension(geomMesh,dimPlex,ierr); CHKERRA(ierr) !< dimension of mesh (2D or 3D)
|
||||
nActiveFields = 1
|
||||
allocate(solres(nActiveFields))
|
||||
|
||||
|
@ -394,8 +393,7 @@ program DAMASK_FEM
|
|||
cutBack = .False.
|
||||
if(.not. all(solres(:)%converged .and. solres(:)%stagConverged)) then ! no solution found
|
||||
if (cutBackLevel < maxCutBack) then ! do cut back
|
||||
if (worldrank == 0) &
|
||||
write(6,'(/,a)') ' cut back detected'
|
||||
write(6,'(/,a)') ' cut back detected'
|
||||
cutBack = .True.
|
||||
stepFraction = (stepFraction - 1_pInt) * subStepFactor ! adjust to new denominator
|
||||
cutBackLevel = cutBackLevel + 1_pInt
|
||||
|
@ -403,7 +401,7 @@ program DAMASK_FEM
|
|||
timeinc = timeinc/2.0_pReal
|
||||
else ! default behavior, exit if spectral solver does not converge
|
||||
call IO_warning(850_pInt)
|
||||
call quit(-1_pInt*(lastRestartWritten+1_pInt)) ! quit and provide information about last restart inc written (e.g. for regridding) ! continue from non-converged solution and start guessing after accepted (sub)inc
|
||||
call quit(-1_pInt*(lastRestartWritten+1_pInt)) ! quit and provide information about last restart inc written
|
||||
endif
|
||||
else
|
||||
guess = .true. ! start guessing after first converged (sub)inc
|
||||
|
@ -428,7 +426,8 @@ program DAMASK_FEM
|
|||
endif; flush(6)
|
||||
|
||||
if (mod(inc,loadCases(currentLoadCase)%outputFrequency) == 0_pInt) then ! at output frequency
|
||||
write(6,'(1/,a)') ' ToDo: ... writing results to file ......................................'
|
||||
write(6,'(1/,a)') ' ... writing results to file ......................................'
|
||||
call CPFEM_results(totalIncsCounter,time)
|
||||
endif
|
||||
if ( loadCases(currentLoadCase)%restartFrequency > 0_pInt & ! writing of restart info requested ...
|
||||
.and. mod(inc,loadCases(currentLoadCase)%restartFrequency) == 0_pInt) then ! ... and at frequency of writing restart information
|
||||
|
@ -452,7 +451,6 @@ program DAMASK_FEM
|
|||
real(convergedCounter, pReal)/&
|
||||
real(notConvergedCounter + convergedCounter,pReal)*100.0_pReal, ' %) increments converged!'
|
||||
flush(6)
|
||||
call MPI_file_close(fileUnit,ierr)
|
||||
close(statUnit)
|
||||
|
||||
if (notConvergedCounter > 0_pInt) call quit(2_pInt) ! error if some are not converged
|
||||
|
|
|
@ -104,11 +104,8 @@ subroutine utilities_init
|
|||
use math ! must use the whole module for use of FFTW
|
||||
use mesh, only: &
|
||||
mesh_NcpElemsGlobal, &
|
||||
mesh_maxNips, &
|
||||
geomMesh
|
||||
|
||||
implicit none
|
||||
|
||||
mesh_maxNips
|
||||
|
||||
character(len=1024) :: petsc_optionsPhysics
|
||||
PetscErrorCode :: ierr
|
||||
|
||||
|
@ -142,35 +139,21 @@ end subroutine utilities_init
|
|||
!> @brief calculates constitutive response
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine utilities_constitutiveResponse(timeinc,P_av,forwardData)
|
||||
use math, only: &
|
||||
math_det33
|
||||
use FEsolving, only: &
|
||||
restartWrite
|
||||
use homogenization, only: &
|
||||
materialpoint_P, &
|
||||
materialpoint_stressAndItsTangent
|
||||
|
||||
implicit none
|
||||
real(pReal), intent(in) :: timeinc !< loading time
|
||||
logical, intent(in) :: forwardData !< age results
|
||||
|
||||
real(pReal),intent(out), dimension(3,3) :: P_av !< average PK stress
|
||||
|
||||
logical :: &
|
||||
age
|
||||
|
||||
PetscErrorCode :: ierr
|
||||
|
||||
write(6,'(/,a)') ' ... evaluating constitutive response ......................................'
|
||||
|
||||
age = .False.
|
||||
if (forwardData) then ! aging results
|
||||
age = .True.
|
||||
endif
|
||||
if (cutBack) then ! restore saved variables
|
||||
age = .False.
|
||||
endif
|
||||
|
||||
call materialpoint_stressAndItsTangent(.true.,timeinc) ! calculate P field
|
||||
|
||||
restartWrite = .false. ! reset restartWrite status
|
||||
|
@ -187,8 +170,6 @@ end subroutine utilities_constitutiveResponse
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine utilities_projectBCValues(localVec,section,field,comp,bcPointsIS,BCValue,BCDotValue,timeinc)
|
||||
|
||||
implicit none
|
||||
|
||||
Vec :: localVec
|
||||
PetscInt :: field, comp, nBcPoints, point, dof, numDof, numComp, offset
|
||||
PetscSection :: section
|
||||
|
|
Loading…
Reference in New Issue