|
PISM, A Parallel Ice Sheet Model stable 0.4.1779
|
00001 // Copyright (C) 2010, 2011 Constantine Khroulev and 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 _PISMSTRESSBALANCE_H_ 00020 #define _PISMSTRESSBALANCE_H_ 00021 00022 #include "PISMComponent.hh" 00023 #include "iceModelVec.hh" 00024 #include "ShallowStressBalance.hh" 00025 #include "SSB_Modifier.hh" 00026 #include "PISMDiagnostic.hh" 00027 #include "PISMOcean.hh" 00028 00030 class PISMStressBalance : public PISMComponent_Diag 00031 { 00032 friend class PSB_taud_mag; 00033 public: 00034 PISMStressBalance(IceGrid &g, ShallowStressBalance *sb, SSB_Modifier *ssb_mod, 00035 PISMOceanModel *ocean, const NCConfigVariable &config); 00036 virtual ~PISMStressBalance(); 00037 00039 virtual PetscErrorCode init(PISMVars &vars); 00040 00043 00046 virtual void add_vars_to_output(string keyword, set<string> &result); 00047 00049 virtual PetscErrorCode write_variables(set<string> vars, string filename); 00050 00052 00055 virtual PetscErrorCode set_boundary_conditions(IceModelVec2Int &locations, 00056 IceModelVec2V &velocities); 00057 00058 virtual PetscErrorCode set_basal_melt_rate(IceModelVec2S *bmr); 00059 00062 virtual PetscErrorCode update(bool fast); 00063 00065 virtual PetscErrorCode get_advective_2d_velocity(IceModelVec2V* &result); 00066 00068 virtual PetscErrorCode get_diffusive_flux(IceModelVec2Stag* &result); 00069 00071 virtual PetscErrorCode get_max_diffusivity(PetscReal &D); 00072 00074 virtual PetscErrorCode get_max_2d_velocity(PetscReal &u, PetscReal &v); 00075 00076 // for the energy/age time step: 00077 00079 virtual PetscErrorCode get_3d_velocity(IceModelVec3* &u, IceModelVec3* &v, IceModelVec3* &w); 00081 virtual PetscErrorCode get_max_3d_velocity(PetscReal &u, PetscReal &v, PetscReal &w); 00083 virtual PetscErrorCode get_basal_frictional_heating(IceModelVec2S* &result); 00084 00085 virtual PetscErrorCode get_volumetric_strain_heating(IceModelVec3* &result); 00086 00087 // for the calving, etc.: 00088 00090 virtual PetscErrorCode get_principal_strain_rates( 00091 IceModelVec2S &result_e1, IceModelVec2S &result_e2); 00092 00094 virtual PetscErrorCode stdout_report(string &result); 00095 00097 virtual PetscErrorCode extend_the_grid(PetscInt old_Mz); 00098 00099 virtual void get_diagnostics(map<string, PISMDiagnostic*> &/*dict*/); 00100 00102 virtual ShallowStressBalance* get_stressbalance() 00103 { return stress_balance; } 00104 00106 virtual SSB_Modifier* get_ssb_modifier() 00107 { return modifier; } 00108 protected: 00109 virtual PetscErrorCode allocate(); 00110 virtual PetscErrorCode compute_vertical_velocity( 00111 IceModelVec3 *u, IceModelVec3 *v, IceModelVec2S *bmr, 00112 IceModelVec3 &result); 00113 00114 PISMVars *variables; 00115 00116 IceModelVec3 w; 00117 PetscReal w_max; 00118 IceModelVec2S *basal_melt_rate; 00119 00120 ShallowStressBalance *stress_balance; 00121 SSB_Modifier *modifier; 00122 PISMOceanModel *ocean; 00123 }; 00124 00125 #endif /* _PISMSTRESSBALANCE_H_ */ 00126
1.7.3