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

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


The following commit has been merged in the upstream branch:
commit 01c5291540237a80a5d28952cbc0345f6ee4a998
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Thu Sep 13 07:41:44 2007 +1000

    Error message when trying to partition a domain composed of too few boxes
    
    darcs-hash:20070912214144-d4795-cf957b789552de73eff6398cf8735f8bcf15c844.gz

diff --git a/src/gerris.c b/src/gerris.c
index fa71a1e..e7b712a 100644
--- a/src/gerris.c
+++ b/src/gerris.c
@@ -104,7 +104,7 @@ int main (int argc, char * argv[])
 #ifdef HAVE_M4
 	     "  -m     --macros      Turn macros support on\n"
 	     "  -DNAME               Defines NAME as a macro expanding to VALUE\n"
-	     "  -DNAME=VALUE\n       (macro support is implicitly turned on)"
+	     "  -DNAME=VALUE         (macro support is implicitly turned on)\n"
 	     "         --define=NAME\n"
              "         --define=NAME=VALUE\n"
 #endif /* have m4 */
@@ -192,6 +192,13 @@ int main (int argc, char * argv[])
     gint pid = 0;
 
     gts_graph_print_stats (GTS_GRAPH (simulation), stderr);
+    if (gts_container_size (GTS_CONTAINER (simulation)) < pow (2., npart)) {
+      fprintf (stderr,
+	       "gerris: the number of boxes in the domain to partition should be >= 2^N\n"
+	       "Use option '-s' to split the domain first\n"
+	       "Try `gerris --help' for more information.\n");
+      return 1;
+    }
     partition = gts_graph_recursive_bisection (GTS_WGRAPH (simulation),
 					       npart, 
 					       ntry, mmax, nmin, imbalance);

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list