From 94c934c8bdd0964f25334146e4eeb5881357513d Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 29 Nov 2016 09:52:14 -0500 Subject: [PATCH] added patch to switch to fwbw_derivative --- installation/patch/README.md | 17 +++++++++++++++++ installation/patch/fwbw_derivative | 13 +++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 installation/patch/README.md create mode 100644 installation/patch/fwbw_derivative diff --git a/installation/patch/README.md b/installation/patch/README.md new file mode 100644 index 000000000..17fe041c4 --- /dev/null +++ b/installation/patch/README.md @@ -0,0 +1,17 @@ +# DAMASK patching + +This folder contains patches that modify the functionality of the current version of DAMASK prior to the corresponding inclusion in the official release. + +## Usage + +```bash +cd DAMASK_ROOT +patch -p1 installation/patch/nameOfPatch +``` + +## Available patches + + * **fwbw_derivative** switches the default spatial derivative from continuous to forward/backward difference. + This generally reduces spurious oscillations in the result as the spatial accuracy of the derivative is then compatible with the underlying solution grid. + * **petsc3.7** adapts to API changes introduced between PETSc 3.6.x and 3.7.x for setting PETSc options. + Use this patch if your system runs PETSc 3.7.x. diff --git a/installation/patch/fwbw_derivative b/installation/patch/fwbw_derivative new file mode 100644 index 000000000..03d5be1c6 --- /dev/null +++ b/installation/patch/fwbw_derivative @@ -0,0 +1,13 @@ +diff --git a/code/numerics.f90 b/code/numerics.f90 +index 24bd190..c968c70 100644 +--- a/code/numerics.f90 ++++ b/code/numerics.f90 +@@ -110,7 +110,7 @@ module numerics + fftw_plan_mode = 'FFTW_PATIENT' !< reads the planing-rigor flag, see manual on www.fftw.org, Default FFTW_PATIENT: use patient planner flag + character(len=64), protected, public :: & + spectral_solver = 'basicpetsc' , & !< spectral solution method +- spectral_derivative = 'continuous' !< spectral spatial derivative method ++ spectral_derivative = 'fwbw_difference' !< spectral spatial derivative method + character(len=1024), protected, public :: & + petsc_defaultOptions = '-mech_snes_type ngmres & + &-damage_snes_type ngmres &