PISM, A Parallel Ice Sheet Model stable 0.4.1779

src/verif/tests/exactTestK.h

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2007-2011 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 #ifndef __exactTestK_h
00022 #define __exactTestK_h 1
00023 
00024 #ifdef __cplusplus
00025 extern "C"
00026 {
00027 #endif
00028 
00029 /*
00030 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00031 ! This a C implementation of an exact solution to a time-dependent
00032 ! pure conduction problem in a column of ice and bedrock in the preprint
00033 !
00034 !    Ed Bueler (2007).  "An exact solution to the temperature 
00035 !    equation in a column of ice and bedrock", preprint arXiv:0710.1314
00036 !
00037 ! See also src/exact/simpleK.c.
00038 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00039 */
00040 
00041 /* compute the exact solution TT = T(t,z); returns 0 for z >= -1000 m but returns
00042    1 for z < -1000 m because eigenfunction is not valid there;
00043    normally use bedrockIsIce_p = 0 (false); also returns heat flux
00044      FF = - k \partial T / \partial z
00045    where k = k_ice for z>0 and k=k_bed for z<=0; note the z=0 value is bedrock */
00046 int exactK(const double t, const double z, double *TT, double *FF, const int bedrockIsIce_p);
00047 
00048 /* find the alpha_k values for the eigenfunction expansion in the exact
00049    solution; these values are found by rigorous (bracketed) numerical 
00050    solution of a one-variable root-finding problem */
00051 int print_alpha_k(const int N);
00052 
00053 #ifdef __cplusplus
00054 }
00055 #endif
00056 
00057 
00058 #endif  /* __exactTestK_h */
00059 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines