PISM, A Parallel Ice Sheet Model
stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
src
verification
tests
exactTestK.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2007-2011, 2016 Ed Bueler and Constantine Khroulev
3
4
This file is part of PISM.
5
6
PISM is free software; you can redistribute it and/or modify it under the
7
terms of the GNU General Public License as published by the Free Software
8
Foundation; either version 3 of the License, or (at your option) any later
9
version.
10
11
PISM is distributed in the hope that it will be useful, but WITHOUT ANY
12
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
details.
15
16
You should have received a copy of the GNU General Public License
17
along with PISM; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef __exactTestK_h
22
#define __exactTestK_h 1
23
24
#ifdef __cplusplus
25
extern
"C"
26
{
27
#endif
28
29
/*
30
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
! This a C implementation of an exact solution to a time-dependent
32
! pure conduction problem in a column of ice and bedrock in the preprint
33
!
34
! Ed Bueler (2007). "An exact solution to the temperature
35
! equation in a column of ice and bedrock", preprint arXiv:0710.1314
36
!
37
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
38
*/
39
40
struct
TestKParameters
{
41
int
error_code
;
42
double
T
,
F
;
43
};
44
45
/* compute the exact solution TT = T(t,z); returns 0 for z >= -1000 m but returns
46
1 for z < -1000 m because eigenfunction is not valid there;
47
normally use bedrockIsIce_p = 0 (false); also returns heat flux
48
FF = - k \partial T / \partial z
49
where k = k_ice for z>0 and k=k_bed for z<=0; note the z=0 value is bedrock */
50
struct
TestKParameters
exactK
(double t, double z, int bedrock_is_ice);
51
52
/* find the alpha_k values for the eigenfunction expansion in the exact
53
solution; these values are found by rigorous (bracketed) numerical
54
solution of a one-variable root-finding problem */
55
int
print_alpha_k
(
const
int
N);
56
57
#ifdef __cplusplus
58
}
59
#endif
60
61
62
#endif
/* __exactTestK_h */
63
exactK
struct TestKParameters exactK(double t, double z, int bedrock_is_ice)
Definition:
exactTestK.c:129
print_alpha_k
int print_alpha_k(const int N)
Definition:
exactTestK.c:155
TestKParameters::F
double F
Definition:
exactTestK.h:42
TestKParameters::error_code
int error_code
Definition:
exactTestK.h:41
TestKParameters::T
double T
Definition:
exactTestK.h:42
TestKParameters
Definition:
exactTestK.h:40
Generated by
1.9.1