#include "geoslib_define.h"#include "geoslib_old_f.h"#include "Mesh/MeshETurbo.hpp"#include "LinearOp/ShiftOpCs.hpp"#include "LinearOp/PrecisionOp.hpp"#include "LinearOp/ProjMatrix.hpp"#include "LinearOp/OptimCostColored.hpp"#include "Stats/Classical.hpp"#include "Covariances/CovAniso.hpp"#include "Model/Model.hpp"#include "Model/CovInternal.hpp"#include "Db/Db.hpp"#include "Db/DbGrid.hpp"#include "Db/DbHelper.hpp"#include "Basic/Law.hpp"#include "Basic/NamingConvention.hpp"#include "Basic/Utilities.hpp"#include "Basic/String.hpp"#include "Basic/VectorHelper.hpp"#include "Basic/Grid.hpp"#include "Basic/PolyLine2D.hpp"#include "Polygon/Polygons.hpp"#include "Tree/Ball.hpp"#include "Basic/Memory.hpp"#include "Core/Keypair.hpp"#include "Core/io.hpp"#include <math.h>#include <string.h>Functions | |
| int | surface (Db *db_point, DbGrid *db_grid, int, double dlim, double *dtab, double *gtab) |
| static void | st_edit_display (Db *db, int nrdv, int nrds, int ivar, int iech) |
| static int | st_edit_find (Db *db, int iech, int ivar, int orient, double vmin, double vmax) |
| static int | st_edit_ask (int *item, int *rank, double *vmin, double *vmax) |
| int | db_edit (Db *db, int *flag_valid) |
| void | ut_trace_discretize (int nseg, const double *trace, double disc, int *np_arg, double **xp_arg, double **yp_arg, double **dd_arg, double **del_arg, double *dist_arg) |
| void | ut_trace_sample (Db *db, const ELoc &ptype, int np, const double *xp, const double *yp, const double *dd, double radius, int *ns_arg, double **xs_arg, double **ys_arg, int **rks_arg, int **lys_arg, int **typ_arg) |
| static VectorDouble | st_point_init_homogeneous (int number, const VectorDouble &coormin, const VectorDouble &coormax, bool flag_repulsion, double range, double beta) |
| static VectorDouble | st_point_init_inhomogeneous (int number, DbGrid *dbgrid, bool flag_repulsion, double range, double beta) |
| int | db_resind (Db *db, int ivar, const VectorDouble &zcut) |
| static void | st_gradient_normalize (Db *dbgrid) |
| int | db_gradient_components (DbGrid *dbgrid) |
| static int | st_is_undefined (Db *dbgrid, int iptr_grad, int iech) |
| static int | st_is_zero (Db *dbgrid, int iptr_grad, int iech) |
| static int | st_get_next (DbGrid *dbgrid, int iptr_grad, VectorDouble &coor, int *knd, double *surf) |
| int | db_streamline (DbGrid *dbgrid, Db *dbpoint, int niter, double step, int flag_norm, int use_grad, int save_grad, int *nbline_loc, int *npline_loc, double **line_loc) |
| int | db_smooth_vpc (DbGrid *db, int width, double range) |
| Db * | db_regularize (Db *db, DbGrid *dbgrid, int flag_center) |
| int | db_grid2point_sampling (DbGrid *dbgrid, int nvar, int *vars, const int *npacks, int npcell, int nmini, int *nech_ret, double **coor_ret, double **data_ret) |
| Db * | db_point_init (int nech, const VectorDouble &coormin, const VectorDouble &coormax, DbGrid *dbgrid, bool flag_exact, bool flag_repulsion, double range, double beta, double extend, int seed, bool flagAddSampleRank) |
| int | db_proportion_estimate (Db *dbin, DbGrid *dbout, Model *model, int niter, bool verbose, const NamingConvention &namconv) |
| int db_edit | ( | Db * | db, |
| int * | flag_valid | ||
| ) |
| int db_gradient_components | ( | DbGrid * | dbgrid | ) |
Calculate the gradient over a grid
| [in] | dbgrid | Db structure (grid organized) |
| int db_grid2point_sampling | ( | DbGrid * | dbgrid, |
| int | nvar, | ||
| int * | vars, | ||
| const int * | npacks, | ||
| int | npcell, | ||
| int | nmini, | ||
| int * | nech_ret, | ||
| double ** | coor_ret, | ||
| double ** | data_ret | ||
| ) |
Sampling a fine grid in a coarser set of cells
| [in] | dbgrid | reference Grid |
| [in] | nvar | Number of variables |
| [in] | vars | Array of variable ranks |
| [in] | npacks | Vector of packing factors |
| [in] | npcell | Number of samples per cell |
| [in] | nmini | Minimum number of nodes before drawing |
| [out] | nech_ret | Number of selected samples |
| [out] | coor_ret | Array of coordinates |
| [out] | data_ret | Array of variables |
| Db* db_point_init | ( | int | nech, |
| const VectorDouble & | coormin, | ||
| const VectorDouble & | coormax, | ||
| DbGrid * | dbgrid, | ||
| bool | flag_exact, | ||
| bool | flag_repulsion, | ||
| double | range, | ||
| double | beta, | ||
| double | extend, | ||
| int | seed, | ||
| bool | flagAddSampleRank | ||
| ) |
Create a new Data Base with points generated at random
| [in] | nech | Expected number of samples |
| [in] | coormin | Vector of lower coordinates |
| [in] | coormax | Vector of upper coordinates |
| [in] | dbgrid | Descriptor of the Db grid parameters |
| [in] | flag_exact | True if the number of samples is dran from Poisson |
| [in] | flag_repulsion | Use repulsion (need: 'range' and 'beta') |
| [in] | range | Repulsion range |
| [in] | beta | Bending coefficient |
| [in] | extend | Extension of the bounding box (when positive) |
| [in] | seed | Seed for the random number generator |
| [in] | flagAddSampleRank | true if the Rank must be generated in the output Db |
| int db_proportion_estimate | ( | Db * | dbin, |
| DbGrid * | dbout, | ||
| Model * | model, | ||
| int | niter, | ||
| bool | verbose, | ||
| const NamingConvention & | namconv | ||
| ) |
Standard Kriging
| [in] | dbin | Input Db structure |
| [in] | dbout | Output Db structure |
| [in] | model | Model structure |
| [in] | niter | Number of iterations |
| [in] | verbose | Verbose flag |
| [in] | namconv | Naming convention |
Regularize variables along vertical wells
| [in] | db | Initial Db |
| [in] | dbgrid | Reference Grid |
| [in] | flag_center | When TRUE, the sample is centered in the layer to which it belongs |
| int db_resind | ( | Db * | db, |
| int | ivar, | ||
| const VectorDouble & | zcut | ||
| ) |
| int db_smooth_vpc | ( | DbGrid * | db, |
| int | width, | ||
| double | range | ||
| ) |
Smooth out the VPC
| [in] | db | 3-D Db structure containing the VPCs |
| [in] | width | Width of the Filter |
| [in] | range | Range of the Gaussian Weighting Function |
| int db_streamline | ( | DbGrid * | dbgrid, |
| Db * | dbpoint, | ||
| int | niter, | ||
| double | step, | ||
| int | flag_norm, | ||
| int | use_grad, | ||
| int | save_grad, | ||
| int * | nbline_loc, | ||
| int * | npline_loc, | ||
| double ** | line_loc | ||
| ) |
Calculate the streamlines
| [in] | dbgrid | Db structure (grid organized) |
| [in] | dbpoint | Db structure for control points |
| [in] | niter | Maximum number of iterations |
| [in] | step | Progress step |
| [in] | flag_norm | 1 if the gradients must be normalized |
| [in] | use_grad | 1 if the existing gradients must be used 0 the gradients must be calculated here |
| [in] | save_grad | 1 save the gradients generated in this function 0 delete gradients when calculated here |
| [out] | nbline_loc | Number of streamline steps |
| [out] | npline_loc | Number of values per line vertex |
| [out] | line_loc | Array of streamline steps (Dimension: 5 * nbline) |
|
static |
Ask for the next keyword in the Editor
| [out] | item | Selected item |
| [out] | rank | Value for the Shift |
| [out] | vmin | Value for the lower bound |
| [out] | vmax | Value for the upper bound |
|
static |
|
static |
Look for the next sample with a value within the interval
| [in] | db | Db descriptor |
| [in] | iech | Rank of the current sample |
| [in] | ivar | Rank of the current variable |
| [in] | orient | Orientation (1: downwards; -1: forwards) |
| [in] | vmin | Minimum value |
| [in] | vmax | Maximum value |
|
static |
|
static |
Normalize the gradient components
| [in] | dbgrid | Db structure (grid organized) |
|
static |
Check if one (at least) of the gradient components is undefined
| [in] | dbgrid | Db structure (grid organized) |
| [in] | iptr_grad | Rank of the first gradient component |
| [in] | iech | Sample rank |
|
static |
Check if the gradient is null
| [in] | dbgrid | Db structure (grid organized) |
| [in] | iptr_grad | Rank of the first gradient component |
| [in] | iech | Sample rank |
|
static |
Create a set of samples according to a Poisson process
| [in] | number | Number of samples to be generated |
| [in] | coormin | Vector of minimum coordinates |
| [in] | coormax | Vector of maximum coordinates |
| [in] | flag_repulsion | True if the repulsion process is active |
| [in] | range | Repulsion range |
| [in] | beta | Repulsion beta coefficient |
|
static |
Create a set of samples according to a Poisson Regionalized process
| [in] | number | Number of samples to be generated |
| [in] | dbgrid | Descriptor of the Db grid parameters |
| [in] | flag_repulsion | True if the repulsion process is active |
| [in] | range | Repulsion range |
| [in] | beta | Repulsion beta coefficient |
Calculate the (discretized) surface of influence
| [in] | db_point | Db containing the data points |
| [in] | db_grid | Db containing the discretization grid |
| [in] | dlim | Maximum distance (TEST if not defined) |
| [out] | dtab | Array containing the surface of influence (Dimension = Number of samples in db_point) |
| [out] | gtab | Array containing the surface of influence of the polygon to which it belongs (or TEST) (Dimension = Number of samples in db_grid) |
| void ut_trace_discretize | ( | int | nseg, |
| const double * | trace, | ||
| double | disc, | ||
| int * | np_arg, | ||
| double ** | xp_arg, | ||
| double ** | yp_arg, | ||
| double ** | dd_arg, | ||
| double ** | del_arg, | ||
| double * | dist_arg | ||
| ) |
Generates the discretized points along the trace
| [in] | nseg | Number of vertices along the trace |
| [in] | trace | Array defining the trace (Dimension: 2 * nseg) |
| [in] | disc | Discretization distance |
| [out] | np_arg | Number of discretized points |
| [out] | xp_arg | Array of first coordinates |
| [out] | yp_arg | Array of second coordinates |
| [out] | dd_arg | Array of distances between discretized points |
| [out] | del_arg | Array of distances between vertices |
| [out] | dist_arg | Total distance of the trace |
| void ut_trace_sample | ( | Db * | db, |
| const ELoc & | ptype, | ||
| int | np, | ||
| const double * | xp, | ||
| const double * | yp, | ||
| const double * | dd, | ||
| double | radius, | ||
| int * | ns_arg, | ||
| double ** | xs_arg, | ||
| double ** | ys_arg, | ||
| int ** | rks_arg, | ||
| int ** | lys_arg, | ||
| int ** | typ_arg | ||
| ) |
Sample the point Db close to discretized points of the trace
| [in] | db | Db to be sampled |
| [in] | ptype | Type of locator |
| [in] | np | Number of discretized points |
| [in] | xp | Array of first coordinates |
| [in] | yp | Array of second coordinates |
| [in] | dd | Array of distances |
| [in] | radius | Neighborhood radius |
| [out] | ns_arg | Number of sampled points |
| [out] | xs_arg | Array of first coordinates of sampled points |
| [out] | ys_arg | Array of second coordinates of sampled points |
| [out] | rks_arg | Array of sample indices (starting from 1) |
| [out] | lys_arg | Array of layer indices of sampled points |
| [out] | typ_arg | Array of data type 1 for hard data in Z or TIME 2 for lower bound 3 for upper bound |