[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
s.popinet at niwa.co.nz
Fri May 15 02:51:37 UTC 2009
The following commit has been merged in the upstream branch:
commit feddbef9cb98ef5944d186ec8c37658d46406521
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date: Wed Feb 9 10:07:03 2005 +1100
Renamed _gfs_source_tension_ to _T
darcs-hash:20050208230703-fbd8f-21202cf69d2dce74c1949ffb720d7b9e4ddf1cc9.gz
diff --git a/src/tension.c b/src/tension.c
index 8a0736a..ae93226 100644
--- a/src/tension.c
+++ b/src/tension.c
@@ -29,6 +29,7 @@ static void gfs_source_tension_read (GtsObject ** o, GtsFile * fp)
{
GfsSourceTension * s = GFS_SOURCE_TENSION (*o);
GfsDomain * domain = GFS_DOMAIN (gfs_object_simulation (*o));
+ FttComponent c;
(* GTS_OBJECT_CLASS (gfs_source_tension_class ())->parent_class->read) (o, fp);
if (fp->type == GTS_ERROR)
@@ -43,15 +44,12 @@ static void gfs_source_tension_read (GtsObject ** o, GtsFile * fp)
return;
}
gts_file_next_token (fp);
-
- if ((s->t[0] = gfs_variable_from_name (domain->variables, "_gfs_source_tension_x")) == NULL)
- s->t[0] = gfs_domain_add_variable (domain, "_gfs_source_tension_x");
- if ((s->t[1] = gfs_variable_from_name (domain->variables, "_gfs_source_tension_y")) == NULL)
- s->t[1] = gfs_domain_add_variable (domain, "_gfs_source_tension_y");
-#if (!FTT_2D)
- if ((s->t[2] = gfs_variable_from_name (domain->variables, "_gfs_source_tension_z")) == NULL)
- s->t[2] = gfs_domain_add_variable (domain, "_gfs_source_tension_z");
-#endif /* 3D */
+
+ for (c = 0; c < FTT_DIMENSION; c++) {
+ static gchar * name[3] = {"_Tx", "_Ty", "_Tz"};
+ if ((s->t[c] = gfs_variable_from_name (domain->variables, name[c])) == NULL)
+ s->t[c] = gfs_domain_add_variable (domain, name[c]);
+ }
if (fp->type != GTS_INT && fp->type != GTS_FLOAT) {
gts_file_error (fp, "expecting a number (sigma)");
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list