corrected PETSc macro expansion

This commit is contained in:
Martin Diehl 2013-01-10 15:36:55 +00:00
parent 563b1f5e4b
commit 6e3e06bed7
3 changed files with 23 additions and 22 deletions

View File

@ -386,21 +386,24 @@ subroutine AL_formResidual(in,x_scal,f_scal,dummy,ierr)
use IO, only: IO_intOut
implicit none
integer(pInt) :: i,j,k
integer(pInt), save :: callNo = 3_pInt
real(pReal), dimension(3,3) :: temp33_Real
logical :: report
DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: &
!--------------------------------------------------------------------------------------------------
! strange syntax in the next line because otherwise macros expand beyond 132 character limit
DMDALocalInfo, dimension(&
DMDA_LOCAL_INFO_SIZE) :: &
in
PetscScalar, target, dimension(3,3,2,XG_RANGE,YG_RANGE,ZG_RANGE) :: &
PetscScalar, target, dimension(3,3,2, &
XG_RANGE,YG_RANGE,ZG_RANGE) :: &
x_scal
PetscScalar, target, dimension(3,3,2,X_RANGE,Y_RANGE,Z_RANGE) :: &
PetscScalar, target, dimension(3,3,2, &
X_RANGE,Y_RANGE,Z_RANGE) :: &
f_scal
PetscScalar, pointer, dimension(:,:,:,:,:) :: &
PetscScalar, pointer, dimension(:,:,:,:,:) :: &
F, &
F_lambda, &
residual_F &
residual_F, &
residual_F_lambda
PetscInt :: &
iter, &
@ -408,10 +411,14 @@ subroutine AL_formResidual(in,x_scal,f_scal,dummy,ierr)
PetscObject :: dummy
PetscErrorCode :: ierr
F => x_scal(1:3,1:3,1,XG_RANGE,YG_RANGE,ZG_RANGE)
F_lambda => x_scal(1:3,1:3,2,XG_RANGE,YG_RANGE,ZG_RANGE)
residual_F => f_scal(1:3,1:3,1,X_RANGE,Y_RANGE,Z_RANGE)
residual_F_lambda => f_scal(1:3,1:3,2,X_RANGE,Y_RANGE,Z_RANGE)
F => x_scal(1:3,1:3,1,&
XG_RANGE,YG_RANGE,ZG_RANGE)
F_lambda => x_scal(1:3,1:3,2,&
XG_RANGE,YG_RANGE,ZG_RANGE)
residual_F => f_scal(1:3,1:3,1,&
X_RANGE,Y_RANGE,Z_RANGE)
residual_F_lambda => f_scal(1:3,1:3,2,&
X_RANGE,Y_RANGE,Z_RANGE)
call SNESGetNumberFunctionEvals(snes,nfuncs,ierr); CHKERRQ(ierr)
call SNESGetIterationNumber(snes,iter,ierr); CHKERRQ(ierr)

View File

@ -309,7 +309,7 @@ type(tSolutionState) function &
params%timeinc = timeinc
params%temperature = temperature_BC
call SNESSolve(snes,PETSC_NULL_OBJECT,solution_vec,ierr): CHKERRQ(ierr)
call SNESSolve(snes,PETSC_NULL_OBJECT,solution_vec,ierr); CHKERRQ(ierr)
call SNESGetConvergedReason(snes,reason,ierr); CHKERRQ(ierr)
basicPETSc_solution%termIll = terminallyIll
terminallyIll = .false.

View File

@ -65,7 +65,6 @@ module prec
integer, parameter, public :: pLongInt = 8 !< integer representation 64 bit (was selected_int_kind(12), number with at least up to +- 1e12)
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal
real(pReal), parameter, public :: tol_gravityNodePos = 1.0e-100_pReal
type, public :: p_vec
real(pReal), dimension(:), pointer :: p
@ -83,20 +82,15 @@ subroutine prec_init
implicit none
!$OMP CRITICAL (write2out)
write(6,*)
write(6,*) '<<<+- prec init -+>>>'
write(6,*) '$Id$'
write(6,'(/,a)') '<<<+- prec init -+>>>'
write(6,'(a)') '$Id$'
#include "compilation_info.f90"
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
write(6,'(a,l3)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
write(6,*)
write(6,'(a,l3,/)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
if (DAMASK_NaN == DAMASK_NaN) call quit(9000)
!$OMP END CRITICAL (write2out)
end subroutine prec_init