IGMPlot 3.16 Optimized IGMplot version able to use wfn/wfx/xyz files

Loading...
Searching...
No Matches
Functions
toolbox.h File Reference

generic methods More...

`#include <eig3.h>`
Include dependency graph for toolbox.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions
double | getMaxFromPrec3DMatrix (double ***_3DMatrix, const unsigned int dimX, const unsigned int dimY, const unsigned int dimZ, double ***rho, const double lowerlimit, const double upperlimit)
| From a 3D matrix, return the maximum value found.
double | getMinFromPrec3DMatrix (double ***_3DMatrix, const unsigned int dimX, const unsigned int dimY, const unsigned int dimZ, double ***rho, const double lowerlimit, const double upperlimit)
| From a 3D matrix, return the maximum value found.
double | getMaxFrom2Matrices (double ***cube1, double ***cube2, double threshold, const unsigned int dimX, const unsigned int dimY, const unsigned int dimZ)
| From cube1, return the maximum value found for which cube2 > threshold.
double | getMaxFromPrecVectorized3DMatrix (double *_Vectorized3DMatrix, double *cubeRho, const double lowerlimit, const double upperlimit, unsigned int dimX, const unsigned int dimY, const unsigned int dimZ)
| From a Vectorized 3D matrix, return the maximum value found.
std::string | getCondensedInformationFromNumericSet (std::set< int > numericValues)
| From a set of numeric value, return a string version of the content with interval (if the information is 1,2,3,4,5,6,9; return "1-6, 9")
void | space (size_t nbSpaces, size_t limit=100)
| Print spaces characters.
void | printCurrentState (unsigned int done, unsigned int total, time_t ellapsed)
| Tool to display timing info for user.
double | getScalarProduct (const double *vectorA, const double *vectorB)
| Tool procedure computing scalar product between two 3D vectors.
double | getCrossProductMagn (const double *vectorA, const double *vectorB)
| computes the magnitude of the cross product between two given vectors
double | getNormOfVector (const double *vectorA)
| Tool procedure computing the norm of a given 3D vector.
void | fortranMatMul33Matrix3Vector (const double matrix[3][3], const double V[3], double VR[3])
| Specific version of Fortran MatMul for 3*3 matrix and a vector.
bool | isStringInt (const std::string s)
| function to test that a string really represents an integer
bool | invSym33 (double M[3][3], double MINV[3][3])
| function that computes the inverse of a 3x3 symmetric matrix
int | modulo (int a, int b)
| function that returns the modulo of a by b (works for negative a values)
double | distance (double a[3], double b[3])
| function that returns the distance between two points a and b
void | getTransposed (double **M1, double M2[3][3])
| function that take the transposed matrix of M1 and put it in M2
void | getTransposed (double M1[3][3], double M2[3][3])
| function that takes the transposed matrix of M1 and put it in M2
bool | isNumeric (std::string const &str)
| function that takes a string as input and check it is numeric

## Detailed Description

generic methods

## Function Documentation

## ◆ distance()

double distance | ( | double | a[3],
|  | double | b[3] )

function that returns the distance between two points a and b

Parameters

  a | --> the first point
  b | --> the second point

Returns
  the distance

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ fortranMatMul33Matrix3Vector()

void fortranMatMul33Matrix3Vector | ( | const double | matrix[3][3],
|  | const double | V[3],
|  | double | VR[3] )

Specific version of Fortran MatMul for 3*3 matrix and a vector.

Parameters

  matrix | the 3*3 matrix
  V | the vector
  VR | the result vector

## ◆ getCondensedInformationFromNumericSet()

std::string getCondensedInformationFromNumericSet | ( | std::set< int > | numericValues | ) |

From a set of numeric value, return a string version of the content with interval (if the information is 1,2,3,4,5,6,9; return "1-6, 9")

Parameters

  numericValues | The set that contains numeric values (so sorted and unique)

Returns
  The string version of the information

Here is the caller graph for this function:

## ◆ getCrossProductMagn()

double getCrossProductMagn | ( | const double * | vectorA,
|  | const double * | vectorB )

computes the magnitude of the cross product between two given vectors

Parameters

  vectorA | The first vector
  vectorB | The second vector

Returns
  The magnitude of the cross product

## ◆ getMaxFrom2Matrices()

double getMaxFrom2Matrices | ( | double *** | cube1,
|  | double *** | cube2,
|  | double | threshold,
|  | const unsigned int | dimX,
|  | const unsigned int | dimY,
|  | const unsigned int | dimZ )

From cube1, return the maximum value found for which cube2 > threshold.

Parameters

  cube1 | The matrix where to find the maximum value
  cube2 | The matrix providing the condition test
  dimX | The first dimension of the matrix
  dimY | The second dimension of the matrix
  dimZ | The third dimension of the matrix

Returns
  The maximum value found but according cube2

Here is the caller graph for this function:

## ◆ getMaxFromPrec3DMatrix()

double getMaxFromPrec3DMatrix | ( | double *** | _3DMatrix,
|  | const unsigned int | dimX,
|  | const unsigned int | dimY,
|  | const unsigned int | dimZ,
|  | double *** | rho,
|  | const double | lowerlimit,
|  | const double | upperlimit )

