PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
Namespaces | Macros | Functions
pism_utilities.hh File Reference
#include <cstdint>
#include <algorithm>
#include <set>
#include <string>
#include <vector>
#include <mpi.h>

Go to the source code of this file.

Namespaces

 pism
 

Macros

#define __attribute__(x)   /* nothing */
 

Functions

double pism::average_water_column_pressure (double ice_thickness, double bed, double floatation_level, double rho_ice, double rho_water, double g)
 
double pism::get_time (MPI_Comm comm)
 
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::wall_clock_hours (MPI_Comm com, double start_time)
 Return time since the beginning of the run, in hours. More...
 
bool pism::is_increasing (const std::vector< double > &a)
 Checks if a vector of doubles is strictly increasing. More...
 
bool pism::ends_with (const std::string &str, const std::string &suffix)
 Returns true if str ends with suffix and false otherwise. More...
 
std::string pism::string_strip (const std::string &input)
 
std::string pism::join (const std::vector< std::string > &strings, const std::string &separator)
 Concatenate strings, inserting separator between elements. More...
 
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...
 
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)
 
bool pism::member (const std::string &string, const std::set< std::string > &set)
 
template<typename T >
pism::combine (const T &a, const T &b)
 
template<typename T >
pism::clip (T x, T a, T b)
 
double pism::vector_min (const std::vector< double > &input)
 
double pism::vector_max (const std::vector< double > &input)
 
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)
 
double pism::GlobalMin (MPI_Comm comm, double local)
 
double pism::GlobalMax (MPI_Comm comm, double local)
 
double pism::GlobalSum (MPI_Comm comm, double local)
 
unsigned int pism::GlobalSum (MPI_Comm comm, unsigned int input)
 
int pism::GlobalSum (MPI_Comm comm, int input)
 
std::string pism::version ()
 
std::string pism::printf (const char *format,...)
 
void pism::validate_format_string (const std::string &format)
 
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::parse_number (const std::string &input)
 
long int pism::parse_integer (const std::string &input)