|
PISM, A Parallel Ice Sheet Model stable 0.4.1779
|
00001 // Copyright (C) 2007--2009 Ed Bueler 00002 // 00003 // This file is part of PISM. 00004 // 00005 // PISM is free software; you can redistribute it and/or modify it under the 00006 // terms of the GNU General Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or (at your option) any later 00008 // version. 00009 // 00010 // PISM is distributed in the hope that it will be useful, but WITHOUT ANY 00011 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00013 // details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with PISM; if not, write to the Free Software 00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 #ifndef __deformation_hh 00020 #define __deformation_hh 00021 00022 #include "NCVariable.hh" 00023 #include <petscvec.h> 00024 #if (PISM_HAVE_FFTW) 00025 #include <fftw3.h> 00026 #endif 00027 00029 00051 class BedDeformLC { 00052 public: 00053 BedDeformLC(); 00054 ~BedDeformLC(); 00055 PetscErrorCode settings(const NCConfigVariable &config, 00056 PetscTruth myinclude_elastic, 00057 PetscInt myMx, PetscInt myMy, PetscScalar mydx, PetscScalar mydy, 00058 PetscInt myZ, PetscScalar myicerho, 00059 Vec* myHstart, Vec* mybedstart, Vec* myuplift, // initial state 00060 Vec* myH, // generally gets changed by calling program 00061 // before each call to step 00062 Vec* mybed); // mybed gets modified by step() 00063 PetscErrorCode alloc(); 00064 PetscErrorCode uplift_init(); 00065 PetscErrorCode step(const PetscScalar dtyear, const PetscScalar yearFromStart); 00066 00067 protected: 00068 PetscTruth include_elastic; 00069 PetscInt Mx, My; 00070 PetscScalar dx, dy; 00071 PetscInt Z; // factor by which fat FFT domain is larger than 00072 // region of physical interest 00073 PetscScalar icerho, // ice density (for computing load from volume) 00074 rho, // earth density 00075 eta, // mantle viscosity 00076 D; // lithosphere flexural rigidity 00077 00078 private: 00079 PetscScalar standard_gravity; 00080 PetscTruth settingsDone, allocDone; 00081 PetscInt Nx, Ny, // fat sizes 00082 Nxge, Nyge; // fat with boundary sizes 00083 PetscInt i0_plate, j0_plate; // indices into fat array for corner of thin 00084 PetscScalar Lx, Ly; // half-lengths of (thin) physical domain 00085 PetscScalar fatLx, fatLy; // half-lengths of fat computational domain 00086 PetscScalar *cx, *cy; // coeffs of derivs in Fourier space 00087 Vec *H, *bed, *Hstart, *bedstart, *uplift; // pointers to sequential 00088 Vec Hdiff, dbedElastic, // sequential; working space 00089 platefat, plateoffset, // seq and fat 00090 vleft, vright, // coeffs; sequential and fat 00091 lrmE; // load response matrix (elastic); sequential and fat *with* boundary 00092 #if (PISM_HAVE_FFTW) 00093 fftw_complex *bdin, *bdout; // 2D sequential 00094 fftw_plan bdplanfor,bdplanback; 00095 #endif 00096 }; 00097 00098 #endif /* __deformation_hh */ 00099
1.7.3