[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sourceforge.net
Fri May 15 02:51:18 UTC 2009
The following commit has been merged in the upstream branch:
commit de0f1b25c8f8e8623e34872f1801bcdcb87baae9
Author: Stephane Popinet <popinet at users.sourceforge.net>
Date: Thu Oct 28 09:43:56 2004 +1000
Check for diffusion terms before warning (gerris--mainline--0.7--patch-10)
gerris--mainline--0.7--patch-10
Keywords:
The "soid surface cuts boundary cells" warning is only relevant if
diffusion terms are present.
darcs-hash:20041027234356-aabb8-fda061223b240b577fc64678ebadd9ad4e8cc65d.gz
diff --git a/src/simulation.c b/src/simulation.c
index 3728182..e5d91f2 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -785,6 +785,11 @@ static void check_solid_fractions (GfsBox * box, gpointer * data)
(FttFaceTraverseFunc) check_face, nf);
}
+static void is_diffusion (GfsSource * s, gboolean * diffusion)
+{
+ *diffusion = (GFS_IS_SOURCE_DIFFUSION (s) != NULL);
+}
+
/**
* gfs_simulation_refine:
* @sim: a #GfsSimulation.
@@ -833,9 +838,19 @@ void gfs_simulation_refine (GfsSimulation * sim)
data[0] = sim;
data[1] = &nf;
gts_container_foreach (GTS_CONTAINER (sim), (GtsFunc) check_solid_fractions, data);
- if (nf > 0)
- g_warning ("the solid surface cuts %d boundary cells,\n"
- "this may cause errors for diffusion terms\n", nf);
+ if (nf > 0) {
+ GfsVariable * v = domain->variables;
+ gboolean diffusion = FALSE;
+
+ while (v && !diffusion) {
+ if (v->sources)
+ gts_container_foreach (v->sources, (GtsFunc) is_diffusion, &diffusion);
+ v = v->next;
+ }
+ if (diffusion)
+ g_warning ("the solid surface cuts %d boundary cells,\n"
+ "this may cause errors for diffusion terms\n", nf);
+ }
}
/**
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list