From d594996e7ce492a389097220a2480dd86ca915a4 Mon Sep 17 00:00:00 2001 From: Pratheek Shanthraj Date: Tue, 24 Jun 2014 23:18:07 +0000 Subject: [PATCH] added mesh dependent characteristic length as a numerical parameter needed for gradient and phase field problems on unstructured meshes --- code/damage_gradient.f90 | 2 +- code/numerics.f90 | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/damage_gradient.f90 b/code/damage_gradient.f90 index 7f7221fc2..12d009053 100644 --- a/code/damage_gradient.f90 +++ b/code/damage_gradient.f90 @@ -263,7 +263,7 @@ subroutine damage_gradient_microstructure(Tstar_v, Fe, ipc, ip, el) mappingConstitutive, & phase_damageInstance, & damageState - use mesh, only: & + use numerics, only: & charLength use math, only: & math_Mandel6to33, & diff --git a/code/numerics.f90 b/code/numerics.f90 index f359ab746..567482515 100644 --- a/code/numerics.f90 +++ b/code/numerics.f90 @@ -60,7 +60,8 @@ module numerics maxdRelax_RGC = 1.0e+0_pReal, & !< threshold of maximum relaxation vector increment (if exceed this then cutback) maxVolDiscr_RGC = 1.0e-5_pReal, & !< threshold of maximum volume discrepancy allowed volDiscrMod_RGC = 1.0e+12_pReal, & !< stiffness of RGC volume discrepancy (zero = without volume discrepancy constraint) - volDiscrPow_RGC = 5.0_pReal !< powerlaw penalty for volume discrepancy + volDiscrPow_RGC = 5.0_pReal, & !< powerlaw penalty for volume discrepancy + charLength = 1.0_pReal !< characteristic length scale for gradient problems logical, protected, public :: & analyticJaco = .false., & !< use analytic Jacobian or perturbation, Default .false.: calculate Jacobian using perturbations usePingPong = .true., & @@ -299,6 +300,11 @@ subroutine numerics_init case ('fixed_seed') fixedSeed = IO_intValue(line,positions,2_pInt) +!-------------------------------------------------------------------------------------------------- +! gradient parameter + case ('charlength') + charLength = IO_floatValue(line,positions,2_pInt) + !-------------------------------------------------------------------------------------------------- ! spectral parameters #ifdef Spectral