PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
Classes | Namespaces | Functions
Grid.cc File Reference
#include <cassert>
#include <array>
#include <gsl/gsl_interp.h>
#include <map>
#include <numeric>
#include <petscsys.h>
#include "pism/util/ConfigInterface.hh"
#include "pism/util/Grid.hh"
#include "pism/util/error_handling.hh"
#include "pism/pism_config.hh"
#include "pism/util/Context.hh"
#include "pism/util/Logger.hh"
#include "pism/util/Vars.hh"
#include "pism/util/io/File.hh"
#include "pism/util/petscwrappers/DM.hh"
#include "pism/util/projection.hh"
#include "pism/util/pism_options.hh"
#include "pism/util/pism_utilities.hh"
#include "pism/util/io/IO_Flags.hh"

Go to the source code of this file.

Classes

struct  pism::Grid::Impl
 Internal structures of Grid. More...
 
struct  pism::OwnershipRanges
 

Namespaces

 pism
 
 pism::grid
 

Functions

static std::shared_ptr< Grid > pism::Grid_FromFile (std::shared_ptr< const Context > ctx, const File &file, const std::string &var_name, grid::Registration r)
 Create a grid from a file, get information from variable var_name. More...
 
static void pism::compute_nprocs (unsigned int Mx, unsigned int My, unsigned int size, unsigned int &Nx, unsigned int &Ny)
 Computes the number of processors in the X- and Y-directions. More...
 
static std::vector< unsigned int > pism::ownership_ranges (unsigned int Mx, unsigned int Nx)
 Computes processor ownership ranges corresponding to equal area distribution among processors. More...
 
static OwnershipRanges pism::compute_ownership_ranges (unsigned int Mx, unsigned int My, unsigned int size)
 
static double pism::compute_horizontal_spacing (double half_width, unsigned int M, bool cell_centered)
 Compute horizontal grid spacing. See compute_horizontal_coordinates() for more. More...
 
static std::vector< double > pism::compute_coordinates (unsigned int M, double delta, double v_min, double v_max, bool cell_centered)
 Compute grid coordinates for one direction (X or Y). More...
 
std::vector< double > pism::grid::compute_vertical_levels (double new_Lz, unsigned int new_Mz, grid::VerticalSpacing spacing, double lambda)
 Set the vertical levels in the ice according to values in Mz (number of levels), Lz (domain height), spacing (quadratic or equal) and lambda (quadratic spacing parameter). More...
 
Periodicity pism::grid::string_to_periodicity (const std::string &keyword)
 Convert a string to Periodicity. More...
 
std::string pism::grid::periodicity_to_string (Periodicity p)
 Convert Periodicity to a STL string. More...
 
VerticalSpacing pism::grid::string_to_spacing (const std::string &keyword)
 Convert an STL string to SpacingType. More...
 
std::string pism::grid::spacing_to_string (VerticalSpacing s)
 Convert SpacingType to an STL string. More...
 
Registration pism::grid::string_to_registration (const std::string &keyword)
 
std::string pism::grid::registration_to_string (Registration registration)
 
double pism::grid::radius (const Grid &grid, int i, int j)
 Returns the distance from the point (i,j) to the origin. More...