PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Namespaces | Classes | Enumerations | Functions
pism::array Namespace Reference

Namespaces

 details
 

Classes

class  AccessScope
 Makes sure that we call begin_access() and end_access() for all accessed array::Arrays. More...
 
class  Array
 Abstract class for reading, writing, allocating, and accessing a DA-based PETSc Vec (2D and 3D fields) from within IceModel. More...
 
class  Array2D
 A storage vector combining related fields in a struct. More...
 
class  Array3D
 A virtual class collecting methods common to ice and bedrock 3D fields. More...
 
class  CellType
 "Cell type" mask. Adds convenience methods to array::Scalar. More...
 
class  CellType1
 
class  CellType2
 
class  Forcing
 2D time-dependent inputs (for climate forcing, etc) More...
 
class  Scalar
 
class  Scalar1
 
class  Scalar2
 
class  Staggered
 A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage. This class is identical to array::Vector, except that components are not called u and v (to avoid confusion). More...
 
class  Staggered1
 
class  Vector
 
class  Vector1
 
class  Vector2
 

Enumerations

enum  Kind { WITHOUT_GHOSTS =0 , WITH_GHOSTS =1 }
 What "kind" of a vector to create: with or without ghosts. More...
 

Functions

void global_to_local (petsc::DM &dm, Vec source, Vec destination)
 
static NormType int_to_normtype (int input)
 
void set_default_value_or_stop (const std::string &filename, const VariableMetadata &variable, io::Default default_value, const Logger &log, Vec output)
 
static std::array< double, 2 > compute_range (MPI_Comm com, const double *data, size_t data_size)
 
template<class F , typename T >
interpolate (const F &field, double x, double y)
 
template<class T >
static std::shared_ptr< T > cast (std::shared_ptr< Array > input)
 std::dynamic_pointer_cast wrapper that checks if the cast succeeded. More...
 
void extract_surface (const Array3D &data, double z, Scalar &output)
 Copies a horizontal slice at level z of an Array3D into output. More...
 
void extract_surface (const Array3D &data, const Scalar &z, Scalar &output)
 
void sum_columns (const Array3D &data, double A, double B, Scalar &output)
 
void compute_magnitude (const array::Vector &input, array::Scalar &result)
 
void apply_mask (const array::Scalar &M, double fill, array::Scalar &result)
 Masks out all the areas where \( M \le 0 \) by setting them to fill. More...
 
double diff_x (const array::Scalar &array, int i, int j)
 Returns the x-derivative at i,j approximated using centered finite differences. More...
 
double diff_y (const array::Scalar &array, int i, int j)
 Returns the y-derivative at i,j approximated using centered finite differences. More...
 
double diff_x_p (const array::Scalar &array, int i, int j)
 Returns the x-derivative at i,j approximated using centered finite differences. Respects grid periodicity and uses one-sided FD at grid edges if necessary. More...
 
double diff_y_p (const array::Scalar &array, int i, int j)
 Returns the y-derivative at i,j approximated using centered finite differences. Respects grid periodicity and uses one-sided FD at grid edges if necessary. More...
 
double sum (const array::Scalar &input)
 Sums up all the values in an array::Scalar object. Ignores ghosts. More...
 
double max (const array::Scalar &input)
 Finds maximum over all the values in an array::Scalar object. Ignores ghosts. More...
 
double absmax (const array::Scalar &input)
 Finds maximum over all the absolute values in an array::Scalar object. Ignores ghosts. More...
 
double min (const array::Scalar &input)
 Finds minimum over all the values in an array::Scalar object. Ignores ghosts. More...
 
std::array< double, 2 > absmax (const array::Staggered &input)
 
void staggered_to_regular (const array::CellType1 &cell_type, const array::Staggered1 &input, bool include_floating_ice, array::Scalar &result)
 
void staggered_to_regular (const array::CellType1 &cell_type, const array::Staggered1 &input, bool include_floating_ice, array::Vector &result)