PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Namespaces | Macros | Functions | Variables
pism_utilities.cc File Reference
#include "pism/util/pism_utilities.hh"
#include <cstdarg>
#include <sstream>
#include <cstdio>
#include <cassert>
#include <mpi.h>
#include <fftw3.h>
#include <gsl/gsl_version.h>
#include <hdf5.h>
#include "pism/pism_config.hh"
#include <netcdf.h>
#include <petsctime.h>
#include <cstdlib>
#include "pism/util/error_handling.hh"

Go to the source code of this file.

Namespaces

 pism
 

Macros

#define MPI_INCLUDED   1
 

Functions

std::string pism::string_strip (const std::string &input)
 
bool pism::ends_with (const std::string &str, const std::string &suffix)
 Returns true if str ends with suffix and false otherwise. More...
 
template<class T >
std::string pism::join_impl (const T &input, const std::string &separator)
 
std::string pism::join (const std::vector< std::string > &strings, const std::string &separator)
 Concatenate strings, inserting separator between elements. More...
 
std::string pism::set_join (const std::set< std::string > &input, const std::string &separator)
 
std::string pism::replace_character (const std::string &input, char from, char to)
 
std::vector< std::string > pism::split (const std::string &input, char separator)
 Transform a separator-separated list (a string) into a vector of strings. More...
 
std::set< std::string > pism::set_split (const std::string &input, char separator)
 Transform a separator-separated list (a string) into a set of strings. More...
 
bool pism::is_increasing (const std::vector< double > &a)
 Checks if a vector of doubles is strictly increasing. More...
 
bool pism::member (const std::string &string, const std::set< std::string > &set)
 
void pism::GlobalReduce (MPI_Comm comm, double *local, double *result, int count, MPI_Op op)
 
void pism::GlobalReduce (MPI_Comm comm, int *local, int *result, int count, MPI_Op op)
 
void pism::GlobalMin (MPI_Comm comm, double *local, double *result, int count)
 
void pism::GlobalMax (MPI_Comm comm, double *local, double *result, int count)
 
void pism::GlobalMax (MPI_Comm comm, int *local, int *result, int count)
 
void pism::GlobalSum (MPI_Comm comm, double *local, double *result, int count)
 
void pism::GlobalSum (MPI_Comm comm, int *local, int *result, int count)
 
unsigned int pism::GlobalSum (MPI_Comm comm, unsigned int input)
 
int pism::GlobalSum (MPI_Comm comm, int input)
 
double pism::GlobalMin (MPI_Comm comm, double local)
 
double pism::GlobalMax (MPI_Comm comm, double local)
 
double pism::GlobalSum (MPI_Comm comm, double local)
 
std::string pism::version ()
 
double pism::wall_clock_hours (MPI_Comm com, double start_time)
 Return time since the beginning of the run, in hours. More...
 
std::string pism::timestamp (MPI_Comm com)
 Creates a time-stamp used for the history NetCDF attribute. More...
 
std::string pism::username_prefix (MPI_Comm com)
 Creates a string with the user name, hostname and the time-stamp (for history strings). More...
 
std::string pism::args_string ()
 Uses argc and argv to create the string with current PISM command-line arguments. More...
 
std::string pism::filename_add_suffix (const std::string &filename, const std::string &separator, const std::string &suffix)
 Adds a suffix to a filename. More...
 
double pism::get_time (MPI_Comm comm)
 
std::string pism::printf (const char *format,...)
 
void pism::validate_format_string (const std::string &format)
 
double pism::vector_min (const std::vector< double > &input)
 
double pism::vector_max (const std::vector< double > &input)
 
uint64_t pism::fletcher64 (const uint32_t *data, size_t length)
 
void pism::print_checksum (MPI_Comm com, const std::vector< double > &data, const char *label)
 
void pism::print_vector (MPI_Comm com, const std::vector< double > &data, const char *label)
 
void pism::print_vector (MPI_Comm com, const std::vector< int > &data, const char *label)
 
double pism::average_water_column_pressure (double ice_thickness, double bed, double floatation_level, double rho_ice, double rho_water, double g)
 
double pism::parse_number (const std::string &input)
 
long int pism::parse_integer (const std::string &input)
 

Variables

static const int pism::TEMPORARY_STRING_LENGTH = 32768