LILAC
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions | Variables
defs.hpp File Reference
#include <complex>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <memory>
Include dependency graph for defs.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  _fatal
class  _warning

Typedefs

typedef std::complex< double > comp

Functions

void err (std::string message, std::string function, std::string file, _fatal f)
void err (std::string message, std::string function, std::string file, _warning w)
void err (std::string message, std::string function, std::string file, const item *p, _fatal f)
void err (std::string message, std::string function, std::string file, const item *p, _warning f)
void err (std::string message, std::string function, std::string file, std::shared_ptr< item > p, _fatal f)
void err (std::string message, std::string function, std::string file, std::shared_ptr< item > p, _warning f)
void trim (std::string &curline, const std::string &val="\n\r\t ")
void ltoken (std::string &tok, std::string &str, std::string delim=" ")
std::string get_unique_name (std::string base="")

Variables

static const comp Id = comp(0, 1)
constexpr double D = -.4
constexpr double K = (.1)
constexpr double A = (2.0/3.0)
constexpr double B = (1.0/3.0)
constexpr double tau = (.1)
constexpr double Gamma = (.1)
constexpr double RTlength = (1.5)
constexpr double PI = (3.14159)
static const _fatal FATAL_ERROR
static const _warning WARNING

Typedef Documentation

typedef std::complex<double> comp

Definition at line 53 of file defs.hpp.

Function Documentation

void err ( std::string  message,
std::string  function,
std::string  file,
_fatal  f 
)

Throws a fatal error, and prints the message, function name, and file name. Afterwards, program exits. err("something failed", "some_func", "folder/some_file.cpp", FATAL_ERROR)–>

A fatal error has occured in functions some_func in file "folder/some_file.cpp" Error message is: Something failed Exiting program

Definition at line 37 of file utils.cpp.

Here is the caller graph for this function:

void err ( std::string  message,
std::string  function,
std::string  file,
_warning  w 
)

Throws a warning, and prints the message, function name, and file name. Afterwards, program continues. err("something failed", "some_func", "folder/some_file.cpp", WARNING)–>

A non-fatal error has occured in functions some_func in file "folder/some_file.cpp" Error message is: Something failed

Definition at line 54 of file utils.cpp.

void err ( std::string  message,
std::string  function,
std::string  file,
const item p,
_fatal  f 
)

Definition at line 58 of file utils.cpp.

Here is the call graph for this function:

void err ( std::string  message,
std::string  function,
std::string  file,
const item p,
_warning  f 
)

Definition at line 65 of file utils.cpp.

Here is the call graph for this function:

void err ( std::string  message,
std::string  function,
std::string  file,
std::shared_ptr< item p,
_fatal  f 
)

Definition at line 71 of file utils.cpp.

void err ( std::string  message,
std::string  function,
std::string  file,
std::shared_ptr< item p,
_warning  f 
)

Definition at line 78 of file utils.cpp.

std::string get_unique_name ( std::string  base)

Returns a name that has not been created previously be the function, and should not exist in the engine Will almost certainly not be human-readable or printable on a terminal

Parameters
baseThe base string with which to generate the new name
Returns
A unique name

Definition at line 227 of file utils.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ltoken ( std::string tok,
std::string str,
std::string  delim = " " 
)

Definition at line 189 of file utils.cpp.

Here is the caller graph for this function:

void trim ( std::string curline,
const std::string val 
)

Trims specified characters from beginning and end of string " \n \r stuff-we want \t " –> "stuff we want"

Parameters
curlineThe string to be trimmed. Is modified by the function.
valThe characters to be trimmed, are whitespace by default

Definition at line 164 of file utils.cpp.

Here is the caller graph for this function:

Variable Documentation

constexpr double A = (2.0/3.0)

Definition at line 63 of file defs.hpp.

constexpr double B = (1.0/3.0)

Definition at line 64 of file defs.hpp.

constexpr double D = -.4

Definition at line 61 of file defs.hpp.

const _fatal FATAL_ERROR
static

Definition at line 78 of file defs.hpp.

constexpr double Gamma = (.1)

Definition at line 66 of file defs.hpp.

const comp Id = comp(0, 1)
static

Definition at line 55 of file defs.hpp.

constexpr double K = (.1)

Definition at line 62 of file defs.hpp.

constexpr double PI = (3.14159)

Definition at line 68 of file defs.hpp.

constexpr double RTlength = (1.5)

Definition at line 67 of file defs.hpp.

constexpr double tau = (.1)

Definition at line 65 of file defs.hpp.

const _warning WARNING
static

Definition at line 79 of file defs.hpp.