utilities.hh (2707B)
1 /* Copyright (C) 2016, 2018 PISM Authors 2 * 3 * This file is part of PISM. 4 * 5 * PISM is free software; you can redistribute it and/or modify it under the 6 * terms of the GNU General Public License as published by the Free Software 7 * Foundation; either version 3 of the License, or (at your option) any later 8 * version. 9 * 10 * PISM is distributed in the hope that it will be useful, but WITHOUT ANY 11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 * details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with PISM; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef UTILITIES_H 21 #define UTILITIES_H 22 23 namespace pism { 24 25 class IceModelVec2S; 26 class IceModelVec3; 27 28 namespace energy { 29 30 void compute_temperature(const IceModelVec3 &enthalpy, 31 const IceModelVec2S &ice_thickness, 32 IceModelVec3 &result); 33 34 void compute_enthalpy(const IceModelVec3 &temperature, 35 const IceModelVec3 &liquid_water_fraction, 36 const IceModelVec2S &ice_thickness, 37 IceModelVec3 &result); 38 39 void compute_enthalpy_cold(const IceModelVec3 &temperature, 40 const IceModelVec2S &ice_thickness, 41 IceModelVec3 &result); 42 43 void compute_liquid_water_fraction(const IceModelVec3 &enthalpy, 44 const IceModelVec2S &ice_thickness, 45 IceModelVec3 &result); 46 47 void compute_cts(const IceModelVec3 &enthalpy, 48 const IceModelVec2S &ice_thickness, 49 IceModelVec3 &result); 50 51 double total_ice_enthalpy(double thickness_threshold, 52 const IceModelVec3 &ice_enthalpy, 53 const IceModelVec2S &ice_thickness); 54 55 void bootstrap_ice_temperature(const IceModelVec2S &ice_thickness, 56 const IceModelVec2S &ice_surface_temp, 57 const IceModelVec2S &surface_mass_balance, 58 const IceModelVec2S &basal_heat_flux, 59 IceModelVec3 &result); 60 61 void bootstrap_ice_enthalpy(const IceModelVec2S &ice_thickness, 62 const IceModelVec2S &ice_surface_temp, 63 const IceModelVec2S &surface_mass_balance, 64 const IceModelVec2S &basal_heat_flux, 65 IceModelVec3 &result); 66 67 } // end of namespace energy 68 } // end of namespace pism 69 70 #endif /* UTILITIES_H */