From c4a592867f819d0e8c4c6a05a7c54037fd73bdaf Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 17 Dec 2013 15:37:14 +0000 Subject: [PATCH] updated to PETSc 3.4.3, will not compile on all workstations except for maws0X --- code/DAMASK_spectral_solverAL.f90 | 6 ++++-- code/DAMASK_spectral_solverBasicPETSc.f90 | 6 +++--- code/DAMASK_spectral_solverPolarisation.f90 | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/code/DAMASK_spectral_solverAL.f90 b/code/DAMASK_spectral_solverAL.f90 index 3b8ddf30e..9b0cb5b71 100644 --- a/code/DAMASK_spectral_solverAL.f90 +++ b/code/DAMASK_spectral_solverAL.f90 @@ -106,7 +106,7 @@ module DAMASK_spectral_solverAL DMDestroy, & DMDACreate3D, & DMCreateGlobalVector, & - DMDASetLocalFunction, & + DMDASNESSetFunctionLocal, & PETScFinalize, & SNESDestroy, & SNESGetNumberFunctionEvals, & @@ -158,6 +158,7 @@ subroutine AL_init(temperature) temperature #include #include +#include real(pReal), dimension(:,:,:,:,:), allocatable :: P real(pReal), dimension(3,3) :: & temp33_Real = 0.0_pReal @@ -194,7 +195,8 @@ subroutine AL_init(temperature) 18,1,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da,ierr) CHKERRQ(ierr) call DMCreateGlobalVector(da,solution_vec,ierr); CHKERRQ(ierr) - call DMDASetLocalFunction(da,AL_formResidual,ierr); CHKERRQ(ierr) + call DMDASNESSetFunctionLocal(da,INSERT_VALUES,AL_formResidual,dummy,ierr) + CHKERRQ(ierr) call SNESSetDM(snes,da,ierr); CHKERRQ(ierr) call SNESSetConvergenceTest(snes,AL_converged,dummy,PETSC_NULL_FUNCTION,ierr) CHKERRQ(ierr) diff --git a/code/DAMASK_spectral_solverBasicPETSc.f90 b/code/DAMASK_spectral_solverBasicPETSc.f90 index f08a681ba..1b7bf6d9f 100644 --- a/code/DAMASK_spectral_solverBasicPETSc.f90 +++ b/code/DAMASK_spectral_solverBasicPETSc.f90 @@ -103,7 +103,7 @@ module DAMASK_spectral_SolverBasicPETSc DMDestroy, & DMDACreate3D, & DMCreateGlobalVector, & - DMDASetLocalFunction, & + DMDASNESSetFunctionLocal, & PETScFinalize, & SNESDestroy, & SNESGetNumberFunctionEvals, & @@ -196,8 +196,8 @@ subroutine basicPETSc_init(temperature,nActivePhaseFields,phaseFieldData) 9+nActivePhaseFields,1,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da,ierr) CHKERRQ(ierr) call DMCreateGlobalVector(da,solution_vec,ierr); CHKERRQ(ierr) - !call DMDASNESSetFunctionLocal(da,INSERT_VALUES,BasicPETSC_formResidual,dummy,ierr); CHKERRQ(ierr) ! needed for newer versions of petsc - call DMDASetLocalFunction(da,BasicPETSC_formResidual,ierr); CHKERRQ(ierr) + call DMDASNESSetFunctionLocal(da,INSERT_VALUES,BasicPETSC_formResidual,dummy,ierr) + CHKERRQ(ierr) call SNESSetDM(snes,da,ierr); CHKERRQ(ierr) call SNESSetConvergenceTest(snes,BasicPETSC_converged,dummy,PETSC_NULL_FUNCTION,ierr) CHKERRQ(ierr) diff --git a/code/DAMASK_spectral_solverPolarisation.f90 b/code/DAMASK_spectral_solverPolarisation.f90 index 109ab37d1..9feec95e5 100644 --- a/code/DAMASK_spectral_solverPolarisation.f90 +++ b/code/DAMASK_spectral_solverPolarisation.f90 @@ -106,7 +106,7 @@ module DAMASK_spectral_solverPolarisation DMDestroy, & DMDACreate3D, & DMCreateGlobalVector, & - DMDASetLocalFunction, & + DMDASNESSetFunctionLocal, & PETScFinalize, & SNESDestroy, & SNESGetNumberFunctionEvals, & @@ -158,6 +158,7 @@ subroutine Polarisation_init(temperature) temperature #include #include +#include real(pReal), dimension(:,:,:,:,:), allocatable :: P real(pReal), dimension(3,3) :: & temp33_Real = 0.0_pReal @@ -194,7 +195,8 @@ subroutine Polarisation_init(temperature) 18,1,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da,ierr) CHKERRQ(ierr) call DMCreateGlobalVector(da,solution_vec,ierr); CHKERRQ(ierr) - call DMDASetLocalFunction(da,Polarisation_formResidual,ierr); CHKERRQ(ierr) + call DMDASNESSetFunctionLocal(da,INSERT_VALUES,Polarisation_formResidual,dummy,ierr) + CHKERRQ(ierr) call SNESSetDM(snes,da,ierr); CHKERRQ(ierr) call SNESSetConvergenceTest(snes,Polarisation_converged,dummy,PETSC_NULL_FUNCTION,ierr) CHKERRQ(ierr)