G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gismo::util Namespace Reference

the gsFuncData is a cache of pre-computed function sets values. More...

Classes

struct  is_complex
 Type trait is_complex<T> checks if type T is of type std::complex<...> More...
 
struct  remove_pointer
 Remove pointer from type. More...
 
struct  type
 Print name of template type as a string. More...
 

Functions

void capitalize (std::string &str)
 Capitalize string in situ.
 
template<class T , class U >
void copy (T begin, T end, U *result)
 Small wrapper for std::copy mimicking std::copy for a raw pointer destination, copies n positions starting from begin into result. The latter is expected to have been allocated in advance.
 
bool ends_with (const std::string &haystack, const std::string &needle)
 Checks if a string haystack ends with the string needle.
 
template<class T1 , class T2 >
bool equal (T1 t1, T2 t2)
 
template<class T1 , class T2 >
bool greater (T1 t1, T2 t2)
 
template<class T1 , class T2 >
bool greater_equal (T1 t1, T2 t2)
 
template<typename T >
size_t hash_range (T const *start, const T *const end)
 Create hash key for a rangle of (integral) numbers.
 
template<class T1 , class T2 >
bool less (T1 t1, T2 t2)
 
template<class T1 , class T2 >
bool less_equal (T1 t1, T2 t2)
 
std::string returnCapitalized (const std::string &str)
 Capitalize string.
 
bool starts_with (const std::string &haystack, const std::string &needle)
 Checks if a string haystack begins with the string needle.
 
double stod (const std::string &str)
 equivalent to std::stod(str)
 
int stoi (const std::string &str)
 equivalent to std::stoi(str), and therefore std::stoi(str, 0, 10)
 
void string_replace (std::string &str, const std::string &oldStr, const std::string &newStr)
 Replaces appearance of oldStr with newStr inside the string str.
 
template<class T >
make_signed< T >::type to_signed (T t)
 Casts a type T to a signed one.
 
template<typename C >
std::string to_string (const C &value)
 Converts value to string, assuming "operator<<" defined on C.
 
template<class T >
make_unsigned< T >::type to_unsigned (T t)
 Casts a type T to an unsigned one.
 

Detailed Description

the gsFuncData is a cache of pre-computed function sets values.

Which data is contained in the gsFuncData is specidied by a flag system. The user must set the flags memeber using a combination of the constants NEED_VALUE, NEED_DERIV, ... then the cache is filled by calling the gsFunctionSet::compute(points, gsFuncData&) where points can either be a gsMatrix<> containing the point coordinates or a gsMapData object.

The row matrix data are public members. There are also accessor functions that provide a per-point view of the data in a different format: each column corresponds to a different function object.

Template Parameters
Tnumeric type

Function Documentation

bool gismo::util::equal ( T1  t1,
T2  t2 
)

Compares two (integer) numbers of even different type. Gets back the correct logical value even for a compare of a negative int with an unsigned. Like in Java or C#.

Returns
t1 == t2
bool gismo::util::greater ( T1  t1,
T2  t2 
)

Compares two (integer) numbers of even different type. Gets back the correct logical value even for a compare of a negative int with an unsigned. Like in Java or C#.

Returns
t1 > t2
bool gismo::util::greater_equal ( T1  t1,
T2  t2 
)

Compares two (integer) numbers of even different type. Gets back the correct logical value even for a compare of a negative int with an unsigned. Like in Java or C#.

Returns
t1 >= t2
bool gismo::util::less ( T1  t1,
T2  t2 
)

Compares two (integer) numbers of even different type. Gets back the correct logical value even for a compare of a negative int with an unsigned. Like in Java or C#.

Returns
t1 < t2
bool gismo::util::less_equal ( T1  t1,
T2  t2 
)

Compares two (integer) numbers of even different type. Gets back the correct logical value even for a compare of a negative int with an unsigned. Like in Java or C#.

Returns
t1 <= t2