[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet popinet at users.sf.net
Fri May 15 02:54:10 UTC 2009


The following commit has been merged in the upstream branch:
commit 728e8b105bef6726423114b2b143de370e95c673
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Fri Mar 23 08:28:08 2007 +1100

    Added check for positiveness of solid->s[0]
    
    darcs-hash:20070322212808-d4795-27b7cfd9175b86c56b46a8dae08dbcd73faed6f0.gz

diff --git a/src/domain.c b/src/domain.c
index 598a413..0628c74 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -2271,6 +2271,10 @@ void gfs_cell_read (FttCell * cell, GtsFile * fp, GfsDomain * domain)
     return;
   }
   s0 = atof (fp->token->str);
+  if (s0 < 0. && s0 != -1.) {
+    gts_file_error (fp, "solid->s[0] must be positive");
+    return;
+  }
   gts_file_next_token (fp);
 
   gfs_cell_init (cell, domain);
@@ -2378,6 +2382,10 @@ void gfs_cell_read_binary (FttCell * cell, GtsFile * fp, GfsDomain * domain)
     gts_file_error (fp, "expecting a number (solid->s[0])");
     return;
   }
+  if (s0 < 0. && s0 != -1.) {
+    gts_file_error (fp, "solid->s[0] must be positive");
+    return;
+  }
 
   gfs_cell_init (cell, domain);
   s = cell->data;

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list