|
DAMASK with grid solvers
Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
|
|
Go to the documentation of this file. 1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_polarisation.f90"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_polarisation.f90"
13 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h" 1
21 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h" 1
30 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h" 1
39 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 1
48 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 1
57 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscao.h" 1
66 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 1
75 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 1
88 # 1 "/opt/petsc-3.10.3/Intel-18.4-IntelMPI-2018/include/petscconf.h" 1
1296 # 13 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1301 # 1 "/opt/petsc-3.10.3/include/petscversion.h" 1
1347 # 17 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1349 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscviewer.h" 1
1366 # 31 "/opt/petsc-3.10.3/include/petsc/finclude/petscviewer.h"
1368 # 18 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1370 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscerror.h" 1
1379 # 24 "/opt/petsc-3.10.3/include/petsc/finclude/petscerror.h"
1381 # 38 "/opt/petsc-3.10.3/include/petsc/finclude/petscerror.h"
1398 # 19 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1400 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petsclog.h" 1
1403 # 20 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1405 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscbag.h" 1
1418 # 21 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h" 2
1426 # 41 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1436 # 63 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1450 # 85 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1469 # 128 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1471 # 150 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1475 # 174 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1508 # 215 "/opt/petsc-3.10.3/include/petsc/finclude/petscsys.h"
1521 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 2
1523 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscviewer.h" 1
1527 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 2
1549 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscao.h" 2
1559 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 2
1573 # 30 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h"
1577 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 2
1583 # 49 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1597 # 71 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1601 # 115 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1603 # 140 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1614 # 168 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h"
1627 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h" 2
1629 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 1
1638 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 1
1643 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 2
1645 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 1
1650 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 2
1652 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 1
1657 # 11 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 2
1669 # 32 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h"
1672 # 47 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h"
1674 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h" 2
1678 # 26 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h"
1687 # 74 "/opt/petsc-3.10.3/include/petsc/finclude/petscpc.h"
1689 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h" 2
1694 # 21 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h"
1698 # 57 "/opt/petsc-3.10.3/include/petsc/finclude/petscksp.h"
1702 # 8 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h" 2
1708 # 30 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h"
1713 # 47 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h"
1737 # 78 "/opt/petsc-3.10.3/include/petsc/finclude/petscsnes.h"
1741 # 9 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_polarisation.f90" 2
1743 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 1
1752 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscis.h" 1
1757 # 9 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1759 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscvec.h" 1
1764 # 10 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1766 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscmat.h" 1
1771 # 11 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1773 # 1 "/opt/petsc-3.10.3/include/petsc/finclude/petscdm.h" 1
1778 # 12 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h" 2
1788 # 39 "/opt/petsc-3.10.3/include/petsc/finclude/petscdmda.h"
1802 # 10 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/grid/grid_mech_spectral_polarisation.f90" 2
1827 logical :: update_gamma
1840 real(
preal),
private,
dimension(:,:,:,:,:),
allocatable :: &
1841 f_lastinc, & !< field of previous compatible deformation gradients
1842 f_tau_lastinc, & !< field of previous incompatible deformation gradient
1843 fdot, & !< field of assumed rate of compatible deformation gradient
1848 real(
preal),
private,
dimension(3,3) :: &
1856 real(
preal),
private,
dimension(3,3,3,3) :: &
1866 err_bc, & !< deviation from stress BC
1870 integer,
private :: &
1887 real(
preal),
dimension(3,3,grid(1),grid(2),grid3) :: p
1888 real(
preal),
dimension(3,3) :: &
1889 temp33_real = 0.0_preal
1891 integer(kind=selected_int_kind(5)) :: ierr
1892 real(kind=selected_real_kind(10)),
pointer,
dimension(:,:,:,:) :: &
1896 integer(kind=selected_int_kind(5)),
dimension(0:worldsize-1) :: localk
1897 integer(HID_T) :: filehandle, grouphandle
1899 character(len=pStringLen) :: filename
1901 write(6,
'(/,a)')
' <<<+- grid_mech_spectral_polarisation init -+>>>';
flush(6)
1903 write(6,
'(/,a)')
' Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
1904 write(6,
'(a)')
' https://doi.org/10.1016/j.ijplas.2014.02.006'
1910 call petscoptionsinsertstring(petsc_null_options,
'-mech_snes_type ngmres',ierr)
1911 if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1912 call petscoptionsinsertstring(petsc_null_options,trim(petsc_options),ierr)
1913 if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1924 call snescreate(petsc_comm_world,
snes,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1925 call snessetoptionsprefix(
snes,
'mech_',ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1928 call mpi_allreduce(mpi_in_place,localk,
worldsize,mpi_integer,mpi_sum,petsc_comm_world,ierr)
1929 call dmdacreate3d(petsc_comm_world, &
1930 dm_boundary_none, dm_boundary_none, dm_boundary_none, &
1937 if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1938 call snessetdm(
snes,
da,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1939 call dmsetfromoptions(
da,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1940 call dmsetup(
da,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1941 call dmcreateglobalvector(
da,
solution_vec,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1942 call dmdasnessetfunctionlocal(
da,insert_values,
formresidual,petsc_null_snes,ierr)
1943 if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1944 call snessetconvergencetest(
snes,
converged,petsc_null_snes,petsc_null_function,ierr)
1945 if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1946 call snessetfromoptions(
snes,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1950 call dmdavecgetarrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1951 f => fandf_tau(0: 8,:,:,:)
1952 f_tau => fandf_tau(9:17,:,:,:)
1955 write(6,
'(/,a,i0,a)')
' reading restart data of increment ',
interface_restartinc,
' from file'
1966 call hdf5_read(grouphandle,f_tau,
'F_tau')
1981 call dmdavecrestorearrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
1984 write(6,
'(/,a,i0,a)')
' reading more restart data of increment ',
interface_restartinc,
' from file'
1992 mpi_mode_rdonly,mpi_info_null,fileunit,ierr)
1993 call mpi_file_read(fileunit,
c_minmaxavg,81,mpi_double,mpi_status_ignore,ierr)
1994 call mpi_file_close(fileunit,ierr)
2012 character(len=*),
intent(in) :: &
2014 real(
preal),
intent(in) :: &
2015 timeinc, & !< time increment of current solution
2025 integer(kind=selected_int_kind(5)) :: ierr
2026 integer(kind=selected_int_kind(5)) :: reason
2033 if (
num%update_gamma)
then
2041 params%stress_mask = stress_bc%maskFloat
2042 params%stress_BC = stress_bc%values
2043 params%rotation_BC = rotation_bc
2045 params%timeincOld = timeinc_old
2049 call snessolve(
snes,petsc_null_vec,
solution_vec,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2053 call snesgetconvergedreason(
snes,reason,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2055 solution%converged = reason > 0
2069 deformation_BC,stress_BC,rotation_BC)
2071 logical,
intent(in) :: &
2074 real(
preal),
intent(in) :: &
2083 integer(kind=selected_int_kind(5)) :: ierr
2084 real(kind=selected_real_kind(10)),
dimension(:,:,:,:),
pointer :: fandf_tau, f, f_tau
2086 real(
preal),
dimension(3,3) :: f_lambda33
2088 call dmdavecgetarrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2089 f => fandf_tau(0: 8,:,:,:)
2090 f_tau => fandf_tau(9:17,:,:,:)
2104 if (deformation_bc%myType==
'l')
then
2107 elseif(deformation_bc%myType==
'fdot')
then
2109 f_aimdot + deformation_bc%maskFloat * deformation_bc%values
2110 elseif (deformation_bc%myType==
'f')
then
2117 rotation_bc%rotate(
f_aimdot,active=.true.))
2120 rotation_bc%rotate(
f_aimdot,active=.true.))
2131 rotation_bc%rotate(
f_aim,active=.true.)),&
2138 f_lambda33 = reshape(f_tau(1:9,i,j,k)-f(1:9,i,j,k),[3,3])
2141 matmul(transpose(f_lambda33),&
2142 f_lambda33)-
math_i3))*0.5_preal) &
2144 f_tau(1:9,i,j,k) = reshape(f_lambda33,[9])+f(1:9,i,j,k)
2148 call dmdavecrestorearrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2158 integer(kind=selected_int_kind(5)) :: ierr
2159 real(kind=selected_real_kind(10)),
dimension(:,:,:,:),
pointer :: fandf_tau
2161 call dmdavecgetarrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2163 call dmdavecrestorearrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2173 integer(kind=selected_int_kind(5)) :: ierr
2174 integer(HID_T) :: filehandle, grouphandle
2175 real(kind=selected_real_kind(10)),
dimension(:,:,:,:),
pointer :: fandf_tau, f, f_tau
2176 character(len=pStringLen) :: filename
2178 call dmdavecgetarrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2179 f => fandf_tau(0: 8,:,:,:)
2180 f_tau => fandf_tau(9:17,:,:,:)
2182 write(6,
'(a)')
' writing solver data required for restart to file';
flush(6)
2204 call dmdavecrestorearrayf90(
da,
solution_vec,fandf_tau,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2212 subroutine converged(snes_local,PETScIter,devNull1,devNull2,devNull3,reason,dummy,ierr)
2214 type(tsnes) :: snes_local
2215 integer(kind=selected_int_kind(5)),
intent(in) :: PETScIter
2216 real(kind=selected_real_kind(10)),
intent(in) :: &
2220 integer(kind=selected_int_kind(5)) :: reason
2221 integer(kind=selected_int_kind(10)) :: dummy
2222 integer(kind=selected_int_kind(5)) :: ierr
2228 curltol = max(maxval(abs(
f_aim-
math_i3))*err_curl_tolrel ,err_curl_tolabs)
2229 divtol = max(maxval(abs(
p_av)) *err_div_tolrel ,err_div_tolabs)
2230 bctol = max(maxval(abs(
p_av)) *err_stress_tolrel,err_stress_tolabs)
2235 err_bc /bctol ] < 1.0_preal)) &
2246 write(6,
'(1/,a)')
' ... reporting .............................................................'
2247 write(6,
'(1/,a,f12.2,a,es8.2,a,es9.2,a)')
' error divergence = ', &
2249 write(6,
'(a,f12.2,a,es8.2,a,es9.2,a)')
' error curl = ', &
2251 write(6,
'(a,f12.2,a,es8.2,a,es9.2,a)')
' error BC = ', &
2253 write(6,
'(/,a)')
' ==========================================================================='
2263 residuum, dummy,ierr)
2265 integer(kind=selected_int_kind(5)),
dimension(25) :: in
2266 real(kind=selected_real_kind(10)),
dimension(3,3,2,in(13)+1:in(13)+in(16),in(14)+1:in(14)+in(17),in(15)+1:in(15)+in(18)), &
2267 target,
intent(in) :: fandf_tau
2268 real(kind=selected_real_kind(10)),
dimension(3,3,2,in(7)+1:in(7)+in(10),in(8)+1:in(8)+in(11),in(9)+1:in(9)+in(12)),&
2269 target,
intent(out) :: residuum
2270 real(kind=selected_real_kind(10)),
pointer,
dimension(:,:,:,:,:) :: &
2275 integer(kind=selected_int_kind(5)) :: &
2278 integer(kind=selected_int_kind(10)) :: dummy
2279 integer(kind=selected_int_kind(5)) :: ierr
2283 f => fandf_tau(1:3,1:3,1,&
2284 in(13)+1:in(13)+in(16),in(14)+1:in(14)+in(17),in(15)+1:in(15)+in(18))
2285 f_tau => fandf_tau(1:3,1:3,2,&
2286 in(13)+1:in(13)+in(16),in(14)+1:in(14)+in(17),in(15)+1:in(15)+in(18))
2287 residual_f => residuum(1:3,1:3,1,&
2288 in(7)+1:in(7)+in(10), in(8)+1:in(8)+in(11), in(9)+1:in(9)+in(12))
2289 residual_f_tau => residuum(1:3,1:3,2,&
2290 in(7)+1:in(7)+in(10), in(8)+1:in(8)+in(11), in(9)+1:in(9)+in(12))
2292 f_av = sum(sum(sum(f,dim=5),dim=4),dim=3) *
wgt
2293 call mpi_allreduce(mpi_in_place,
f_av,9,mpi_double,mpi_sum,petsc_comm_world,ierr)
2295 call snesgetnumberfunctionevals(
snes,nfuncs,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2296 call snesgetiterationnumber(
snes,petsciter,ierr);
if (ierr .ne. 0) then;
call petscerrorf(ierr);return;
endif
2298 if (nfuncs == 0 .and. petsciter == 0)
totaliter = -1
2301 newiteration:
if (
totaliter <= petsciter)
then
2303 write(6,
'(1x,a,3(a,i0))') trim(
incinfo),
' @ Iteration ',
itmin,
'≤',
totaliter,
'≤',
itmax
2305 write(6,
'(/,a,/,3(3(f12.7,1x)/))',advance=
'no') &
2306 ' deformation gradient aim (lab) =', transpose(
params%rotation_BC%rotate(
f_aim,active=.true.))
2307 write(6,
'(/,a,/,3(3(f12.7,1x)/))',advance=
'no') &
2308 ' deformation gradient aim =', transpose(
f_aim)
2318 polaralpha*matmul(f(1:3,1:3,i,j,k), &
2336 f - residual_f_tau/polarbeta,
params%timeinc,
params%rotation_BC)
2337 call mpi_allreduce(mpi_in_place,
terminallyill,1,mpi_logical,mpi_lor,petsc_comm_world,ierr)
2356 residual_f(1:3,1:3,i,j,k) = &
2358 residual_f(1:3,1:3,i,j,k) - matmul(f(1:3,1:3,i,j,k), &
2360 + residual_f_tau(1:3,1:3,i,j,k)
real(preal), dimension(3, 3, 3, 3), private c_minmaxavglastinc
previous (min+max)/2 stiffness
integer(hid_t) function hdf5_addgroup(fileHandle, groupName)
adds a new group to the fileHandle
real(preal), dimension(3, 3, 3, 3), private s
current compliance (filled up with zeros)
rotation storage and conversion
subroutine, public grid_mech_spectral_polarisation_updatecoords
Age.
real(preal), dimension(3, 3), private f_aimdot
assumed rate of average deformation gradient
real(preal), dimension(:,:,:,:,:,:), allocatable, public materialpoint_dpdf
tangent of first P–K stress at IP
character(len=pstringlen), private incinfo
time and increment information
subroutine hdf5_closegroup(group_id)
close a group
real(preal), dimension(3, 3, 3, 3), private s_scale
real(preal), dimension(:,:,:,:), allocatable, public materialpoint_f0
def grad of IP at start of FE increment
integer, dimension(debug_maxntype+2), public, protected debug_level
type(tsolutionstate) function, public grid_mech_spectral_polarisation_solution(incInfoIn, timeinc, timeinc_old, stress_BC, rotation_BC)
solution for the Polarisation scheme with internal iterations
real(preal), dimension(3, 3, 3, 3), private c_volavg
current volume average stiffness
real(preal), dimension(:,:,:,:,:), allocatable, private f_lastinc
field of previous compatible deformation gradients
real(preal), dimension(3, 3, 3, 3), private c_minmaxavg
current (min+max)/2 stiffness
integer(hid_t) function hdf5_openfile(fileName, mode, parallel)
open and initializes HDF5 output file
real(preal), dimension(3, 3), private f_aim_lastinc
previous average deformation gradient
Utilities used by the different spectral solver variants.
real(preal), dimension(3, 3, 3, 3), private c_volavglastinc
previous volume average stiffness
Grid solver for mechanics: 1 Polarisation.
integer, public, protected worldsize
MPI worldsize (/=1 for MPI simulations only)
real(preal), dimension(:,:,:,:,:), allocatable, private fdot
field of assumed rate of compatible deformation gradient
real(preal) function, public utilities_divergencerms()
calculate root mean square of divergence of field_fourier
Reads in the material configuration from file.
integer, public, protected grid3
(local) grid in 3rd direction
real(preal) function, public utilities_curlrms()
calculate max of curl of field_fourier
Parse geometry file to set up discretization and geometry for nonlocal model.
setting precision for real and int type
pure real(preal) function, dimension(3, 3) math_mul3333xx33(A, B)
matrix double contraction 3333x33 = 33 (ijkl,kl)
type(tsnes), private snes
type(tsolutionparams), private params
subroutine, public utilities_savereferencestiffness
Write out the current reference stiffness for restart.
subroutine, public utilities_ffttensorforward
forward FFT of data in field_real to field_fourier
subroutine, public grid_mech_spectral_polarisation_forward(cutBack, guess, timeinc, timeinc_old, loadCaseTime, deformation_BC, stress_BC, rotation_BC)
forwarding routine
real(preal), dimension(:,:,:,:,:), allocatable, private f_taudot
field of assumed rate of incopatible deformation gradient
reads integer or float data of defined shape from file ! ToDo: order of arguments wrong
homogenization manager, organizing deformation partitioning and stress homogenization
integer, parameter preal
number with 15 significant digits, up to 1e+-307 (typically 64 bit)
real(preal), dimension(3, 3, 3, 3), private c_scale
real(preal) function, dimension(3, 3, 3, 3) math_invsym3333(A)
Inversion of symmetriced 3x3x3x3 matrix.
Reading in and interpretating the debugging settings for the various modules.
type(tvec), private solution_vec
real(preal), dimension(:,:,:,:,:), allocatable, private f_tau_lastinc
field of previous incompatible deformation gradient
real(preal), private err_div
RMS of div of P.
subroutine, public utilities_fouriergammaconvolution(fieldAim)
doing convolution gamma_hat * field_real, ensuring that average value = fieldAim
subroutine formresidual(in, FandF_tau, residuum, dummy, ierr)
forms the residual vector
subroutine, public utilities_updatecoords(F)
calculate coordinates in current configuration for given defgrad field
subroutine, public grid_mech_spectral_polarisation_restartwrite
Write current solver and constitutive data for restart to file.
real(preal) function, dimension(3, 3, grid(1), grid(2), grid3), public utilities_forwardfield(timeinc, field_lastInc, rate, aim)
forwards a field with a pointwise given rate, if aim is given, ensures that the average matches the a...
subroutine converged(snes_local, PETScIter, devNull1, devNull2, devNull3, reason, dummy, ierr)
convergence check
real(preal), private err_curl
RMS of curl of F.
integer, public, protected itmax
maximum number of iterations
subroutine, public utilities_constitutiveresponse(P, P_av, C_volAvg, C_minmaxAvg, F, timeinc, rotation_BC)
calculate constitutive response from materialpoint_F0 to F during timeinc
integer, private totaliter
total iteration in current increment
integer, public, protected interface_restartinc
Increment at which calculation starts.
Interfacing between the 1-based solvers and the material subroutines provided by DAMASK.
real(preal), dimension(3, 3), private p_av
average 1st Piola–Kirchhoff stress
type(tpartitionedstringlist), public, protected config_numerics
real(c_double), dimension(:,:,:,:,:), pointer, public tensorfield_real
real representation (some stress or deformation) of field_fourier
integer, parameter, public debug_spectral
subroutine hdf5_closefile(fileHandle)
close the opened HDF5 output file
integer, public, protected worldrank
MPI worldrank (/=0 for MPI simulations only)
Mathematical library, including random number generation and tensor representations.
real(preal), dimension(3, 3), private f_aim
current prescribed deformation gradient
logical terminallyill
at least one material point is terminally ill
real(preal), public, protected wgt
weighting factor 1/Nelems
integer, dimension(3), public, protected grid
(global) grid
integer, public, protected itmin
minimum number of iterations
real(preal), private err_bc
deviation from stress BC
integer, parameter, public debug_spectralrotation
character(len=:) function, allocatable, public getsolverjobname()
solver job name (no extension) as combination of geometry and load case name
real(preal) function, dimension(3, 3, 3, 3), public utilities_maskedcompliance(rot_BC, mask_stress, C)
calculates mask compliance tensor used to adjust F to fullfill stress BC
subroutine, public utilities_updategamma(C)
updates reference stiffness and potentially precalculated gamma operator
set of parameters defining a boundary condition
Managing of parameters related to numerics.
integer(hid_t) function hdf5_opengroup(fileHandle, groupName)
open an existing group of a file
return type of solution from spectral solver variants
global variables for flow control
subroutine, public utilities_ffttensorbackward
backward FFT of data in field_fourier to field_real
real(preal), dimension(3, 3), private f_av
average incompatible def grad field
pure real(preal) function, dimension(3, 3, grid(1), grid(2), grid3), public utilities_calculaterate(heterogeneous, field0, field, dt, avRate)
calculates forward rate, either guessing or just add delta/timeinc
subroutine, public grid_mech_spectral_polarisation_init
allocates all necessary fields and fills them with data, potentially from restart info
writes integer or real data of defined shape to file ! ToDo: order of arguments wrong
real(preal), dimension(3, 3), parameter math_i3
3x3 Identity