#include "geoslib_f.h"
#include "geoslib_old_f.h"
#include "geoslib_f_private.h"
#include "Enum/EJustify.hpp"
#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 "Morpho/Morpho.hpp"
#include "Covariances/CovAniso.hpp"
#include "Model/ANoStat.hpp"
#include "Model/NoStatArray.hpp"
#include "Model/Model.hpp"
#include "Model/CovInternal.hpp"
#include "Db/Db.hpp"
#include "Db/DbHelper.hpp"
#include "Basic/Law.hpp"
#include "Basic/NamingConvention.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/String.hpp"
#include "Basic/File.hpp"
#include "Basic/VectorHelper.hpp"
#include "Basic/PolyLine2D.hpp"
#include "Basic/OptDbg.hpp"
#include "Polygon/Polygons.hpp"
#include "Skin/ISkinFunctions.hpp"
#include "Skin/Skin.hpp"
#include "Geometry/GeometryHelper.hpp"
#include "Tree/Ball.hpp"
#include "Tree/KNN.hpp"
#include <math.h>
#include <string.h>
Functions | |
int | surface (Db *db_point, DbGrid *db_grid, int, double dlim, double *dtab, double *gtab) |
int | db_edit (Db *db, int *flag_valid) |
void | ut_trace_discretize (int nseg, 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, double *xp, double *yp, double *dd, double radius, int *ns_arg, double **xs_arg, double **ys_arg, int **rks_arg, int **lys_arg, int **typ_arg) |
int | db_resind (Db *db, int ivar, const VectorDouble &zcut) |
int | db_gradient_components (DbGrid *dbgrid) |
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_model_nostat (Db *db, Model *model, int icov, const NamingConvention &namconv) |
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, 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, int flag_add_rank) |
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, | ||
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 |
int db_model_nostat | ( | Db * | db, |
Model * | model, | ||
int | icov, | ||
const NamingConvention & | namconv | ||
) |
Calculate and store new variables in the Db which contain the non-stationary Model component
[in] | db | Db structure |
[in] | model | Model structure |
[in] | icov | Rank of the Basic structure |
[in] | namconv | Naming convention |
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, | ||
int | flag_add_rank | ||
) |
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] | flag_add_rank | 1 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) |
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, |
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, | ||
double * | xp, | ||
double * | yp, | ||
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 |