[Commits] [svn:einsteintoolkit] NullDecomp/trunk/ (Rev. 9)

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Tue Jul 31 15:02:19 CDT 2012


User: rhaas
Date: 2012/07/31 03:02 PM

Modified:
 /trunk/
  param.ccl
 /trunk/src/
  NullDecomp_IO.F90

Log:
 NullDecomp: make parameters steerable, respect Cactus truncate_files option
 
 From: Nick Taylor

File Changes:

Directory: /trunk/src/
======================

File [modified]: NullDecomp_IO.F90
Delta lines: +7 -3
===================================================================
--- trunk/src/NullDecomp_IO.F90	2012-05-28 22:21:15 UTC (rev 8)
+++ trunk/src/NullDecomp_IO.F90	2012-07-31 20:02:18 UTC (rev 9)
@@ -19,6 +19,7 @@
   character(1000) DirName, FileName, lName, mName
 
   integer :: flen, nchar, l, m
+  logical :: file_exists
 
   DECLARE_CCTK_PARAMETERS
 
@@ -40,8 +41,9 @@
 
        FileName = DirName(1:nchar) //'/' //FieldName&
            //'.L'//lName(1:2)//'M'//mName(1:3) // '.asc'
- 
-       if (TruncateFile) then
+
+       inquire(FILE=FileName(1:flen), EXIST=file_exists) 
+       if (TruncateFile .or. .not. file_exists) then
          open(10, FILE=FileName(1:flen), STATUS='REPLACE')
        else 
          open(10, FILE=FileName(1:flen), STATUS='OLD', POSITION='APPEND')
@@ -67,6 +69,7 @@
   character(1000) DirName, FileName, lName, mName
 
   integer :: flen, nchar, l, m
+  logical :: file_exists
 
   DECLARE_CCTK_PARAMETERS
 
@@ -89,7 +92,8 @@
        FileName = DirName(1:nchar) //'/' //FieldName&
            //'.L'//lName(1:2)//'M'//mName(1:3) // '.asc'
  
-       if (TruncateFile) then
+       inquire(FILE=FileName(1:flen), EXIST=file_exists) 
+       if (TruncateFile .or. .not. file_exists) then
          open(10, FILE=FileName(1:flen), STATUS='REPLACE')
        else 
          open(10, FILE=FileName(1:flen), STATUS='OLD', POSITION='APPEND')

Directory: /trunk/
==================

File [modified]: param.ccl
Delta lines: +1 -1
===================================================================
--- trunk/param.ccl	2012-05-28 22:21:15 UTC (rev 8)
+++ trunk/param.ccl	2012-07-31 20:02:18 UTC (rev 9)
@@ -13,7 +13,7 @@
 
 restricted:
 
-CCTK_INT l_max "Decompose into spherical harmonics \ell = spin up to \ell = l_max"
+CCTK_INT l_max "Decompose into spherical harmonics \ell = spin up to \ell = l_max" STEERABLE=ALWAYS
 {
   2: :: "2 or greater "
 } 9



More information about the Commits mailing list