added patch to switch to fwbw_derivative

This commit is contained in:
Philip Eisenlohr 2016-11-29 09:52:14 -05:00
parent c9ec2e0f46
commit 94c934c8bd
2 changed files with 30 additions and 0 deletions

View File

@ -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.

View File

@ -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 &