From 0dbc6fb435f0dc503410672894c08deb89de516e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 14 May 2019 11:52:28 +0200 Subject: [PATCH] usage example --- src/commercialFEM_fileList.f90 | 2 +- src/geometry_plastic_nonlocal.f90 | 24 ++++++++++++++++++++++++ src/mesh_grid.f90 | 4 +++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/commercialFEM_fileList.f90 b/src/commercialFEM_fileList.f90 index ef3870ece..1c7287813 100644 --- a/src/commercialFEM_fileList.f90 +++ b/src/commercialFEM_fileList.f90 @@ -14,6 +14,7 @@ #include "Lambert.f90" #include "rotations.f90" #include "FEsolving.f90" +#include "geometry_plastic_nonlocal.f90" #include "element.f90" #include "mesh_base.f90" #ifdef Abaqus @@ -28,7 +29,6 @@ #endif #include "material.f90" #include "lattice.f90" -#include "geometry_plastic_nonlocal.f90" #include "source_thermal_dissipation.f90" #include "source_thermal_externalheat.f90" #include "source_damage_isoBrittle.f90" diff --git a/src/geometry_plastic_nonlocal.f90 b/src/geometry_plastic_nonlocal.f90 index 579004b2f..0b63b7f9c 100644 --- a/src/geometry_plastic_nonlocal.f90 +++ b/src/geometry_plastic_nonlocal.f90 @@ -24,5 +24,29 @@ module geometry_plastic_nonlocal real(pReal),dimension(:,:,:,:), allocatable, public, protected :: & geometry_plastic_nonlocal_IPareaNormal !< area normal of interface to neighboring IP (initially!) + + public :: & + geometry_plastic_nonlocal_set_IPneighborhood, & + geometry_plastic_nonlocal_set_IPvolume + + contains + +subroutine geometry_plastic_nonlocal_set_IPneighborhood(IPneighborhood) + + integer, dimension(:,:,:,:), intent(in) :: IPneighborhood + + geometry_plastic_nonlocal_IPneighborhood = IPneighborhood + +end subroutine geometry_plastic_nonlocal_set_IPneighborhood + + +subroutine geometry_plastic_nonlocal_set_IPvolume(IPvolume) + + real(pReal), dimension(:,:), intent(in) :: IPvolume + + geometry_plastic_nonlocal_IPvolume = IPvolume + +end subroutine geometry_plastic_nonlocal_set_IPvolume + end module geometry_plastic_nonlocal diff --git a/src/mesh_grid.f90 b/src/mesh_grid.f90 index 685a53ba8..d873e3542 100644 --- a/src/mesh_grid.f90 +++ b/src/mesh_grid.f90 @@ -7,7 +7,8 @@ !-------------------------------------------------------------------------------------------------- module mesh use, intrinsic :: iso_c_binding - use prec, only: pReal, pInt + use prec + use geometry_plastic_nonlocal use mesh_base implicit none @@ -191,6 +192,7 @@ subroutine mesh_init(ip,el) if (myDebug) write(6,'(a)') ' Built IP areas'; flush(6) call mesh_spectral_build_ipNeighborhood + call geometry_plastic_nonlocal_set_IPneighborhood(mesh_ipNeighborhood) if (myDebug) write(6,'(a)') ' Built IP neighborhood'; flush(6)