fixed type-casting problems (mainly with Lib_VTK_IO)

This commit is contained in:
Philip Eisenlohr 2013-09-26 17:21:46 +00:00
parent c0442829d9
commit a2169e338f
4 changed files with 22 additions and 15 deletions

View File

@ -275,7 +275,7 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,nshear,disp, &
real(pReal), dimension(6) :: stress
real(pReal), dimension(6,6) :: ddsdde
integer(pInt) :: computationMode, i, cp_en, node, CPnodeID
!$ integer(pInt) :: defaultNumThreadsInt !< default value set by Marc
!$ integer :: defaultNumThreadsInt !< default value set by Marc
if (iand(debug_level(debug_MARC),debug_LEVELBASIC) /= 0_pInt) then
write(6,'(a,/,i8,i8,i2)') ' MSC.MARC information on shape of element(2), IP:', m, nn

View File

@ -5090,6 +5090,8 @@ subroutine mesh_write_cellGeom
use DAMASK_interface, only: &
getSolverJobName, &
getSolverWorkingDirectoryName
use IR_Precision, only: &
I4P
use Lib_VTK_IO, only: &
VTK_ini, &
VTK_geo, &
@ -5097,9 +5099,10 @@ subroutine mesh_write_cellGeom
VTK_end
implicit none
integer(pInt), dimension(1:mesh_Ncells) :: celltype
integer(pInt), dimension(mesh_Ncells*(1_pInt+FE_maxNcellnodesPerCell)) :: cellconnection
integer(pInt):: err, g, c, e, CellID, i, j
integer(I4P), dimension(1:mesh_Ncells) :: celltype
integer(I4P), dimension(mesh_Ncells*(1_pInt+FE_maxNcellnodesPerCell)) :: cellconnection
integer(I4P):: err
integer(I4P):: g, c, e, CellID, i, j
cellID = 0_pInt
j = 0_pInt
@ -5119,11 +5122,11 @@ subroutine mesh_write_cellGeom
title=trim(getSolverJobName())//' cell mesh', &
filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'_ipbased.vtk', &
mesh_topology = 'UNSTRUCTURED_GRID')
err = VTK_geo(NN = mesh_Ncellnodes, &
err = VTK_geo(NN = int(mesh_Ncellnodes,I4P), &
X = mesh_cellnode(1,1:mesh_Ncellnodes), &
Y = mesh_cellnode(2,1:mesh_Ncellnodes), &
Z = mesh_cellnode(3,1:mesh_Ncellnodes))
err = VTK_con(NC = mesh_Ncells, &
err = VTK_con(NC = int(mesh_Ncells,I4P), &
connect = cellconnection(1:j), &
cell_type = celltype)
err = VTK_end()
@ -5138,6 +5141,8 @@ subroutine mesh_write_elemGeom
use DAMASK_interface, only: &
getSolverJobName, &
getSolverWorkingDirectoryName
use IR_Precision, only: &
I4P
use Lib_VTK_IO, only: &
VTK_ini, &
VTK_geo, &
@ -5145,9 +5150,10 @@ subroutine mesh_write_elemGeom
VTK_end
implicit none
integer(pInt), dimension(1:mesh_NcpElems) :: elemtype
integer(pInt), dimension(mesh_NcpElems*(1_pInt+FE_maxNnodes)) :: elementconnection
integer(pInt):: err, e, t, n, i
integer(I4P), dimension(1:mesh_NcpElems) :: elemtype
integer(I4P), dimension(mesh_NcpElems*(1_pInt+FE_maxNnodes)) :: elementconnection
integer(I4P):: err
integer(pInt):: e, t, n, i
i = 0_pInt
do e = 1_pInt, mesh_NcpElems ! loop over cpElems
@ -5164,11 +5170,11 @@ subroutine mesh_write_elemGeom
title=trim(getSolverJobName())//' element mesh', &
filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'_nodebased.vtk', &
mesh_topology = 'UNSTRUCTURED_GRID')
err =VTK_geo(NN = mesh_Nnodes, &
err =VTK_geo(NN = int(mesh_Nnodes,I4P), &
X = mesh_node0(1,1:mesh_Nnodes), &
Y = mesh_node0(2,1:mesh_Nnodes), &
Z = mesh_node0(3,1:mesh_Nnodes))
err =VTK_con(NC = mesh_Nelems, &
err =VTK_con(NC = int(mesh_Nelems,I4P), &
connect = elementconnection(1:i), &
cell_type = elemtype)
err =VTK_end()

View File

@ -42,8 +42,9 @@ module numerics
nState = 10_pInt, & !< state loop limit
nStress = 40_pInt, & !< stress loop limit
pert_method = 1_pInt, & !< method used in perturbation technique for tangent
fixedSeed = 0_pInt, & !< fixed seeding for pseudo-random number generator, Default 0: use random seed
DAMASK_NumThreadsInt = 0_pInt !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
fixedSeed = 0_pInt !< fixed seeding for pseudo-random number generator, Default 0: use random seed
integer, protected, public :: &
DAMASK_NumThreadsInt = 0 !< value stored in environment variable DAMASK_NUM_THREADS, set to zero if no OpenMP directive
integer(pInt), public :: &
numerics_integrationMode = 0_pInt !< integrationMode 1 = central solution ; integrationMode 2 = perturbation, Default 0: undefined, is not read from file
integer(pInt), dimension(2) , protected, public :: &
@ -165,7 +166,7 @@ subroutine numerics_init
!$ if(gotDAMASK_NUM_THREADS /= 0) &
!$ call IO_warning(35_pInt,ext_msg='BEGIN:'//DAMASK_NumThreadsString//':END')
!$ read(DAMASK_NumThreadsString,'(i6)') DAMASK_NumThreadsInt ! ...convert it to integer...
!$ if (DAMASK_NumThreadsInt < 1_pInt) DAMASK_NumThreadsInt = 1_pInt ! ...ensure that its at least one...
!$ if (DAMASK_NumThreadsInt < 1) DAMASK_NumThreadsInt = 1 ! ...ensure that its at least one...
!$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! ...and use it as number of threads for parallel execution
!--------------------------------------------------------------------------------------------------

View File

@ -425,7 +425,7 @@ contains
integer function Get_Unit(Free_Unit)
!---------------------------------------------------------------------------------------------------------------------------------
implicit none
integer, intent(OUT), optional:: Free_Unit !< Free logic unit.
integer(I4P), intent(OUT), optional:: Free_Unit !< Free logic unit.
integer:: n1 !< Counter.
integer:: ios !< Inquiring flag.
logical:: lopen !< Inquiring flag.