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

Stephane Popinet popinet at users.sf.net
Fri May 15 02:53:50 UTC 2009


The following commit has been merged in the upstream branch:
commit ee464f68427883091cccded7c7cbbcb93f7f10dd
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Tue Dec 19 06:54:38 2006 +1100

    gfs_vof_facet() could fail for degenerate cases
    
    darcs-hash:20061218195438-d4795-afebe77fa5a8a721daed0817e161dec7ade0cb34.gz

diff --git a/src/vof.c b/src/vof.c
index 295dee1..fff2223 100644
--- a/src/vof.c
+++ b/src/vof.c
@@ -851,25 +851,25 @@ guint gfs_vof_facet (FttCell * cell, GfsVariable * v, FttVector * p, FttVector *
 #if FTT_2D
     gdouble x, y;
 
-    if (m->y != 0.) {
+    if (fabs (m->y) > 1e-4) {
       y = alpha/m->y;
       if (y >= 0. && y <= 1.) {
 	p[n].x = q.x + h/2.; p[n].y = q.y + h*(0.5 - y); p[n++].z = 0.;
       }
     }
-    if (m->x != 0.) {
+    if (fabs (m->x) > 1e-4) {
       x = alpha/m->x;
       if (x >= 0. && x <= 1.) {
 	p[n].x = q.x + h*(0.5 - x); p[n].y = q.y + h/2.; p[n++].z = 0.;
       }
     }
-    if (m->y != 0.) {
+    if (fabs (m->y) > 1e-4) {
       y = (alpha - m->x)/m->y;
       if (y >= 0. && y <= 1.) {
 	p[n].x = q.x - h/2.; p[n].y = q.y + h*(0.5 - y); p[n++].z = 0.;
       }
     }
-    if (m->x != 0.) {
+    if (fabs (m->x) > 1e-4) {
       x = (alpha - m->y)/m->x;
       if (x >= 0. && x <= 1.) {
 	p[n].x = q.x + h*(0.5 - x); p[n].y = q.y - h/2.; p[n++].z = 0.;

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list