BG_Flood  0.8
Documentation (Work-in-progress)
ReadInput.h File Reference
#include "General.h"
#include "Param.h"
#include "Write_txtlog.h"
#include "Forcing.h"
#include "Util_CPU.h"
Include dependency graph for ReadInput.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
readfileinfo (std::string input, T outinfo)
 
void Readparamfile (Param &XParam, Forcing< float > &XForcing, std::string Paramfile)
 
template<class T >
Forcing< T > readparamstr (std::string line, Forcing< T > forcing)
 
Param readparamstr (std::string line, Param param)
 
void checkparamsanity (Param &XParam, Forcing< float > &XForcing)
 
double setendtime (Param XParam, Forcing< float > XForcing)
 
std::string findparameter (std::vector< std::string > parameterstr, std::string line)
 
std::string findparameter (std::string parameterstr, std::string line)
 
void split (const std::string &s, char delim, std::vector< std::string > &elems)
 
std::vector< std::string > split (const std::string &s, char delim)
 
std::string trim (const std::string &str, const std::string &whitespace)
 
std::size_t case_insensitive_compare (std::string s1, std::string s2)
 
std::size_t case_insensitive_compare (std::string s1, std::vector< std::string > vecstr)
 
bndparam readbndline (std::string parametervalue)
 

Function Documentation

◆ case_insensitive_compare() [1/2]

std::size_t case_insensitive_compare ( std::string  s1,
std::string  s2 
)

◆ case_insensitive_compare() [2/2]

std::size_t case_insensitive_compare ( std::string  s1,
std::vector< std::string >  vecstr 
)

◆ checkparamsanity()

void checkparamsanity ( Param XParam,
Forcing< float > &  XForcing 
)

Check the Sanity of both Param and Forcing class If required some parameter are infered

◆ findparameter() [1/2]

std::string findparameter ( std::string  parameterstr,
std::string  line 
)

separate parameter from value

◆ findparameter() [2/2]

std::string findparameter ( std::vector< std::string >  parameterstr,
std::string  line 
)

◆ readbndline()

bndparam readbndline ( std::string  parametervalue)

◆ readfileinfo()

template<class T >
T readfileinfo ( std::string  input,
outinfo 
)

convert file name into name and extension This is used for various input classes

template inputmap readfileinfo<inputmap>(std::string input, inputmap outinfo); template forcingmap readfileinfo<forcingmap>(std::string input, forcingmap outinfo); template StaticForcingP<float> readfileinfo<StaticForcingP<float>>(std::string input, StaticForcingP<float> outinfo); template DynForcingP<float> readfileinfo<DynForcingP<float>>(std::string input, DynForcingP<float> outinfo); template deformmap<float> readfileinfo<deformmap<float>>(std::string input, deformmap<float> outinfo);

◆ Readparamfile()

void Readparamfile ( Param XParam,
Forcing< float > &  XForcing,
std::string  Paramfile 
)

◆ readparamstr() [1/2]

template<class T >
Forcing<T> readparamstr ( std::string  line,
Forcing< T >  forcing 
)

Read BG_param.txt line and convert parameter to the righ parameter in the class return an updated Param class

◆ readparamstr() [2/2]

Param readparamstr ( std::string  line,
Param  param 
)

Read BG_param.txt line and convert parameter to the righ parameter in the class retrun an updated Param class

◆ setendtime()

double setendtime ( Param  XParam,
Forcing< float >  XForcing 
)

Calculate/modify endtime based on maximum time in forcing

◆ split() [1/2]

std::vector<std::string> split ( const std::string &  s,
char  delim 
)

split string based in character

◆ split() [2/2]

void split ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)

split string based in character

◆ trim()

std::string trim ( const std::string &  str,
const std::string &  whitespace 
)

remove leading and trailing space in a string