neighborhood relations were screwed up for some elementtypes as of version 2318, might have caused segmentation faults with nonlocal model, now fixed

This commit is contained in:
Christoph Kords 2013-04-22 13:35:35 +00:00
parent 49ef6d7193
commit a7706090d2
2 changed files with 20 additions and 15 deletions

View File

@ -1184,7 +1184,8 @@ use mesh, only: mesh_NcpElems, &
mesh_ipAreaNormal, &
FE_NipNeighbors, &
FE_maxNipNeighbors, &
FE_geomtype
FE_geomtype, &
FE_celltype
use material, only: homogenization_maxNgrains, &
material_phase, &
phase_localPlasticity, &
@ -1353,7 +1354,7 @@ if (.not. phase_localPlasticity(phase) .and. constitutive_nonlocal_shortRangeStr
nRealNeighbors = 0_pInt
neighboring_rhoTotal = 0.0_pReal
do n = 1_pInt,FE_NipNeighbors(FE_geomtype(mesh_element(2,el)))
do n = 1_pInt,FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el))))
neighboring_el = mesh_ipNeighborhood(1,n,ip,el)
neighboring_ip = mesh_ipNeighborhood(2,n,ip,el)
if (neighboring_el > 0 .and. neighboring_ip > 0) then
@ -2057,7 +2058,8 @@ use mesh, only: mesh_NcpElems, &
mesh_ipArea, &
mesh_ipAreaNormal, &
FE_NipNeighbors, &
FE_geomtype
FE_geomtype, &
FE_celltype
use material, only: homogenization_maxNgrains, &
material_phase, &
phase_plasticityInstance, &
@ -2345,7 +2347,7 @@ if (.not. phase_localPlasticity(material_phase(g,ip,el))) then
my_Fe = Fe(1:3,1:3,g,ip,el)
my_F = math_mul33x33(my_Fe, Fp(1:3,1:3,g,ip,el))
do n = 1_pInt,FE_NipNeighbors(FE_geomtype(mesh_element(2,el))) ! loop through my neighbors
do n = 1_pInt,FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el)))) ! loop through my neighbors
neighboring_el = mesh_ipNeighborhood(1,n,ip,el)
neighboring_ip = mesh_ipNeighborhood(2,n,ip,el)
neighboring_n = mesh_ipNeighborhood(3,n,ip,el)
@ -2636,7 +2638,8 @@ use mesh, only: mesh_element, &
mesh_maxNips, &
mesh_NcpElems, &
FE_NipNeighbors, &
FE_geomtype
FE_geomtype, &
FE_celltype
use lattice, only: lattice_sn, &
lattice_sd
@ -2667,7 +2670,7 @@ integer(pInt) Nneighbors, & !
real(pReal), dimension(4) :: absoluteMisorientation ! absolute misorientation (without symmetry) between me and my neighbor
real(pReal), dimension(2,constitutive_nonlocal_totalNslip(phase_plasticityInstance(material_phase(1,i,e))),&
constitutive_nonlocal_totalNslip(phase_plasticityInstance(material_phase(1,i,e))),&
FE_NipNeighbors(FE_geomtype(mesh_element(2,e)))) :: &
FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,e))))) :: &
compatibility ! compatibility for current element and ip
real(pReal), dimension(3,constitutive_nonlocal_totalNslip(phase_plasticityInstance(material_phase(1,i,e)))) :: &
slipNormal, &
@ -2679,7 +2682,7 @@ logical, dimension(constitutive_nonlocal_totalNslip(phase_plasticityInstance(mat
belowThreshold
Nneighbors = FE_NipNeighbors(FE_geomtype(mesh_element(2,e)))
Nneighbors = FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,e))))
my_phase = material_phase(1,i,e)
my_texture = material_texture(1,i,e)
my_instance = phase_plasticityInstance(my_phase)

View File

@ -486,7 +486,8 @@ use mesh, only: mesh_element, &
mesh_maxNips, &
mesh_ipNeighborhood, &
FE_NipNeighbors, &
FE_geomtype
FE_geomtype, &
FE_celltype
use material, only: homogenization_Ngrains, &
homogenization_maxNgrains
use constitutive, only: constitutive_sizeState, &
@ -731,7 +732,7 @@ do while (any(crystallite_todo(:,:,FEsolving_execELem(1):FEsolving_execElem(2)))
do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
if (.not. crystallite_localPlasticity(1,i,e) .and. crystallite_converged(1,i,e)) then
do n = 1_pInt,FE_NipNeighbors(FE_geomtype(mesh_element(2,e)))
do n = 1_pInt,FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,e))))
neighboring_e = mesh_ipNeighborhood(1,n,i,e)
neighboring_i = mesh_ipNeighborhood(2,n,i,e)
if (neighboring_e > 0_pInt .and. neighboring_i > 0_pInt) then
@ -767,7 +768,7 @@ do while (any(crystallite_todo(:,:,FEsolving_execELem(1):FEsolving_execElem(2)))
do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
if (.not. crystallite_localPlasticity(1,i,e) .and. crystallite_subFrac(1,i,e) == 0.0_pReal) then
do n = 1_pInt,FE_NipNeighbors(FE_geomtype(mesh_element(2,e)))
do n = 1_pInt,FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,e))))
neighboring_e = mesh_ipNeighborhood(1,n,i,e)
neighboring_i = mesh_ipNeighborhood(2,n,i,e)
if (neighboring_e > 0_pInt .and. neighboring_i > 0_pInt) then
@ -3391,7 +3392,8 @@ subroutine crystallite_orientations
use mesh, only: mesh_element, &
mesh_ipNeighborhood, &
FE_NipNeighbors, &
FE_geomtype
FE_geomtype, &
FE_celltype
use constitutive_nonlocal, only: constitutive_nonlocal_structure, &
constitutive_nonlocal_updateCompatibility
@ -3453,7 +3455,7 @@ subroutine crystallite_orientations
! --- calculate disorientation between me and my neighbor ---
do n = 1_pInt,FE_NipNeighbors(FE_geomtype(mesh_element(2,e))) ! loop through my neighbors
do n = 1_pInt,FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,e)))) ! loop through my neighbors
neighboring_e = mesh_ipNeighborhood(1,n,i,e)
neighboring_i = mesh_ipNeighborhood(2,n,i,e)
if ((neighboring_e > 0) .and. (neighboring_i > 0)) then ! if neighbor exists
@ -3463,9 +3465,9 @@ subroutine crystallite_orientations
neighboringStructure = constitutive_nonlocal_structure(neighboringInstance) ! get my neighbor's crystal structure
if (myStructure == neighboringStructure) then ! if my neighbor has same crystal structure like me
crystallite_disorientation(:,n,1,i,e) = &
math_qDisorientation( crystallite_orientation(1:4,1,i,e), &
crystallite_orientation(1:4,1,neighboring_i,neighboring_e), &
crystallite_symmetryID(1,i,e)) ! calculate disorientation
math_qDisorientation(crystallite_orientation(1:4,1,i,e), &
crystallite_orientation(1:4,1,neighboring_i,neighboring_e), &
crystallite_symmetryID(1,i,e)) ! calculate disorientation
else ! for neighbor with different phase
crystallite_disorientation(:,n,1,i,e) = (/0.0_pReal, 1.0_pReal, 0.0_pReal, 0.0_pReal/) ! 180 degree rotation about 100 axis
endif