Richards
Solving The Richards equation with temporally periodic surface boundary conditions
Functions
io.cc File Reference
#include "io.h"

Go to the source code of this file.

Functions

void print_exit (const char *msg)
 prints a message before quitting the program More...
 
void strip_string (std::string &s)
 removes white space at the beginning and end of a string More...
 
void split_string (char c, std::string &s, std::string &s1, std::string &s2)
 splits a string on the first instance of a specified character More...
 
std::string int_to_string (long i)
 converts an integer into a string
 
void check_file_write (const char *fn)
 checks if a file can be written to
 
void check_file_read (const char *fn)
 checks if a file can be opened for reading More...
 
std::vector< std::vector< std::string > > read_values (const char *fn)
 reads a settings file into a vector of vectors of strings More...
 

Function Documentation

◆ check_file_read()

void check_file_read ( const char *  fn)

checks if a file can be opened for reading

Parameters
[in]fnpath to file to check

Definition at line 62 of file io.cc.

◆ print_exit()

void print_exit ( const char *  msg)

prints a message before quitting the program

Parameters
[in]msga string to print before exiting

Definition at line 5 of file io.cc.

◆ read_values()

std::vector< std::vector< std::string > > read_values ( const char *  fn)

reads a settings file into a vector of vectors of strings

Parameters
[in]fnpath to settings file

Definition at line 72 of file io.cc.

◆ split_string()

void split_string ( char  c,
std::string &  s,
std::string &  s1,
std::string &  s2 
)

splits a string on the first instance of a specified character

Parameters
[in]ccharacter to split on
[in]sstring to split
[out]s1first part of split string
[out]s2second part of split string

Definition at line 27 of file io.cc.

◆ strip_string()

void strip_string ( std::string &  s)

removes white space at the beginning and end of a string

Parameters
[in]sstring to strip of white space

Definition at line 16 of file io.cc.