From a 3D matrix, return the maximum value found.

Parameters

  _3DMatrix | The matrix to parse the cube itself
  dimX | The first dimension of the matrix
  dimY | The second dimension of the matrix
  dimZ | The third dimension of the matrix
  rho | The ED cube
  lowerlimit | The lower limit of the ED range used to filter the _3DMatrix cube
  upperlimit | The upper limit of the ED range used to filter the _3DMatrix cube

Returns
  The maximum value found but according the given rho threshold

Here is the caller graph for this function:

## ◆ getMaxFromPrecVectorized3DMatrix()

double getMaxFromPrecVectorized3DMatrix | ( | double * | _Vectorized3DMatrix,
|  | double * | cubeRho,
|  | const double | lowerlimit,
|  | const double | upperlimit,
|  | unsigned int | dimX,
|  | const unsigned int | dimY,
|  | const unsigned int | dimZ )

From a Vectorized 3D matrix, return the maximum value found.

Parameters

  _Vectorized3DMatrix | The matrix to parse the cube itself
  cubeRho | The electron density cube serving to filter the _Vectorized3DMatrix
  lowerlimit | The lower limit of the ED range used to filter the _Vectorized3DMatrix
  upperlimit | The upper limit of the ED range used to filter the _Vectorized3DMatrix
  dimX | The first dimension of the matrix
  dimY | The second dimension of the matrix
  dimZ | The third dimension of the matrix

Warning
  The matrix is a vector

Returns
  The maximum value found but according the given rho range

Here is the caller graph for this function:

## ◆ getMinFromPrec3DMatrix()

double getMinFromPrec3DMatrix | ( | double *** | _3DMatrix,
|  | const unsigned int | dimX,
|  | const unsigned int | dimY,
|  | const unsigned int | dimZ,
|  | double *** | rho,
|  | const double | lowerlimit,
|  | const double | upperlimit )

From a 3D matrix, return the maximum value found.

Parameters

  _3DMatrix | The matrix to parse the cube itself
  dimX | The first dimension of the matrix
  dimY | The second dimension of the matrix
  dimZ | The third dimension of the matrix
  rho | The ED cube
  lowerlimit | The lower limit of the ED range used to filter the _3DMatrix cube
  upperlimit | The upper limit of the ED range used to filter the _3DMatrix cube

Returns
  The minimum value found but according the given rho threshold

Here is the caller graph for this function:

## ◆ getNormOfVector()

double getNormOfVector | ( | const double * | vectorA | ) |

Tool procedure computing the norm of a given 3D vector.

Parameters

  vectorA | The vector to compute the norm

Returns
  The vectorA norm

Here is the caller graph for this function:

## ◆ getScalarProduct()

double getScalarProduct | ( | const double * | vectorA,
|  | const double * | vectorB )

Tool procedure computing scalar product between two 3D vectors.

Parameters

  vectorA | The first vector
  vectorB | The second vector

Returns
  The scalar product vectorA*vectorB

Here is the caller graph for this function:

## ◆ getTransposed() [1/2]

void getTransposed | ( | double ** | M1,
|  | double | M2[3][3] )

function that take the transposed matrix of M1 and put it in M2

Parameters

  M1 | --> the first matrix (pointer of pointer here)
  M2 | --> the second matrix (2D array here)

Here is the caller graph for this function:

## ◆ getTransposed() [2/2]

void getTransposed | ( | double | M1[3][3],
|  | double | M2[3][3] )

function that takes the transposed matrix of M1 and put it in M2

Parameters

  M1 | --> the first matrix (2D array here)
  M2 | --> the second matrix (2D array here)

## ◆ invSym33()

bool invSym33 | ( | double | M[3][3],
|  | double | MINV[3][3] )

function that computes the inverse of a 3x3 symmetric matrix

Parameters

  M | the matrix to be inversed
  MINV | the inversed matrix

Returns
  false if determinant = 0 else return true

Here is the caller graph for this function:

## ◆ isNumeric()

bool isNumeric | ( | std::string const & | str | ) |

function that takes a string as input and check it is numeric

Returns
  true if only digit are present in the string

Here is the caller graph for this function:

## ◆ isStringInt()

bool isStringInt | ( | const std::string | s | ) |

function to test that a string really represents an integer

Parameters

  s | a string s

Returns
  True if the string s is an integer

Here is the caller graph for this function:

## ◆ modulo()

int modulo | ( | int | a,
|  | int | b )

function that returns the modulo of a by b (works for negative a values)

Parameters

  a | --> the numerator
  b | --> the divisor

Returns
  the modulo of a by b

## ◆ printCurrentState()

void printCurrentState | ( | unsigned int | done,
|  | unsigned int | total,
|  | time_t | ellapsed )

Tool to display timing info for user.

Parameters

  done | The number of grid points completed
  total | The total number of grid point to process
  ellapsed | The time spent until now

Here is the caller graph for this function:

## ◆ space()

void space | ( | size_t | nbSpaces,
|  | size_t | limit )

Print spaces characters.

Parameters

  nbSpaces | thenumber of space to print
  limit | the upper bound for avoid odd behavior

Here is the caller graph for this function: