PISM, A Parallel Ice Sheet Model  stable v0.5
src/verif/tests/simpleI.c
Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2004-2006 Jed Brown and Ed Bueler
00003   
00004    This file is part of Pism.
00005   
00006    Pism is free software; you can redistribute it and/or modify it under the
00007    terms of the GNU General Public License as published by the Free Software
00008    Foundation; either version 2 of the License, or (at your option) any later
00009    version.
00010   
00011    Pism is distributed in the hope that it will be useful, but WITHOUT ANY
00012    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00013    FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00014    details.
00015   
00016    You should have received a copy of the GNU General Public License
00017    along with Pism; if not, write to the Free Software
00018    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 */
00020 
00021 /*  STANDARD DIALOGUE:
00022 
00023 user@home:~/pism$ obj/simpleI
00024 Enter  m, x, y  separated by space (or newline);
00025     (units: pure, pure, km, km; e.g. 10 100 40):
00026 10 100 40
00027 
00028 Results from Test I:
00029   bed =  -100.000 (m)     tau_c =     17.854 (kPa)
00030   u   =   252.126 (m/a)   v     =      0.000 (m/a)
00031 
00032 */
00033 
00034 #include <stdio.h>
00035 #include "exactTestsIJ.h"
00036 
00037 int main() {
00038 
00039   double m, x, y, bed, tauc, u, v;
00040   int    scanret;
00041   const double secpera=31556926.0;  /* seconds per year; 365.2422 days */
00042   
00043   printf("Enter  m, x, y  separated by space (or newline);\n");
00044   printf("    (units: pure, km, km; e.g. 10 100 40):\n");
00045   scanret = scanf("%lf",&m);
00046   if (scanret != 1) {
00047     printf("... input error; exiting\n"); 
00048     return 1;
00049   }
00050   scanret = scanf("%lf",&x);
00051   if (scanret != 1) {
00052     printf("... input error; exiting\n"); 
00053     return 1;
00054   }
00055   scanret = scanf("%lf",&y);
00056   if (scanret != 1) {
00057     printf("... input error; exiting\n"); 
00058     return 1;
00059   }
00060 
00061   exactI(m,x*1000.0,y*1000.0, &bed, &tauc, &u, &v);
00062 
00063   printf("\nResults from Test I:\n");
00064   printf("  bed = %9.3f (m)     tau_c = %10.3f (kPa)\n",bed,tauc/1000.0);
00065   printf("  u   = %9.3f (m/a)   v     = %10.3f (m/a)\n",u*secpera,v*secpera);
00066 
00067   return 0;
00068 }
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines