integrated subroutine for regridding into mesh.f90 and made it available for python

This commit is contained in:
Krishna Komerla 2012-04-10 15:15:46 +00:00
parent d638c563af
commit f20cecd421
4 changed files with 49 additions and 10 deletions

View File

@ -60,8 +60,8 @@ subroutine DAMASK_interface_init(loadcaseParameterIn,geometryParameterIn)
character(len=1024), intent(in) :: geometryParameterIn
integer, dimension(8) :: dateAndTime ! type default integer
geometryParameter = loadcaseParameterIn
loadcaseParameter = geometryParameterIn
geometryParameter = geometryParameterIn
loadcaseParameter = loadcaseParameterIn
call date_and_time(values = dateAndTime)

View File

@ -14,11 +14,8 @@
python module core ! in
interface ! in :core
module damask_interface ! in :damask_interface:DAMASK_python_interface.f90
function getSolverWorkingDirectoryName()
character(len=1024) :: getSolverWorkingDirectoryName()
end function getSolverWorkingDirectoryName
module damask_interface ! in :damask_interface:DAMASK_python_interface.f90
subroutine damask_interface_init(loadcaseParameterIn,geometryParameterIn) ! in :damask_interface:DAMASK_python_interface.f90
character(len=1024), intent(in) :: loadcaseParameterIn
@ -27,6 +24,7 @@ python module core ! in
end module damask_interface
module math ! in :math:math.f90
subroutine volume_compare(res,geomdim,defgrad,nodes,volume_mismatch) ! in :math:math.f90
@ -174,6 +172,19 @@ python module core ! in
integer, dimension(res_new[0]*res_new[1]*res_new[2]), intent(out),depend(res_new[0],res_new[1],res_new[2]) :: result_indices
end subroutine math_nearestNeighborSearch
end module math
module mesh ! in :mesh:mesh.f90
subroutine mesh_regrid(res,resNew) ! in :mesh:mesh.f90
integer, dimension(3), intent(in) :: res
integer, dimension(3), intent(in,out) :: resNew
real*8, dimension(res[0],res[1],res[2],3,3), depend(res[0],res[1],res[2]) :: F
end subroutine mesh_regrid
end module mesh
end interface
end python module core

View File

@ -260,7 +260,8 @@
mesh_FEasCP, &
mesh_build_subNodeCoords, &
mesh_build_ipVolumes, &
mesh_build_ipCoordinates
mesh_build_ipCoordinates, &
mesh_regrid
private :: FE_mapElemtype, &
mesh_faceMatch, &
mesh_build_FEdata, &
@ -3627,4 +3628,29 @@ deallocate(mesh_HomogMicro)
end subroutine mesh_tell_statistics
subroutine mesh_regrid(res,resNew) !use new_res=0.0 for automatic determination of new grid
use prec, only pInt, pReal
use DAMASK_interface, only : getSolverJobName
use IO, only : IO_read_jobBinaryFile
integer(pInt), dimension(3), intent(in) :: res
integer(pInt), dimension(3), intent(inout) :: resNew
real(pReal), dimension(res(1),res(2),res(3),3,3) :: F
real(pReal), dimension(:,:,:,:,:), allocatable :: crystallite_F0, &
CPFEM_dcsdE, &
crystallite_Fp0, &
crystallite_Lp0
real(pReal), dimension (:,:,:,:,:,:,:), allocatable :: crystallite_dPdF0
real(pReal), dimension (:,:,:,:), allocatable :: crystallite_Tstar0_v, &
convergedStateConst
integer(pInt), dimension (:,:), allocatable :: convergedSizeConst
call IO_read_jobBinaryFile(777,'convergedSpectralDefgrad',trim(getSolverJobName()),size(F))
read (777,rec=1) F
close (777)
end subroutine mesh_regrid
end module mesh

View File

@ -139,6 +139,8 @@ execute = { \
' %s'%(os.path.join(codeDir,'numerics.f90'))+\
' %s'%(os.path.join(codeDir,'debug.f90'))+\
' %s'%(os.path.join(codeDir,'math.f90'))+\
' %s'%(os.path.join(codeDir,'FEsolving.f90'))+\
' %s'%(os.path.join(codeDir,'mesh.f90'))+\
' %s'%(os.path.join(codeDir,'DAMASK_quit.f90'))+\
' -L%s/lib -lfftw3'%(damaskEnv.pathInfo['fftw'])+\
' %s'%lib_lapack,