G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Utilities module

Detailed Description

This module contains several common functionalities needed for G+Smo, for instance point iterators and combinatorial iterators.

Classes

class  gsGenericStopwatch< Clock >
 A Stopwatch object can be used to measure execution time of code, algorithms, etc. More...
 
class  gsMesh< T >
 Class Representing a triangle mesh with 3D vertices. More...
 
class  gsSortedVector< T, _A >
 This class is derived from std::vector, and adds sort tracking. More...
 
struct  remove_pointer< T >
 Remove pointer from type. More...
 
struct  type< T >
 Print name of template type as a string. More...
 

Functions

void capitalize (std::string &str)
 Capitalize string in situ.
 
bool ends_with (const std::string &haystack, const std::string &needle)
 Checks if a string haystack ends with the string needle.
 
template<class T >
gsMatrix< T > gsPointGrid (gsVector< T > const &a, gsVector< T > const &b, gsVector< unsigned > const &np)
 Construct a Cartesian grid of uniform points in a hypercube, using np[i] points in direction i. More...
 
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.
 
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<typename C >
std::string to_string (const C &value)
 Converts value to string, assuming "operator<<" defined on C.
 

Function Documentation

gsMatrix< T > gsPointGrid ( gsVector< T > const &  a,
gsVector< T > const &  b,
gsVector< unsigned > const &  np 
)

Construct a Cartesian grid of uniform points in a hypercube, using np[i] points in direction i.

The hypercube is defined by its lower corner \(a = (a_1,\ldots,a_d)\) and the upper corner \(b = (b_1,\ldots,b_d)\), i.e., the hypercube is \( \mathsf{X}_{i=1}^d [a_i,b_i] \).

Parameters
agsVector of length d, lower corner of the hypercube: \(a = (a_1,\ldots,a_d)\)
bgsVector of length d, upper corner of the hypercube: \(b = (b_1,\ldots,b_d)\)
npgsVector of length d, indicating number of grid points in each coordinate direction
Returns
gsMatrix with size \( d \times \prod_{i=1}^d np[i]\).