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