|
PISM, A Parallel Ice Sheet Model
stable v0.5
|
00001 // Copyright (C) 2007-2012 Ed Bueler and Constantine Khroulev 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 __icePSTexModel_hh 00020 #define __icePSTexModel_hh 00021 00022 #include <petsc.h> 00023 00024 #include "basal_resistance.hh" 00025 #include "iceEISModel.hh" 00026 #include "PISMMohrCoulombYieldStress.hh" 00027 00028 class DiagnosticTimeseries; 00029 00031 00041 class IcePSTexModel : public IceEISModel { 00042 00043 public: 00044 IcePSTexModel(IceGrid &g, NCConfigVariable &conf, NCConfigVariable &conf_overrides); 00045 virtual ~IcePSTexModel(); 00046 virtual PetscErrorCode setFromOptions(); 00047 virtual PetscErrorCode allocate_basal_yield_stress(); 00048 virtual PetscErrorCode allocate_stressbalance(); 00049 virtual PetscErrorCode initFromFile(string fname); 00050 virtual PetscErrorCode set_vars_from_options(); 00051 virtual PetscErrorCode additionalAtEndTimestep(); 00052 00053 protected: 00054 char exper_chosen_name[10]; 00055 int exper_chosen; 00056 00057 PetscErrorCode setBedElev(); 00058 00059 // PST scalar diagnostic series 00060 PetscErrorCode prepare_series(); 00061 char seriesname[PETSC_MAX_PATH_LEN]; // file name: "ser_pst_foo.nc" if "-o foo.nc" 00062 DiagnosticTimeseries 00063 *ivol, *iarea, // ice vol and area; mildly redundant 00064 *dt_ser, // time step; mildly redundant 00065 *maxcbar, // max speed anywhere 00066 *avup0, *avup1, *avup2, *avup3, // upstream speeds; avup3 not written for P3 00067 *avdwn0, *avdwn1, *avdwn2, *avdwn3; // downstream speeds; avdwn3 DITTO 00068 }; 00069 00070 class PSTYieldStress : public PISMMohrCoulombYieldStress 00071 { 00072 public: 00073 PSTYieldStress(IceGrid &g, const NCConfigVariable &conf, int e, string name) 00074 : PISMMohrCoulombYieldStress(g, conf), 00075 experiment(e), experiment_name(name) {} 00076 virtual ~PSTYieldStress() {} 00077 00078 virtual PetscErrorCode init(PISMVars &vars); 00079 protected: 00080 int experiment; 00081 string experiment_name; 00082 PetscErrorCode init_till_phi(); 00083 PetscScalar phiLocal(const PetscScalar width, 00084 const PetscScalar x, const PetscScalar y, 00085 const PetscScalar STRONG, const PetscScalar UP, const PetscScalar DOWN); 00086 int sectorNumberP2(const PetscScalar x, const PetscScalar y); 00087 }; 00088 00089 #endif /* __icePSTexModel_hh */ 00090
1.7.5.1