diff --git a/src/CPFEM.f90 b/src/CPFEM.f90 index 6caeaf57c..dc6ba07dc 100644 --- a/src/CPFEM.f90 +++ b/src/CPFEM.f90 @@ -98,7 +98,7 @@ subroutine CPFEM_initAll(el,ip) call config_init call math_init call FE_init - call mesh_init(ip, el) ! pass on coordinates to alter calcMode of first ip + call mesh_init(ip, el) call lattice_init call material_init call constitutive_init diff --git a/src/mesh.f90 b/src/mesh.f90 index d8a9eefdc..953d29eef 100644 --- a/src/mesh.f90 +++ b/src/mesh.f90 @@ -481,9 +481,9 @@ subroutine mesh_init(ip,el) FEsolving_execElem, & #ifndef Spectral modelName, & + calcMode #endif FEsolving_execIP, & - calcMode implicit none #ifdef Spectral @@ -629,12 +629,10 @@ subroutine mesh_init(ip,el) allocate(FEsolving_execIP(2_pInt,mesh_NcpElems), source=1_pInt) ! parallel loop bounds set to comprise from first IP... forall (j = 1_pInt:mesh_NcpElems) FEsolving_execIP(2,j) = FE_Nips(FE_geomtype(mesh_element(2,j))) ! ...up to own IP count for each element +#if defined(Marc4DAMASK) || defined(Abaqus) allocate(calcMode(mesh_maxNips,mesh_NcpElems)) calcMode = .false. ! pretend to have collected what first call is asking (F = I) -#if defined(Marc4DAMASK) || defined(Abaqus) calcMode(ip,mesh_FEasCP('elem',el)) = .true. ! first ip,el needs to be already pingponged to "calc" -#else - calcMode(ip,el) = .true. ! first ip,el needs to be already pingponged to "calc" #endif !!!! COMPATIBILITY HACK !!!! diff --git a/src/meshFEM.f90 b/src/meshFEM.f90 index 6abfb83d4..ca666f047 100644 --- a/src/meshFEM.f90 +++ b/src/meshFEM.f90 @@ -25,8 +25,12 @@ use PETScis mesh_NcpElems, & !< total number of CP elements in mesh mesh_NcpElemsGlobal, & mesh_Nnodes, & !< total number of nodes in mesh - mesh_maxNips, & !< max number of IPs in any CP element + mesh_maxNipNeighbors, & !< max number of IP neighbors in any CP element mesh_maxNipNeighbors +!!!! BEGIN DEPRECATED !!!!! + integer(pInt), public, protected :: & + mesh_maxNips, & !< max number of IPs in any CP element +!!!! BEGIN DEPRECATED !!!!! real(pReal), public, protected :: charLength @@ -117,8 +121,7 @@ subroutine mesh_init(ip,el) worldsize use FEsolving, only: & FEsolving_execElem, & - FEsolving_execIP, & - calcMode + FEsolving_execIP use FEM_Zoo, only: & FEM_Zoo_nQuadrature, & FEM_Zoo_QuadraturePoints @@ -231,10 +234,11 @@ subroutine mesh_init(ip,el) allocate(FEsolving_execIP(2_pInt,mesh_NcpElems)); FEsolving_execIP = 1_pInt ! parallel loop bounds set to comprise from first IP... forall (j = 1_pInt:mesh_NcpElems) FEsolving_execIP(2,j) = FE_Nips(FE_geomtype(mesh_element(2,j))) ! ...up to own IP count for each element - if (allocated(calcMode)) deallocate(calcMode) - allocate(calcMode(mesh_maxNips,mesh_NcpElems)) - calcMode = .false. ! pretend to have collected what first call is asking (F = I) - calcMode(ip,el) = .true. ! first ip,el needs to be already pingponged to "calc" +!!!! COMPATIBILITY HACK !!!! +! for a homogeneous mesh, all elements have the same number of IPs and and cell nodes. +! hence, xxPerElem instead of maxXX + mesh_NipsPerElem = mesh_maxNips +!!!!!!!!!!!!!!!!!!!!!!!! end subroutine mesh_init