avoid public variable without write protection
This commit is contained in:
parent
13c62b890b
commit
e311c913b8
|
@ -1027,7 +1027,8 @@ end function utilities_getFreqDerivative
|
||||||
subroutine utilities_updateIPcoords(F)
|
subroutine utilities_updateIPcoords(F)
|
||||||
|
|
||||||
real(pReal), dimension(3,3,grid(1),grid(2),grid3), intent(in) :: F
|
real(pReal), dimension(3,3,grid(1),grid(2),grid3), intent(in) :: F
|
||||||
integer :: i, j, k, m, ierr
|
real(pReal), dimension(3, grid(1),grid(2),grid3) :: IPcoords
|
||||||
|
integer :: i, j, k, ierr
|
||||||
real(pReal), dimension(3) :: step, offset_coords
|
real(pReal), dimension(3) :: step, offset_coords
|
||||||
real(pReal), dimension(3,3) :: Favg
|
real(pReal), dimension(3,3) :: Favg
|
||||||
|
|
||||||
|
@ -1040,8 +1041,8 @@ subroutine utilities_updateIPcoords(F)
|
||||||
|
|
||||||
do k = 1, grid3; do j = 1, grid(2); do i = 1, grid1Red
|
do k = 1, grid3; do j = 1, grid(2); do i = 1, grid1Red
|
||||||
if (any(cNeq(xi1st(1:3,i,j,k),cmplx(0.0,0.0,pReal)))) &
|
if (any(cNeq(xi1st(1:3,i,j,k),cmplx(0.0,0.0,pReal)))) &
|
||||||
vectorField_fourier(1:3,i,j,k) = vectorField_fourier(1:3,i,j,k)/ &
|
vectorField_fourier(1:3,i,j,k) = vectorField_fourier(1:3,i,j,k) &
|
||||||
sum(conjg(-xi1st(1:3,i,j,k))*xi1st(1:3,i,j,k))
|
/ sum(conjg(-xi1st(1:3,i,j,k))*xi1st(1:3,i,j,k))
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
call fftw_mpi_execute_dft_c2r(planVectorBack,vectorField_fourier,vectorField_real)
|
call fftw_mpi_execute_dft_c2r(planVectorBack,vectorField_fourier,vectorField_real)
|
||||||
vectorField_real = vectorField_real * wgt
|
vectorField_real = vectorField_real * wgt
|
||||||
|
@ -1059,15 +1060,14 @@ subroutine utilities_updateIPcoords(F)
|
||||||
call MPI_Bcast(offset_coords,3,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
call MPI_Bcast(offset_coords,3,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
|
||||||
if(ierr /=0) call IO_error(894, ext_msg='update_IPcoords')
|
if(ierr /=0) call IO_error(894, ext_msg='update_IPcoords')
|
||||||
offset_coords = matmul(Favg,step/2.0_pReal) - offset_coords
|
offset_coords = matmul(Favg,step/2.0_pReal) - offset_coords
|
||||||
m = 1
|
|
||||||
do k = 1,grid3; do j = 1,grid(2); do i = 1,grid(1)
|
do k = 1,grid3; do j = 1,grid(2); do i = 1,grid(1)
|
||||||
mesh_ipCoordinates(1:3,1,m) = vectorField_real(1:3,i,j,k) &
|
IPcoords(1:3,i,j,k) = vectorField_real(1:3,i,j,k) &
|
||||||
+ offset_coords &
|
+ offset_coords &
|
||||||
+ matmul(Favg,step*real([i,j,k+grid3Offset]-1,pReal))
|
+ matmul(Favg,step*real([i,j,k+grid3Offset]-1,pReal))
|
||||||
m = m+1
|
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
|
|
||||||
call discretization_setIPcoords(reshape(mesh_ipCoordinates,[3,grid(1)*grid(2)*grid3]))
|
call discretization_setIPcoords(reshape(IPcoords,[3,grid(1)*grid(2)*grid3]))
|
||||||
|
|
||||||
end subroutine utilities_updateIPcoords
|
end subroutine utilities_updateIPcoords
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,6 @@ module mesh_grid
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
real(pReal), dimension(:,:,:), allocatable, public :: &
|
|
||||||
mesh_ipCoordinates !< IP x,y,z coordinates (after deformation!)
|
|
||||||
|
|
||||||
integer, dimension(3), public, protected :: &
|
integer, dimension(3), public, protected :: &
|
||||||
grid !< (global) grid
|
grid !< (global) grid
|
||||||
integer, public, protected :: &
|
integer, public, protected :: &
|
||||||
|
@ -92,9 +89,8 @@ subroutine mesh_init(ip,el)
|
||||||
homogenizationAt = homogenizationAt(product(grid(1:2))*grid3Offset+1: &
|
homogenizationAt = homogenizationAt(product(grid(1:2))*grid3Offset+1: &
|
||||||
product(grid(1:2))*(grid3Offset+grid3)) ! reallocate/shrink in case of MPI
|
product(grid(1:2))*(grid3Offset+grid3)) ! reallocate/shrink in case of MPI
|
||||||
|
|
||||||
mesh_ipCoordinates = IPcoordinates(myGrid,mySize,grid3Offset)
|
|
||||||
call discretization_init(homogenizationAt,microstructureAt, &
|
call discretization_init(homogenizationAt,microstructureAt, &
|
||||||
reshape(mesh_ipCoordinates,[3,product(myGrid)]), &
|
reshape(IPcoordinates(myGrid,mySize,grid3Offset),[3,product(myGrid)]), &
|
||||||
Nodes(myGrid,mySize,grid3Offset))
|
Nodes(myGrid,mySize,grid3Offset))
|
||||||
|
|
||||||
FEsolving_execElem = [1,product(myGrid)] ! parallel loop bounds set to comprise all elements
|
FEsolving_execElem = [1,product(myGrid)] ! parallel loop bounds set to comprise all elements
|
||||||
|
|
Loading…
Reference in New Issue