polishing
This commit is contained in:
parent
886e111064
commit
326e3d0824
|
@ -7,20 +7,20 @@
|
|||
module grid_mech_FEM
|
||||
#include <petsc/finclude/petscsnes.h>
|
||||
#include <petsc/finclude/petscdmda.h>
|
||||
use DAMASK_interface
|
||||
use HDF5_utilities
|
||||
use PETScdmda
|
||||
use PETScsnes
|
||||
|
||||
use prec
|
||||
use debug
|
||||
use DAMASK_interface
|
||||
use HDF5_utilities
|
||||
use math
|
||||
use spectral_utilities
|
||||
use FEsolving
|
||||
use numerics
|
||||
use homogenization
|
||||
use DAMASK_interface
|
||||
use spectral_utilities
|
||||
use discretization
|
||||
use mesh_grid
|
||||
use math
|
||||
use debug
|
||||
|
||||
implicit none
|
||||
private
|
||||
|
@ -50,7 +50,7 @@ module grid_mech_FEM
|
|||
F_aimDot = 0.0_pReal, & !< assumed rate of average deformation gradient
|
||||
F_aim = math_I3, & !< current prescribed deformation gradient
|
||||
F_aim_lastIter = math_I3, &
|
||||
F_aim_lastInc = math_I3, & !< previous average deformation gradient
|
||||
F_aim_lastInc = math_I3, & !< previous average deformation gradient
|
||||
P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress
|
||||
|
||||
character(len=1024), private :: incInfo !< time and increment information
|
||||
|
@ -80,8 +80,8 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine grid_mech_FEM_init
|
||||
|
||||
real(pReal) :: HGCoeff = 0e-2_pReal
|
||||
PetscInt, dimension(:), allocatable :: localK
|
||||
real(pReal) :: HGCoeff = 0.0e-2_pReal
|
||||
PetscInt, dimension(worldsize) :: localK
|
||||
real(pReal), dimension(3,3) :: &
|
||||
temp33_Real = 0.0_pReal
|
||||
real(pReal), dimension(4,8) :: &
|
||||
|
@ -121,10 +121,9 @@ subroutine grid_mech_FEM_init
|
|||
! initialize solver specific parts of PETSc
|
||||
call SNESCreate(PETSC_COMM_WORLD,mech_snes,ierr); CHKERRQ(ierr)
|
||||
call SNESSetOptionsPrefix(mech_snes,'mech_',ierr);CHKERRQ(ierr)
|
||||
allocate(localK(worldsize), source = 0); localK(worldrank+1) = grid3
|
||||
do rank = 1, worldsize
|
||||
call MPI_Bcast(localK(rank),1,MPI_INTEGER,rank-1,PETSC_COMM_WORLD,ierr)
|
||||
enddo
|
||||
localK = 0
|
||||
localK(worldrank+1) = grid3
|
||||
call MPI_Allreduce(MPI_IN_PLACE,localK,worldsize,MPI_INTEGER,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||
call DMDACreate3d(PETSC_COMM_WORLD, &
|
||||
DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, &
|
||||
DMDA_STENCIL_BOX, &
|
||||
|
|
|
@ -282,7 +282,7 @@ subroutine grid_mech_spectral_basic_forward(cutBack,guess,timeinc,timeinc_old,lo
|
|||
F_aimDot = merge(stress_BC%maskFloat*(F_aim-F_aim_lastInc)/timeinc_old, 0.0_pReal, guess)
|
||||
F_aim_lastInc = F_aim
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!-----------------------------------------------------------------------------------------------
|
||||
! calculate rate for aim
|
||||
if (deformation_BC%myType=='l') then ! calculate F_aimDot from given L and current F
|
||||
F_aimDot = &
|
||||
|
|
Loading…
Reference in New Issue