20 #ifndef PISM_ARRAY3D_H
21 #define PISM_ARRAY3D_H
23 #include "pism/util/array/Array.hh"
38 const std::string &name,
40 const std::vector<double> &
levels,
50 void set_column(
int i,
int j,
const double *input);
High-level PISM I/O class.
void copy_from(const Array3D &input)
double interpolate(int i, int j, double z) const
Return value of scalar quantity at level z (m) above base of ice (by linear interpolation).
virtual ~Array3D()=default
void set_column(int i, int j, double c)
Set all values of scalar quantity to given a single value in a particular column.
void regrid_impl(const File &file, io::Default default_value)
Gets an Array from a file file, interpolating onto the current grid.
Array3D(std::shared_ptr< const Grid > grid, const std::string &name, Kind ghostedp, const std::vector< double > &levels, unsigned int stencil_width=1)
std::shared_ptr< Array3D > duplicate(Kind ghostedp=WITHOUT_GHOSTS) const
double * get_column(int i, int j)
A virtual class collecting methods common to ice and bedrock 3D fields.
const std::vector< double > & levels() const
std::shared_ptr< const Grid > grid() const
unsigned int stencil_width() const
Get the stencil width of the current Array. Returns 0 if ghosts are not available.
Abstract class for reading, writing, allocating, and accessing a DA-based PETSc Vec (2D and 3D fields...
void extract_surface(const Array3D &data, double z, Scalar &output)
Copies a horizontal slice at level z of an Array3D into output.
void sum_columns(const Array3D &data, double A, double B, Scalar &output)
Kind
What "kind" of a vector to create: with or without ghosts.