From 27c2da112b2a1c08fa4a5fd90d51f72e1c3b1b82 Mon Sep 17 00:00:00 2001 From: allen Date: Sat, 11 Sep 1999 14:45:30 +0000 Subject: Adding error codes for boundary routines git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyF90/trunk@13 f80f6fb6-8356-4fd4-90bc-d84ad503c100 --- src/WaveToy.F | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/WaveToy.F b/src/WaveToy.F index 7d93465..460af4f 100644 --- a/src/WaveToy.F +++ b/src/WaveToy.F @@ -34,16 +34,21 @@ DECLARE_CCTK_FARGUMENTS DECLARE_CCTK_PARAMETERS - INTEGER,DIMENSION(3):: sw=1 - CCTK_REAL,PARAMETER :: zero = 0.0 - INTEGER CCTK_Equals - + integer :: ierr + integer,dimension(3):: sw=1 + CCTK_REAL,parameter :: zero = 0.0 + integer CCTK_Equals + call ApplySymmetry(cctkGH,"wavetoy::scalarevolve") - if (CCTK_Equals(bound,"flat")==1) then - call ApplyFlatBC(cctkGH,sw,"wavetoy::phi") - else if (CCTK_Equals(bound,"radiation")==1) then - call ApplyRadiativeBC(cctkGH,zero,sw,"wavetoy::phi","wavetoy::phi_old") + if (CCTK_EQUALS(bound,"flat")) then + call ApplyFlatBC(ierr,cctkGH,sw,"wavetoy::phi") + else if (CCTK_EQUALS(bound,"radiation")) then + call ApplyRadiativeBC(ierr,cctkGH,zero,sw,"wavetoy::phi","wavetoy::phi_old") + end if + + if (ierr < 0) then + call CCTK_WARN(0,"Boundary conditions not applied - giving up!"); end if end subroutine wavetoyf90_boundaries -- cgit v1.2.3