gstlearn
1.0.0
CCC
|
Turbo Optimizer for a specific 2-D environment,. More...
#include <TurboOptimizer.hpp>
Public Member Functions | |
TurboOptimizer (int nx=2, int ny=2, double dx=1., double dy=1., double x0=0., double y0=0., double scale=1., double sill=1., int param=1, int flagOne=1) | |
TurboOptimizer (const TurboOptimizer &tbo) | |
TurboOptimizer & | operator= (const TurboOptimizer &tbo) |
virtual | ~TurboOptimizer () |
void | setGrid (int nx=2, int ny=2, double dx=1., double dy=1., double x0=0., double y0=0.) |
void | setModelByRange (double range=1., double sill=1., int param=1) |
void | setModelByScale (double scale=1., double sill=1., int param=1) |
void | setEnviron (int flagOne=1) |
void | run (bool verbose=false) |
VectorDouble | getBlin () const |
VectorDouble | getTildeC () const |
VectorDouble | getLambda () const |
TripletND | getS () const |
TripletND | getQ () const |
TripletND | interpolate (const VectorDouble &x, const VectorDouble &y) const |
VectorInt | interpolate_rows (const VectorDouble &x, const VectorDouble &y) const |
VectorInt | interpolate_cols (const VectorDouble &x, const VectorDouble &y) const |
VectorDouble | interpolate_values (const VectorDouble &x, const VectorDouble &y) const |
VectorInt | getQ_rows () const |
VectorInt | getQ_cols () const |
VectorDouble | getQ_values () const |
void | printClass () const |
void | printMeshes () const |
void | printS (int nper_batch=5, int row_begin=0, int row_end=0, int col_begin=0, int col_end=0) const |
void | printQ (int nper_batch=5, int row_begin=0, int row_end=0, int col_begin=0, int col_end=0) const |
int | getHalf () const |
int | getCenter () const |
int | getNxred () const |
int | getPoncif () const |
const VectorDouble & | getTildeCT () const |
const VectorDouble & | getLambdaT () const |
const VectorDouble & | getQT () const |
const VectorDouble & | getST () const |
Private Member Functions | |
int | _getNMeshes () const |
int | _getNVertices () const |
int | _getNVertices_red () const |
double | _getMeshSize () const |
int | _getVertex (int imesh, int rank) const |
double | _getCoor (int node, int idim0) const |
double | _getCoorByMesh (int imesh, int rank, int idim0) const |
void | _fromMeshToIndex (int imesh, int *node, int *icas) const |
void | _rankToIndice (int rank, VectorInt &indice, bool minusOne) const |
int | _MSS (int icas, int icorn, int idim0) const |
int | _indiceToRank (VectorInt &indice, bool flag_complete=true) const |
void | _loadHH (VectorDouble &hh) const |
double | _rangeToScale (double range) const |
int | _coordinateToIndice (double x, double y, VectorInt &indice) const |
double | _indiceToCoordinate (int idim0, const VectorInt indice) const |
void | _printVector (const std::string &title, VectorDouble &uu, int width=10, int ndec=3) const |
void | _printMatrix (const std::string &title, int nrow, int ncol, VectorDouble &uu, int nper_batch, int row_shift=0, int col_shift=0, int width=10, int ndec=6) const |
void | _invert_3x3 (VectorDouble &uu, VectorDouble &vv, double tol=1.e-6) const |
void | _prodMatrix (int size, const VectorDouble &aa, const VectorDouble &bb, VectorDouble &cc) const |
void | _prodMatVect (int size, const VectorDouble &aa, const VectorDouble &bb, VectorDouble &cc) const |
void | _updateMargin (int idim0, VectorInt &indice) const |
void | _getRankInTemplate (VectorInt &indice1, VectorInt &indice2) const |
int | _determineInternalGrid (bool verbose) |
VectorDouble | _buildTildeC () const |
VectorDouble | _buildLambda (const VectorDouble TildeC) const |
VectorDouble | _buildS (const VectorDouble &TildeC) const |
VectorDouble | _buildBlin () const |
VectorDouble | _buildQ (const VectorDouble &ss, const VectorDouble &blin, const VectorDouble &lambda) const |
VectorDouble | _getVectorFromTemplate (const VectorDouble &vecin) const |
TripletND | _getMatrixFromTemplate (const VectorDouble &matin, int nperline) const |
int | _addWeights (int icas, double x, double y, const VectorInt &indg0, VectorInt &indices, VectorDouble &lambda) const |
VectorDouble | _expandTripletToMatrix (int row_begin, int row_end, int col_begin, int col_end, const TripletND &triplet) const |
Private Attributes | |
bool | _isCalculated |
int | _nx |
int | _ny |
double | _dx |
double | _dy |
double | _x0 |
double | _y0 |
double | _scale |
double | _sill |
int | _param |
int | _poncif |
int | _center |
int | _nxred |
int | _half |
int | _flagOne |
VectorDouble | _Blin |
VectorDouble | _TildeC_T |
VectorDouble | _Lambda_T |
VectorDouble | _S_T |
VectorDouble | _Q_T |
Turbo Optimizer for a specific 2-D environment,.
with an isotropic Matérn Model
TurboOptimizer::TurboOptimizer | ( | int | nx = 2 , |
int | ny = 2 , |
||
double | dx = 1. , |
||
double | dy = 1. , |
||
double | x0 = 0. , |
||
double | y0 = 0. , |
||
double | scale = 1. , |
||
double | sill = 1. , |
||
int | param = 1 , |
||
int | flagOne = 1 |
||
) |
TurboOptimizer::TurboOptimizer | ( | const TurboOptimizer & | tbo | ) |
|
virtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Expand a sub-part of a Sparse matrix stored as triplets
row_begin | Starting Row number (included) of the Matrix to be expanded |
row_end | Ending Row number (included) of the Matrix to be expanded |
col_begin | Starting Column number (included) of the Matrix to be expanded |
col_end | Ending Column number (included) of the Matrix to be expanded |
triplet | Input matrix stored as TripletNDs |
|
private |
|
private |
|
private |
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Perform C = A * B (A, B and C are square matrices of dimension 'size')
size | Dimension of the square matrices |
aa | First square matrix |
bb | Second square matrix |
cc | Resulting square matrix |
|
private |
|
private |
|
private |
|
private |
VectorDouble TurboOptimizer::getBlin | ( | ) | const |
Allows retrieving the vector Blin
|
inline |
|
inline |
VectorDouble TurboOptimizer::getLambda | ( | ) | const |
Allows retrieving the vector Lambda
|
inline |
|
inline |
|
inline |
TripletND TurboOptimizer::getQ | ( | ) | const |
Allows retrieving the Q sparse matrix
|
inline |
|
inline |
|
inline |
|
inline |
TripletND TurboOptimizer::getS | ( | ) | const |
Allows retrieving the S sparse matrix
|
inline |
VectorDouble TurboOptimizer::getTildeC | ( | ) | const |
Allows retrieving the vector TildeC
|
inline |
TripletND TurboOptimizer::interpolate | ( | const VectorDouble & | x, |
const VectorDouble & | y | ||
) | const |
Returns the weights for interpolating points on the meshing
x | Vector of X-coordinates for the target points |
y | Vector of Y-coordinates for the target points |
|
inline |
|
inline |
|
inline |
TurboOptimizer & TurboOptimizer::operator= | ( | const TurboOptimizer & | tbo | ) |
void TurboOptimizer::printClass | ( | ) | const |
void TurboOptimizer::printMeshes | ( | ) | const |
Print the elements of the Internal Meshing
void TurboOptimizer::printQ | ( | int | nper_batch = 5 , |
int | row_begin = 0 , |
||
int | row_end = 0 , |
||
int | col_begin = 0 , |
||
int | col_end = 0 |
||
) | const |
void TurboOptimizer::printS | ( | int | nper_batch = 5 , |
int | row_begin = 0 , |
||
int | row_end = 0 , |
||
int | col_begin = 0 , |
||
int | col_end = 0 |
||
) | const |
void TurboOptimizer::run | ( | bool | verbose = false | ) |
This function is compulsory as it performs the calculations and allows retrieval of the matrices
verbose | Verbose flag |
void TurboOptimizer::setEnviron | ( | int | flagOne = 1 | ) |
Generic method to set all the remaining terms of the class
flagOne | Starting value for numbering of rows and columns in TripletND |
void TurboOptimizer::setGrid | ( | int | nx = 2 , |
int | ny = 2 , |
||
double | dx = 1. , |
||
double | dy = 1. , |
||
double | x0 = 0. , |
||
double | y0 = 0. |
||
) |
Definition of the 2-D non rotated Grid
nx | Number of nodes along X |
ny | Number of nodes along Y |
dx | Mesh of the grid along X |
dy | Mesh of the grid along Y |
x0 | Origin of the grid along X |
y0 | Origin of the grid along Y |
void TurboOptimizer::setModelByRange | ( | double | range = 1. , |
double | sill = 1. , |
||
int | param = 1 |
||
) |
Definition of the Model (single isotropic Matérn structure) by range
range | Range of the structure |
sill | Sill of the structure |
param | Matérn parameter (third parameter) |
void TurboOptimizer::setModelByScale | ( | double | scale = 1. , |
double | sill = 1. , |
||
int | param = 1 |
||
) |
Definition of the Model (single isotropic Matérn structure) by scale
scale | Scale of the structure |
sill | Sill of the structure |
param | Matérn parameter (third parameter) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |