consistent naming
This commit is contained in:
parent
27a8b63a3d
commit
db263c3af7
|
@ -525,7 +525,7 @@ subroutine formResidual(da_local,x_local, &
|
||||||
|
|
||||||
real(pREAL), pointer,dimension(:,:,:,:) :: x_scal, r
|
real(pREAL), pointer,dimension(:,:,:,:) :: x_scal, r
|
||||||
real(pREAL), dimension(8,3) :: x_elem, f_elem
|
real(pREAL), dimension(8,3) :: x_elem, f_elem
|
||||||
PetscInt :: i, ii, j, jj, k, kk, ctr, ele
|
PetscInt :: i, ii, j, jj, k, kk, ctr, ce
|
||||||
PetscInt :: &
|
PetscInt :: &
|
||||||
PETScIter, &
|
PETScIter, &
|
||||||
nfuncs
|
nfuncs
|
||||||
|
@ -587,7 +587,7 @@ subroutine formResidual(da_local,x_local, &
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
call DMDAVecGetArrayReadF90(da_local,x_local,x_scal,err_PETSc)
|
call DMDAVecGetArrayReadF90(da_local,x_local,x_scal,err_PETSc)
|
||||||
CHKERRQ(err_PETSc)
|
CHKERRQ(err_PETSc)
|
||||||
ele = 0
|
ce = 0
|
||||||
r = 0.0_pREAL
|
r = 0.0_pREAL
|
||||||
do k = cells3Offset+1, cells3Offset+cells3; do j = 1, cells(2); do i = 1, cells(1)
|
do k = cells3Offset+1, cells3Offset+cells3; do j = 1, cells(2); do i = 1, cells(1)
|
||||||
ctr = 0
|
ctr = 0
|
||||||
|
@ -595,11 +595,11 @@ subroutine formResidual(da_local,x_local, &
|
||||||
ctr = ctr + 1
|
ctr = ctr + 1
|
||||||
x_elem(ctr,1:3) = x_scal(0:2,i+ii,j+jj,k+kk)
|
x_elem(ctr,1:3) = x_scal(0:2,i+ii,j+jj,k+kk)
|
||||||
end do; end do; end do
|
end do; end do; end do
|
||||||
ele = ele + 1
|
ce = ce + 1
|
||||||
f_elem = matmul(transpose(BMat),transpose(P_current(1:3,1:3,i,j,k-cells3Offset)))*detJ + &
|
f_elem = matmul(transpose(BMat),transpose(P_current(1:3,1:3,i,j,k-cells3Offset)))*detJ + &
|
||||||
matmul(HGMat,x_elem)*(homogenization_dPdF(1,1,1,1,ele) + &
|
matmul(HGMat,x_elem)*(homogenization_dPdF(1,1,1,1,ce) + &
|
||||||
homogenization_dPdF(2,2,2,2,ele) + &
|
homogenization_dPdF(2,2,2,2,ce) + &
|
||||||
homogenization_dPdF(3,3,3,3,ele))/3.0_pREAL
|
homogenization_dPdF(3,3,3,3,ce))/3.0_pREAL
|
||||||
ctr = 0
|
ctr = 0
|
||||||
do kk = -1, 0; do jj = -1, 0; do ii = -1, 0
|
do kk = -1, 0; do jj = -1, 0; do ii = -1, 0
|
||||||
ctr = ctr + 1
|
ctr = ctr + 1
|
||||||
|
|
|
@ -563,7 +563,7 @@ subroutine formResidual(residual_subdomain, FandF_tau, &
|
||||||
nfuncs
|
nfuncs
|
||||||
integer(MPI_INTEGER_KIND) :: err_MPI
|
integer(MPI_INTEGER_KIND) :: err_MPI
|
||||||
integer :: &
|
integer :: &
|
||||||
i, j, k, e
|
i, j, k, ce
|
||||||
|
|
||||||
|
|
||||||
F => FandF_tau(1:3,1:3,1,1:cells(1),1:cells(2),1:cells3)
|
F => FandF_tau(1:3,1:3,1,1:cells(1),1:cells(2),1:cells3)
|
||||||
|
@ -618,11 +618,11 @@ subroutine formResidual(residual_subdomain, FandF_tau, &
|
||||||
#else
|
#else
|
||||||
err_div = utilities_divergenceRMS(P)
|
err_div = utilities_divergenceRMS(P)
|
||||||
#endif
|
#endif
|
||||||
e = 0
|
ce = 0
|
||||||
do k = 1, cells3; do j = 1, cells(2); do i = 1, cells(1)
|
do k = 1, cells3; do j = 1, cells(2); do i = 1, cells(1)
|
||||||
e = e + 1
|
ce = ce + 1
|
||||||
r_F(1:3,1:3,i,j,k) = &
|
r_F(1:3,1:3,i,j,k) = &
|
||||||
math_mul3333xx33(math_invSym3333(homogenization_dPdF(1:3,1:3,1:3,1:3,e) + C_scale), &
|
math_mul3333xx33(math_invSym3333(homogenization_dPdF(1:3,1:3,1:3,1:3,ce) + C_scale), &
|
||||||
#ifdef __GFORTRAN__
|
#ifdef __GFORTRAN__
|
||||||
r_F(1:3,1:3,i,j,k) - matmul(F(1:3,1:3,i,j,k), &
|
r_F(1:3,1:3,i,j,k) - matmul(F(1:3,1:3,i,j,k), &
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -124,7 +124,7 @@ subroutine utilities_constitutiveResponse(status, P,P_av,C_volAvg,C_minmaxAvg,&
|
||||||
real(pREAL), intent(in) :: Delta_t !< loading time
|
real(pREAL), intent(in) :: Delta_t !< loading time
|
||||||
type(tRotation), intent(in), optional :: rotation_BC !< rotation of load frame
|
type(tRotation), intent(in), optional :: rotation_BC !< rotation of load frame
|
||||||
|
|
||||||
integer :: i
|
integer :: ce
|
||||||
integer(MPI_INTEGER_KIND) :: err_MPI
|
integer(MPI_INTEGER_KIND) :: err_MPI
|
||||||
real(pREAL), dimension(3,3,3,3) :: dPdF_max, dPdF_min
|
real(pREAL), dimension(3,3,3,3) :: dPdF_max, dPdF_min
|
||||||
real(pREAL) :: dPdF_norm_max, dPdF_norm_min
|
real(pREAL) :: dPdF_norm_max, dPdF_norm_min
|
||||||
|
@ -156,14 +156,14 @@ subroutine utilities_constitutiveResponse(status, P,P_av,C_volAvg,C_minmaxAvg,&
|
||||||
dPdF_norm_max = 0.0_pREAL
|
dPdF_norm_max = 0.0_pREAL
|
||||||
dPdF_min = huge(1.0_pREAL)
|
dPdF_min = huge(1.0_pREAL)
|
||||||
dPdF_norm_min = huge(1.0_pREAL)
|
dPdF_norm_min = huge(1.0_pREAL)
|
||||||
do i = 1, product(cells(1:2))*cells3
|
do ce = 1, product(cells(1:2))*cells3
|
||||||
if (dPdF_norm_max < sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2)) then
|
if (dPdF_norm_max < sum(homogenization_dPdF(1:3,1:3,1:3,1:3,ce)**2)) then
|
||||||
dPdF_max = homogenization_dPdF(1:3,1:3,1:3,1:3,i)
|
dPdF_max = homogenization_dPdF(1:3,1:3,1:3,1:3,ce)
|
||||||
dPdF_norm_max = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2)
|
dPdF_norm_max = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,ce)**2)
|
||||||
end if
|
end if
|
||||||
if (dPdF_norm_min > sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2)) then
|
if (dPdF_norm_min > sum(homogenization_dPdF(1:3,1:3,1:3,1:3,ce)**2)) then
|
||||||
dPdF_min = homogenization_dPdF(1:3,1:3,1:3,1:3,i)
|
dPdF_min = homogenization_dPdF(1:3,1:3,1:3,1:3,ce)
|
||||||
dPdF_norm_min = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2)
|
dPdF_norm_min = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,ce)**2)
|
||||||
end if
|
end if
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
|
|
@ -531,7 +531,7 @@ subroutine FEM_mechanical_formJacobian(dm_local,xx_local,Jac_pre,Jac,dummy,err_P
|
||||||
real(pREAL),dimension(cellDOF,cellDOF) :: K_eA, K_eB
|
real(pREAL),dimension(cellDOF,cellDOF) :: K_eA, K_eB
|
||||||
|
|
||||||
PetscInt :: cellStart, cellEnd, cell, component, face, &
|
PetscInt :: cellStart, cellEnd, cell, component, face, &
|
||||||
qPt, basis, comp, cidx,bcSize, m, i
|
qPt, basis, comp, cidx,bcSize, ce, i
|
||||||
IS :: bcPoints
|
IS :: bcPoints
|
||||||
|
|
||||||
|
|
||||||
|
@ -583,7 +583,7 @@ subroutine FEM_mechanical_formJacobian(dm_local,xx_local,Jac_pre,Jac,dummy,err_P
|
||||||
FAvg = 0.0_pREAL
|
FAvg = 0.0_pREAL
|
||||||
BMatAvg = 0.0_pREAL
|
BMatAvg = 0.0_pREAL
|
||||||
do qPt = 0_pPETSCINT, nQuadrature-1_pPETSCINT
|
do qPt = 0_pPETSCINT, nQuadrature-1_pPETSCINT
|
||||||
m = cell*nQuadrature + qPt + 1_pPETSCINT
|
ce = cell*nQuadrature + qPt + 1_pPETSCINT
|
||||||
BMat = 0.0_pREAL
|
BMat = 0.0_pREAL
|
||||||
do basis = 0_pPETSCINT, nBasis-1_pPETSCINT
|
do basis = 0_pPETSCINT, nBasis-1_pPETSCINT
|
||||||
do comp = 0_pPETSCINT, dimPlex-1_pPETSCINT
|
do comp = 0_pPETSCINT, dimPlex-1_pPETSCINT
|
||||||
|
@ -593,7 +593,7 @@ subroutine FEM_mechanical_formJacobian(dm_local,xx_local,Jac_pre,Jac,dummy,err_P
|
||||||
matmul(reshape(pInvcellJ,[dimPlex,dimPlex]),basisFieldDer(i*dimPlex+1_pPETSCINT:(i+1_pPETSCINT)*dimPlex))
|
matmul(reshape(pInvcellJ,[dimPlex,dimPlex]),basisFieldDer(i*dimPlex+1_pPETSCINT:(i+1_pPETSCINT)*dimPlex))
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
MatA = matmul(reshape(reshape(homogenization_dPdF(1:dimPlex,1:dimPlex,1:dimPlex,1:dimPlex,m), &
|
MatA = matmul(reshape(reshape(homogenization_dPdF(1:dimPlex,1:dimPlex,1:dimPlex,1:dimPlex,ce), &
|
||||||
shape=[dimPlex,dimPlex,dimPlex,dimPlex], order=[2,1,4,3]), &
|
shape=[dimPlex,dimPlex,dimPlex,dimPlex], order=[2,1,4,3]), &
|
||||||
shape=[dimPlex*dimPlex,dimPlex*dimPlex]),BMat)*qWeights(qPt+1_pPETSCINT)
|
shape=[dimPlex*dimPlex,dimPlex*dimPlex]),BMat)*qWeights(qPt+1_pPETSCINT)
|
||||||
if (num%BBarStabilization) then
|
if (num%BBarStabilization) then
|
||||||
|
@ -601,11 +601,11 @@ subroutine FEM_mechanical_formJacobian(dm_local,xx_local,Jac_pre,Jac,dummy,err_P
|
||||||
FInv = math_inv33(F)
|
FInv = math_inv33(F)
|
||||||
K_eA = K_eA + matmul(transpose(BMat),MatA)*math_det33(FInv)**(1.0_pREAL/real(dimPlex,pREAL))
|
K_eA = K_eA + matmul(transpose(BMat),MatA)*math_det33(FInv)**(1.0_pREAL/real(dimPlex,pREAL))
|
||||||
K_eB = K_eB - &
|
K_eB = K_eB - &
|
||||||
matmul(transpose(matmul(reshape(homogenization_F(1:dimPlex,1:dimPlex,m),shape=[dimPlex**2,1_pPETSCINT]), &
|
matmul(transpose(matmul(reshape(homogenization_F(1:dimPlex,1:dimPlex,ce),shape=[dimPlex**2,1_pPETSCINT]), &
|
||||||
matmul(reshape(FInv(1:dimPlex,1:dimPlex), &
|
matmul(reshape(FInv(1:dimPlex,1:dimPlex), &
|
||||||
shape=[1_pPETSCINT,dimPlex**2],order=[2,1]),BMat))),MatA)
|
shape=[1_pPETSCINT,dimPlex**2],order=[2,1]),BMat))),MatA)
|
||||||
MatB = MatB &
|
MatB = MatB &
|
||||||
+ matmul(reshape(homogenization_F(1:dimPlex,1:dimPlex,m),shape=[1_pPETSCINT,dimPlex**2]),MatA)
|
+ matmul(reshape(homogenization_F(1:dimPlex,1:dimPlex,ce),shape=[1_pPETSCINT,dimPlex**2]),MatA)
|
||||||
FAvg = FAvg + F
|
FAvg = FAvg + F
|
||||||
BMatAvg = BMatAvg + BMat
|
BMatAvg = BMatAvg + BMat
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue