corrected PETSc macro expansion
This commit is contained in:
parent
563b1f5e4b
commit
6e3e06bed7
|
@ -386,21 +386,24 @@ subroutine AL_formResidual(in,x_scal,f_scal,dummy,ierr)
|
||||||
use IO, only: IO_intOut
|
use IO, only: IO_intOut
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt) :: i,j,k
|
|
||||||
integer(pInt), save :: callNo = 3_pInt
|
integer(pInt), save :: callNo = 3_pInt
|
||||||
real(pReal), dimension(3,3) :: temp33_Real
|
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
|
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
|
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
|
f_scal
|
||||||
PetscScalar, pointer, dimension(:,:,:,:,:) :: &
|
PetscScalar, pointer, dimension(:,:,:,:,:) :: &
|
||||||
F, &
|
F, &
|
||||||
F_lambda, &
|
F_lambda, &
|
||||||
residual_F &
|
residual_F, &
|
||||||
residual_F_lambda
|
residual_F_lambda
|
||||||
PetscInt :: &
|
PetscInt :: &
|
||||||
iter, &
|
iter, &
|
||||||
|
@ -408,10 +411,14 @@ subroutine AL_formResidual(in,x_scal,f_scal,dummy,ierr)
|
||||||
PetscObject :: dummy
|
PetscObject :: dummy
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
|
|
||||||
F => x_scal(1:3,1:3,1,XG_RANGE,YG_RANGE,ZG_RANGE)
|
F => x_scal(1:3,1:3,1,&
|
||||||
F_lambda => x_scal(1:3,1:3,2,XG_RANGE,YG_RANGE,ZG_RANGE)
|
XG_RANGE,YG_RANGE,ZG_RANGE)
|
||||||
residual_F => f_scal(1:3,1:3,1,X_RANGE,Y_RANGE,Z_RANGE)
|
F_lambda => x_scal(1:3,1:3,2,&
|
||||||
residual_F_lambda => f_scal(1:3,1:3,2,X_RANGE,Y_RANGE,Z_RANGE)
|
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 SNESGetNumberFunctionEvals(snes,nfuncs,ierr); CHKERRQ(ierr)
|
||||||
call SNESGetIterationNumber(snes,iter,ierr); CHKERRQ(ierr)
|
call SNESGetIterationNumber(snes,iter,ierr); CHKERRQ(ierr)
|
||||||
|
|
|
@ -309,7 +309,7 @@ type(tSolutionState) function &
|
||||||
params%timeinc = timeinc
|
params%timeinc = timeinc
|
||||||
params%temperature = temperature_BC
|
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)
|
call SNESGetConvergedReason(snes,reason,ierr); CHKERRQ(ierr)
|
||||||
basicPETSc_solution%termIll = terminallyIll
|
basicPETSc_solution%termIll = terminallyIll
|
||||||
terminallyIll = .false.
|
terminallyIll = .false.
|
||||||
|
|
|
@ -66,7 +66,6 @@ module prec
|
||||||
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal
|
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal
|
||||||
real(pReal), parameter, public :: tol_gravityNodePos = 1.0e-100_pReal
|
real(pReal), parameter, public :: tol_gravityNodePos = 1.0e-100_pReal
|
||||||
|
|
||||||
|
|
||||||
type, public :: p_vec
|
type, public :: p_vec
|
||||||
real(pReal), dimension(:), pointer :: p
|
real(pReal), dimension(:), pointer :: p
|
||||||
end type p_vec
|
end type p_vec
|
||||||
|
@ -83,20 +82,15 @@ subroutine prec_init
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
!$OMP CRITICAL (write2out)
|
write(6,'(/,a)') '<<<+- prec init -+>>>'
|
||||||
|
write(6,'(a)') '$Id$'
|
||||||
write(6,*)
|
|
||||||
write(6,*) '<<<+- prec init -+>>>'
|
|
||||||
write(6,*) '$Id$'
|
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
write(6,'(a,i3)') ' Bytes for pReal: ',pReal
|
||||||
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
write(6,'(a,i3)') ' Bytes for pInt: ',pInt
|
||||||
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
write(6,'(a,i3)') ' Bytes for pLongInt: ',pLongInt
|
||||||
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
write(6,'(a,e10.3)') ' NaN: ', DAMASK_NaN
|
||||||
write(6,'(a,l3)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
|
write(6,'(a,l3,/)') ' NaN /= NaN: ',DAMASK_NaN/=DAMASK_NaN
|
||||||
write(6,*)
|
|
||||||
if (DAMASK_NaN == DAMASK_NaN) call quit(9000)
|
if (DAMASK_NaN == DAMASK_NaN) call quit(9000)
|
||||||
!$OMP END CRITICAL (write2out)
|
|
||||||
|
|
||||||
end subroutine prec_init
|
end subroutine prec_init
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue