PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
pism::energy::tempSystemCtx Class Reference

Tridiagonal linear system for vertical column of temperature-based conservation of energy problem. More...

#include <tempSystem.hh>

+ Inheritance diagram for pism::energy::tempSystemCtx:

Public Member Functions

 tempSystemCtx (const std::vector< double > &storage_grid, const std::string &prefix, double dx, double dy, double dt, const Config &config, const array::Array3D &T3, const array::Array3D &u3, const array::Array3D &v3, const array::Array3D &w3, const array::Array3D &strain_heating3)
 
void initThisColumn (int i, int j, bool is_marginal, MaskValue new_mask, double ice_thickness)
 
void setSurfaceBoundaryValuesThisColumn (double my_Ts)
 
void setBasalBoundaryValuesThisColumn (double my_G0, double my_Tshelfbase, double my_Rb)
 
void solveThisColumn (std::vector< double > &x)
 
double lambda () const
 
double w (int k)
 
- Public Member Functions inherited from pism::columnSystemCtx
 columnSystemCtx (const std::vector< double > &storage_grid, const std::string &prefix, double dx, double dy, double dt, const array::Array3D &u3, const array::Array3D &v3, const array::Array3D &w3)
 A column system is a kind of a tridiagonal system. More...
 
 ~columnSystemCtx ()
 
void save_to_file (const std::vector< double > &x)
 Write system matrix, right-hand-side, and (provided) solution into Python script. Constructs file name from m_prefix. More...
 
void save_to_file (const std::string &filename, const std::vector< double > &x)
 
unsigned int ks () const
 
double dz () const
 
const std::vector< double > & z () const
 
void fine_to_coarse (const std::vector< double > &fine, int i, int j, array::Array3D &coarse) const
 

Protected Attributes

double m_ice_density
 
double m_ice_c
 
double m_ice_k
 
const array::Array3Dm_T3
 
const array::Array3Dm_strain_heating3
 
std::vector< double > m_T
 
std::vector< double > m_strain_heating
 
std::vector< double > m_T_n
 
std::vector< double > m_T_e
 
std::vector< double > m_T_s
 
std::vector< double > m_T_w
 
double m_lambda
 
double m_Ts
 
double m_G0
 
double m_Tshelfbase
 
double m_Rb
 
MaskValue m_mask
 
bool m_is_marginal
 
double m_nu
 
double m_rho_c_I
 
double m_iceK
 
double m_iceR
 
- Protected Attributes inherited from pism::columnSystemCtx
TridiagonalSystemm_solver
 
ColumnInterpolationm_interp
 
unsigned int m_ks
 current system size; corresponds to the highest vertical level within the ice More...
 
int m_i
 current column indexes More...
 
int m_j
 
double m_dx
 
double m_dy
 
double m_dz
 
double m_dt
 
std::vector< double > m_u
 u-component of the ice velocity More...
 
std::vector< double > m_v
 v-component of the ice velocity More...
 
std::vector< double > m_w
 w-component of the ice velocity More...
 
std::vector< double > m_z
 levels of the fine vertical grid More...
 
const array::Array3Dm_u3
 pointers to 3D velocity components More...
 
const array::Array3Dm_v3
 
const array::Array3Dm_w3
 

Private Member Functions

double compute_lambda ()
 

Private Attributes

bool m_surfBCsValid
 
bool m_basalBCsValid
 

Additional Inherited Members

- Protected Member Functions inherited from pism::columnSystemCtx
void init_column (int i, int j, double ice_thickness)
 
void reportColumnZeroPivotErrorMFile (unsigned int M)
 Write system matrix and right-hand-side into an Python script. The file name contains ZERO_PIVOT_ERROR. More...
 
void init_fine_grid (const std::vector< double > &storage_grid)
 
void coarse_to_fine (const array::Array3D &coarse, int i, int j, double *fine) const
 

Detailed Description

Tridiagonal linear system for vertical column of temperature-based conservation of energy problem.

Call sequence like this:

foo.dx = ... // set public constants
foo.u = ... // set public pointers
foo.initAllColumns();
for (j in ownership) {
for (i in ownership) {
ks = ...
foo.setIndicesThisColumn(i,j,ks);
[COMPUTE OTHER PARAMS]
foo.setSchemeParamsThisColumn(mask,isMarginal,lambda);
foo.setSurfaceBoundaryValuesThisColumn(Ts);
foo.setBasalBoundaryValuesThisColumn(Ghf,Tshelfbase,Rb);
foo.solveThisColumn(x);
}
}
unsigned int ks() const
tempSystemCtx(const std::vector< double > &storage_grid, const std::string &prefix, double dx, double dy, double dt, const Config &config, const array::Array3D &T3, const array::Array3D &u3, const array::Array3D &v3, const array::Array3D &w3, const array::Array3D &strain_heating3)
Definition: tempSystem.cc:30
const double Ts
Definition: exactTestK.c:39

Definition at line 49 of file tempSystem.hh.


The documentation for this class was generated from the following files: