[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:56:10 UTC 2009
The following commit has been merged in the upstream branch:
commit 448fad1c570a044498b272af60a76005142bb7f8
Author: Stephane Popinet <popinet at users.sf.net>
Date: Thu Jan 29 10:53:08 2009 +1100
Small optimisation for dry cells in GfsRiver
darcs-hash:20090128235308-d4795-5f258d0351475b25ae08c4b3b3fa24eeb78940f1.gz
diff --git a/src/river.c b/src/river.c
index 6306e2b..94bf7d6 100644
--- a/src/river.c
+++ b/src/river.c
@@ -99,6 +99,10 @@ typedef struct {
static void face_fluxes (FttCellFace * face, GfsRiver * r)
{
+ if (GFS_VALUE (face->cell, r->v1[0]) <= DRY &&
+ GFS_VALUE (face->neighbor, r->v1[0]) <= DRY)
+ return;
+
static Sym sym[4] = {
{U, 1., V, 1.},
{U, -1., V, -1.},
diff --git a/src/river.h b/src/river.h
index 4106bdc..cdb53fc 100644
--- a/src/river.h
+++ b/src/river.h
@@ -1,3 +1,29 @@
+/* Gerris - The GNU Flow Solver
+ * Copyright (C) 2001-2009 National Institute of Water and Atmospheric Research
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef __RIVER_H__
+#define __RIVER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
#include "variable.h"
/* GfsRiver: Header */
@@ -31,5 +57,10 @@ GfsSimulationClass * gfs_river_class (void);
#define GFS_IS_BC_SUBCRITICAL(obj) (gts_object_is_from_class (obj,\
gfs_bc_subcritical_class ()))
-
GfsBcClass * gfs_bc_subcritical_class (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __RIVER_H__ */
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list