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

Stephane Popinet popinet at users.sf.net
Tue Nov 24 12:24:32 UTC 2009


The following commit has been merged in the upstream branch:
commit bf52e2e94332221bf0397179444413bcf8e15d4f
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Tue Jul 14 13:32:49 2009 +1000

    Entirely solid boxes can be used
    
    They will be automatically removed from the simulation rather than
    making the simulation abort with an error message.
    
    darcs-hash:20090714033249-d4795-b2045665c56a1d4c237a2cd778fa32835ebced5a.gz

diff --git a/src/solid.c b/src/solid.c
index 225ae3b..624c3bd 100644
--- a/src/solid.c
+++ b/src/solid.c
@@ -264,6 +264,7 @@ typedef struct {
   gpointer data;
   GfsVariable * status;
   guint thin;
+  GSList * solid_boxes;
 } InitSolidParams;
 
 static gboolean thin_cell_is_solid (FttCell * cell)
@@ -827,19 +828,17 @@ static void solid_fractions_from_children (FttCell * cell, InitSolidParams * p)
       }
     }
   }
-  if (p->destroy_solid && GFS_VALUE (cell, p->status) == GFS_STATUS_SOLID) {
-    if (FTT_CELL_IS_ROOT (cell))
-      g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR,
-	     "root cell is entirely outside of the fluid domain\n"
-	     "the solid surface orientation may be incorrect");
-    else
-      ftt_cell_destroy (cell, p->cleanup, p->data);
-  }
+  if (p->destroy_solid && 
+      GFS_VALUE (cell, p->status) == GFS_STATUS_SOLID && 
+      !FTT_CELL_IS_ROOT (cell))
+    ftt_cell_destroy (cell, p->cleanup, p->data);
 }
 
 static void foreach_box (GfsBox * box, InitSolidParams * p)
 {
   solid_fractions_from_children (box->root, p);
+  if (p->destroy_solid && GFS_VALUE (box->root, p->status) == GFS_STATUS_SOLID)
+    p->solid_boxes = g_slist_prepend (p->solid_boxes, box);
 }
 
 static void match_fractions (FttCell * cell, GfsVariable * status)
@@ -943,7 +942,10 @@ void gfs_init_solid_fractions_from_children (GfsDomain * domain,
   p.cleanup = cleanup;
   p.data = data;
   p.status = status;
+  p.solid_boxes = NULL;
   gts_container_foreach (GTS_CONTAINER (domain), (GtsFunc) foreach_box, &p);
+  g_slist_foreach (p.solid_boxes, (GFunc) gts_object_destroy, NULL);
+  g_slist_free (p.solid_boxes);
 }
 
 /**

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list