[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
s.popinet at niwa.co.nz
Fri May 15 02:52:38 UTC 2009
The following commit has been merged in the upstream branch:
commit 4965aa70921f9efa1fd1e6cd91602ae18814d1e7
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date: Fri Sep 16 13:20:32 2005 +1000
Removed obsolete gerris_dir stuff
darcs-hash:20050916032032-fbd8f-242ba42b4c5a15c9418814a3f203a16f1f302448.gz
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c0a40e..fe18544 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -138,7 +138,7 @@ EXTRA_DIST = \
dx.c \
isocube.h
-bin_PROGRAMS = gerris2D gerris3D gerris2D3 gerris2D_dir gerris3D_dir
+bin_PROGRAMS = gerris2D gerris3D gerris2D3
gerris2D_SOURCES = gerris.c
gerris2D_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
@@ -151,13 +151,6 @@ gerris2D3_SOURCES = gerris.c
gerris2D3_CFLAGS = $(AM_CFLAGS) -DFTT_2D3=1
gerris2D3_LDADD = $(GFS2D3_LIBS)
-gerris2D_dir_SOURCES = gerris_dir.c
-gerris2D_dir_CFLAGS = $(AM_CFLAGS) -DFTT_2D=1
-gerris2D_dir_LDADD = $(GFS2D_LIBS)
-
-gerris3D_dir_SOURCES = gerris_dir.c
-gerris3D_dir_LDADD = $(GFS3D_LIBS)
-
.mdf.c:
$(MDF2C) $^ > $@
diff --git a/src/gerris_dir.c b/src/gerris_dir.c
deleted file mode 100644
index 0489351..0000000
--- a/src/gerris_dir.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Gerris - The GNU Flow Solver
- * Copyright (C) 2001 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.
- */
-
-#include <stdlib.h>
-#include <math.h>
-
-#include "config.h"
-#ifdef HAVE_GETOPT_H
-# include <getopt.h>
-#endif /* HAVE_GETOPT_H */
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#include "init.h"
-#include "simulation.h"
-#include "refine.h"
-#include "output.h"
-#include "adaptive.h"
-
-int main (int argc, char * argv[])
-{
- GfsSimulation * simulation;
- FILE * fptr;
- GtsFile * fp;
- int c = 0;
-
- gfs_init (&argc, &argv);
-
- /* parse options using getopt */
- while (c != EOF) {
-#ifdef HAVE_GETOPT_LONG
- static struct option long_options[] = {
- {"help", no_argument, NULL, 'h'},
- {"version", no_argument, NULL, 'V'}
- };
- int option_index = 0;
- switch ((c = getopt_long (argc, argv, "hV",
- long_options, &option_index))) {
-#else /* not HAVE_GETOPT_LONG */
- switch ((c = getopt (argc, argv, "hV"))) {
-#endif /* not HAVE_GETOPT_LONG */
- case 'h': /* help */
- fprintf (stderr,
- "Usage: gerris_dir DIR1 DIR2... FILE\n"
- "The Gerris flow solver simulation engine (multiple directories version).\n"
- "\n"
- " -h --help display this help and exit\n"
- " -V --version output version information and exit\n"
- "\n"
- "Reports bugs to %s\n",
- FTT_MAINTAINER);
- return 0; /* success */
- break;
- case 'V': /* version */
- fprintf (stderr,
- "gerris_dir: using %dD libgfs version %s\n"
- "compiled with flags: %s\n"
- "sizeof (GfsStateVector): %d sizeof (FttCell): %d sizeof (FttOct): %d\n",
- FTT_DIMENSION,
- GFS_VERSION,
- GFS_COMPILATION_FLAGS,
- sizeof (GfsStateVector),
- sizeof (FttCell),
- sizeof (struct _FttOct));
- return 0; /* succes */
- break;
- case '?': /* wrong options */
- fprintf (stderr, "Try `gerris_dir --help' for more information.\n");
- return 1; /* failure */
- }
- }
-
- if (optind >= argc) { /* missing DIR */
- fprintf (stderr,
- "gerris_dir: missing DIR\n"
- "Try `gerris_dir --help' for more information.\n");
- return 1; /* failure */
- }
-
- if (optind + 1 >= argc) { /* missing FILE */
- fprintf (stderr,
- "gerris_dir: missing FILE\n"
- "Try `gerris_dir --help' for more information.\n");
- return 1; /* failure */
- }
-
- simulation = gfs_simulation_new (gfs_simulation_class ());
- if (GFS_DOMAIN (simulation)->pid < 0) {
- fprintf (stderr,
- "gerris_dir: needs MPI support\n"
- "Try `gerris_dir --help' for more information.\n");
- return 1; /* failure */
- }
- if (GFS_DOMAIN (simulation)->pid + optind >= argc - 1) {
- fprintf (stderr,
- "gerris_dir: missing DIR for PE %d\n"
- "Try `gerris_dir --help' for more information.\n",
- GFS_DOMAIN (simulation)->pid);
- return 1; /* failure */
- }
- if (chdir (argv[GFS_DOMAIN (simulation)->pid + optind])) {
- fprintf (stderr,
- "gerris_dir: cannot change to directory `%s'\n",
- argv[GFS_DOMAIN (simulation)->pid + optind]);
- perror ("gerris_dir");
- return 1; /* failure */
- }
-
- fptr = fopen (argv[argc - 1], "rt");
- if (fptr == NULL) {
- fprintf (stderr, "gerris_dir: unable to open file `%s'\n", argv[argc - 1]);
- return 1;
- }
-
- fp = gts_file_new (fptr);
- if (!(simulation = gfs_simulation_read (fp))) {
- fprintf (stderr,
- "gerris_dir: file `%s' is not a valid simulation file\n"
- "%s:%d:%d: %s\n",
- argv[argc - 1], argv[argc - 1],
- fp->line, fp->pos, fp->error);
- return 1;
- }
- gts_file_destroy (fp);
- fclose (fptr);
-
- gfs_simulation_run (simulation);
-
- return 0;
-}
-
-
-
-
-
-
-
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list