#include "geoslib_f.h"
#include "geoslib_old_f.h"
#include "Space/ASpaceObject.hpp"
#include "Polygon/Polygons.hpp"
#include "Basic/AException.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/String.hpp"
#include "Basic/GlobalEnvironment.hpp"
#include "Db/Db.hpp"
#include "Db/DbStringFormat.hpp"
#include <math.h>
Functions | |
int | compat_NDIM (Db *db1, Db *db2) |
void | db_grid_print (Db *db) |
int | db_vector_get_att_sel_compress (Db *db, int iatt, int *number, double *tab) |
int | db_vector_get_att (const Db *db, int iatt, double *tab) |
int | db_vector_get_att_sel (Db *db, int iatt, double *tab) |
int | db_vector_get (Db *db, const ELoc &locatorType, int item, double *tab) |
int | db_selection_get (const Db *db, int item, double *tab) |
int | db_vector_put (Db *db, const ELoc &locatorType, int locatorIndex, double *tab) |
int | get_LOCATOR_NITEM (const Db *db, const ELoc &locatorType) |
int | exist_LOCATOR (Db *db, const ELoc &locatorType) |
double | get_LOCATOR_ITEM (Db *db, const ELoc &locatorType, int item, int iech) |
void | set_LOCATOR_ITEM (Db *db, const ELoc &locatorType, int item, int iech, double value) |
int * | db_indg_free (int *indice) |
int * | db_indg_alloc (const Db *db) |
double * | db_vector_free (double *tab) |
double * | db_vector_alloc (const Db *db) |
int | db_coorvec_get (const Db *db, int idim, double *tab) |
int | db_coorvec_put (Db *db, int idim, double *tab) |
int | db_attribute_identify (const Db *db, const ELoc &locatorType, int item) |
double * | db_sample_free (double *tab) |
double * | db_sample_alloc (const Db *db, const ELoc &locatorType) |
int | db_sample_load (Db *db, const ELoc &locatorType, int iech, double *tab) |
int | db_sample_get_att (Db *db, int iech, int number, int iatt, double *tab) |
void | db_sample_put_att (Db *db, int iech, int number, int iatt, double *tab) |
double | distance_inter (const Db *db1, const Db *db2, int iech1, int iech2, double *dist_vect) |
double | distance_intra (const Db *db, int iech1, int iech2, double *dist_vect) |
double | distance_grid (DbGrid *db, int flag_moins1, int iech1, int iech2, double *dist_vect) |
double | bench_distance (const Db *db, int iech1, int iech2) |
double | cylinder_radius (const Db *db, int iech1, int iech2, const VectorDouble &codir) |
int | db_index_grid_to_sample (const DbGrid *db, const int *indg) |
void | db_index_sample_to_grid (const DbGrid *db, int iech, int *indg) |
int | db_index_sorted_in_grid (const DbGrid *db, int iech, int *indg) |
void | db_sample_print (Db *db, int iech, int flag_ndim, int flag_nvar, int flag_nerr) |
void | db_extension (const Db *db, VectorDouble &mini, VectorDouble &maxi, bool flag_preserve) |
int | db_center (Db *db, double *center) |
int | db_extension_diag (const Db *db, double *diag) |
double | db_epsilon_distance (Db *db) |
int | db_attribute_range (const Db *db, int iatt, double *mini, double *maxi, double *delta) |
int | db_grid_define_coordinates (DbGrid *db) |
Db * | db_create_from_target (const double *target, int ndim, int flag_add_rank) |
String | db_name_get_by_att (const Db *db, int iatt) |
String | db_name_get_by_col (Db *db, int icol) |
int | db_name_set (Db *db, int iatt, const String &name) |
void | db_attribute_copy (Db *db, int iatt_in, int iatt_out) |
void | db_attribute_init (Db *db, int ncol, int iatt, double valinit) |
void | db_attribute_del_mult (Db *db, int i_del, int n_del) |
int | db_grid_copy_params (DbGrid *dbin, int mode, DbGrid *dbout) |
double | db_grid_maille (Db *db) |
int | db_gradient_update (Db *db) |
int | db_selref (int ndim, int *nx, int *ref, double *tabin, double *tabout) |
int | db_locate_in_grid (DbGrid *db_grid, double *coor) |
int | db_grid_match (DbGrid *db1, DbGrid *db2) |
int | db_locator_attribute_add (Db *db, const ELoc &locatorType, int number, int r_tem, double valinit, int *iptr) |
int | db_grid_copy (DbGrid *db1, DbGrid *db2, int *ind1, int *ind2, int ncol, int *cols) |
int | db_grid_copy_dilate (DbGrid *db1, int iatt1, DbGrid *db2, int iatt2, int mode, int *nshift) |
void | grid_to_point (const DbGrid *db, int *indg, double *percent, double *coor) |
int | point_to_point (Db *db, double *coor) |
int | point_to_grid (const DbGrid *db, const double *coor, int flag_outside, int *indg) |
int | point_to_bench (const DbGrid *db, double *coor, int flag_outside, int *indb) |
int | index_point_to_grid (const Db *dbin, int iech, int flag_outside, const DbGrid *dbout, double *coor) |
int | point_inside_grid (Db *db, int iech, const DbGrid *dbgrid) |
void | db_monostat (Db *db, int iatt, double *wtot, double *mean, double *var, double *mini, double *maxi) |
int | db_proportion (Db *db, DbGrid *dbgrid, int nfac1max, int nfac2max, int *nclout) |
int | db_merge (Db *db, int ncol, int *cols) |
int | db_count_defined (Db *db, int icol) |
void | db_locators_correct (VectorString &strings, const VectorInt ¤t, int flag_locnew) |
int | db_prop_read (DbGrid *db, int ix, int iy, double *props) |
int | db_prop_write (DbGrid *db, int ix, int iy, double *props) |
double * | db_distances_general (Db *db1, Db *db2, int niso, int mode, int flag_same, int *n1, int *n2, double *dmin, double *dmax) |
int | db_is_isotropic (const Db *db, int iech, double *data) |
int | is_grid_multiple (DbGrid *db1, DbGrid *db2) |
DbGrid * | db_create_grid_multiple (DbGrid *dbin, const VectorInt &nmult, int flag_add_rank) |
DbGrid * | db_create_grid_divider (DbGrid *dbin, const VectorInt &nmult, int flag_add_rank) |
DbGrid * | db_create_grid_dilate (DbGrid *dbin, int mode, const VectorInt &nshift, int flag_add_rank) |
int | db_gradient_modang_to_component (Db *db, int ang_conv, int iad_mod, int iad_ang, int iad_gx, int iad_gy) |
int | db_gradient_component_to_modang (Db *db, int verbose, int iad_gx, int iad_gy, int iad_mod, int iad_ang, double scale, double ve) |
int | db_get_rank_absolute_to_relative (Db *db, int iech0) |
int | db_get_rank_relative_to_absolute (Db *db, int iech0) |
double | get_grid_value (DbGrid *dbgrid, int iptr, int *indg, int ix, int iy, int iz) |
void | set_grid_value (DbGrid *dbgrid, int iptr, int *indg, int ix, int iy, int iz, double value) |
DbGrid * | db_grid_reduce (DbGrid *db_grid, int iptr, int *margin, int *limmin, int flag_sel, int flag_copy, int verbose, double vmin, double vmax) |
int | db_grid_patch (DbGrid *ss_grid, DbGrid *db_grid, int iptr_ss, int iptr_db, int iptr_rank, int new_rank, int oper, int verbose) |
int | db_name_identify (Db *db, const String &string) |
void | db_extension_rotated (Db *db, double *rotmat, VectorDouble &mini, VectorDouble &maxi) |
VectorDouble | db_get_grid_axis (DbGrid *dbgrid, int idim) |
VectorDouble | db_get_attribute (Db *db, int iatt, bool verbose) |
VectorInt | db_identify_variables_by_name (Db *db, const String &pattern) |
void | grid_iterator_init (Grid *grid, const VectorInt &order) |
VectorInt | grid_iterator_next (Grid *grid) |
double bench_distance | ( | const Db * | db, |
int | iech1, | ||
int | iech2 | ||
) |
Calculate the bench separation for the current pair
[in] | db | Db structure |
[in] | iech1 | Rank of the first sample |
[in] | iech2 | Rank of the second sample |
Checks if Space Dimension of the first Db is at least equal to the Space dimension of the second Db
double cylinder_radius | ( | const Db * | db, |
int | iech1, | ||
int | iech2, | ||
const VectorDouble & | codir | ||
) |
void db_attribute_copy | ( | Db * | db, |
int | iatt_in, | ||
int | iatt_out | ||
) |
Copy an attribute into another one
[in] | db | Db structure |
[in] | iatt_in | Input attribute |
[in] | iatt_out | Output attribute |
void db_attribute_del_mult | ( | Db * | db, |
int | i_del, | ||
int | n_del | ||
) |
Remove a set of "n_del" attributes starting from "i_del"
[in] | db | Db structure |
[in] | i_del | Rank of the first attribute to be deleted |
[in] | n_del | Number of attributes to be deleted |
int db_attribute_identify | ( | const Db * | db, |
const ELoc & | locatorType, | ||
int | item | ||
) |
Returns the rank of the attribute in the array
[in] | db | Db descriptor |
[in] | locatorType | Rank of the pointer |
[in] | item | Rank of the attribute in the pointer |
void db_attribute_init | ( | Db * | db, |
int | ncol, | ||
int | iatt, | ||
double | valinit | ||
) |
Initialize a variable with the given argument (given by attribute)
[in] | db | Db structure |
[in] | ncol | Number of attributes to be initialized |
[in] | iatt | Rank of the first variable to be initialized |
[in] | valinit | Value set to the variable |
int db_attribute_range | ( | const Db * | db, |
int | iatt, | ||
double * | mini, | ||
double * | maxi, | ||
double * | delta | ||
) |
Returns the range for a variable
[in] | db | Db structure |
[in] | iatt | Rank of the target attribute |
[out] | mini | Minimum |
[out] | maxi | Maximum |
[out] | delta | Extension |
int db_center | ( | Db * | db, |
double * | center | ||
) |
int db_coorvec_get | ( | const Db * | db, |
int | idim, | ||
double * | tab | ||
) |
int db_coorvec_put | ( | Db * | db, |
int | idim, | ||
double * | tab | ||
) |
int db_count_defined | ( | Db * | db, |
int | icol | ||
) |
Count the number of defined values for a Column
[in] | db | Db structure |
[in] | icol | Rank of the Column |
Db* db_create_from_target | ( | const double * | target, |
int | ndim, | ||
int | flag_add_rank | ||
) |
double* db_distances_general | ( | Db * | db1, |
Db * | db2, | ||
int | niso, | ||
int | mode, | ||
int | flag_same, | ||
int * | n1, | ||
int * | n2, | ||
double * | dmin, | ||
double * | dmax | ||
) |
Evaluate the array of distances between samples of two data sets Takes the selection into account (if any)
[in] | db1 | Db first descriptor |
[in] | db2 | Db second descriptor |
[in] | niso | Number of variables tested for isotopy |
[in] | mode | Type of array returned 0 : extreme distances 1 : the distance to the closest sample 2 : all point-to-point distances |
[in] | flag_same | 1 if both Db coincide |
[out] | n1 | First dimension of the returned array |
[out] | n2 | Second dimension of the returned array |
[out] | dmin | Minimum distance |
[out] | dmax | Maximum distance |
double db_epsilon_distance | ( | Db * | db | ) |
Returns the epsilon value calculated from the extension of the field
[in] | db | Db structure |
void db_extension | ( | const Db * | db, |
VectorDouble & | mini, | ||
VectorDouble & | maxi, | ||
bool | flag_preserve | ||
) |
Returns the extension of the field along each axis This calculation takes contents of arguments at input into account if 'flag_preserve' is true
[in] | db | Db structure |
[out] | mini | Array containing the minimum (Dimension = ndim) |
[out] | maxi | Array containing the maximum (Dimension = ndim) |
[in] | flag_preserve | False Contents of arguments at input is preserved |
int db_extension_diag | ( | const Db * | db, |
double * | diag | ||
) |
Returns the extension of the diagonal of the field
[in] | db | Db structure |
[out] | diag | Dimension of the field diagonal |
void db_extension_rotated | ( | Db * | db, |
double * | rotmat, | ||
VectorDouble & | mini, | ||
VectorDouble & | maxi | ||
) |
Returns the extension of the field (after rotation) along each axis
[in] | db | Db structure |
[in] | rotmat | Rotation matrix (optional) |
[out] | mini | Array containing the minimum (Dimension = ndim) |
[out] | maxi | Array containing the maximum (Dimension = ndim) |
VectorDouble db_get_attribute | ( | Db * | db, |
int | iatt, | ||
bool | verbose | ||
) |
VectorDouble db_get_grid_axis | ( | DbGrid * | dbgrid, |
int | idim | ||
) |
int db_get_rank_absolute_to_relative | ( | Db * | db, |
int | iech0 | ||
) |
Returns the relative rank of a sample from its absolute rank These are different due to the presence of a selection Returns -1 if not found
[in] | db | Db structure |
[in] | iech0 | Absolute sample rank |
int db_get_rank_relative_to_absolute | ( | Db * | db, |
int | iech0 | ||
) |
Returns the absolute rank of a sample from its relative rank These are different due to the presence of a selection Returns -1 if not found
[in] | db | Db structure |
[in] | iech0 | Relative sample rank |
int db_gradient_component_to_modang | ( | Db * | db, |
int | verbose, | ||
int | iad_gx, | ||
int | iad_gy, | ||
int | iad_mod, | ||
int | iad_ang, | ||
double | scale, | ||
double | ve | ||
) |
Transform a set of gradients defined by (gx,gy) into (module,angle) Only defined in the 2-D case
[in] | db | Initial Db |
[in] | verbose | 1 for the verbose option |
[in] | iad_gx | Rank of the 'gx' attribute (defined in degrees) |
[in] | iad_gy | Rank of the 'gy' attribute (defined in degrees) |
[in] | iad_mod | Rank of the 'modulus' attribute |
[in] | iad_ang | Rank of the 'angle' attribute (defined in degrees) |
[in] | scale | Scaling factor for the modulus |
[in] | ve | Moderation factor |
int db_gradient_modang_to_component | ( | Db * | db, |
int | ang_conv, | ||
int | iad_mod, | ||
int | iad_ang, | ||
int | iad_gx, | ||
int | iad_gy | ||
) |
Transform a set of gradients defined by (modulus,angle) into (gx,gy) Only defined in the 2-D case
[in] | db | Initial Db |
[in] | ang_conv | Convention on the angles
|
[in] | iad_mod | Rank of the 'modulus' attribute |
[in] | iad_ang | Rank of the 'angle' attribute (defined in degrees) |
[in] | iad_gx | Rank of the 'gx' attribute (defined in degrees) |
[in] | iad_gy | Rank of the 'gy' attribute (defined in degrees) |
int db_gradient_update | ( | Db * | db | ) |
Update the Data Base for Kriging with Gradient components This update is limited to the 2-D Monovariate case
[in] | db | Input/output Db |
int db_grid_copy_dilate | ( | DbGrid * | db1, |
int | iatt1, | ||
DbGrid * | db2, | ||
int | iatt2, | ||
int | mode, | ||
int * | nshift | ||
) |
int db_grid_define_coordinates | ( | DbGrid * | db | ) |
double db_grid_maille | ( | Db * | db | ) |
Check if two grid match
[in] | db1 | Db1 grid structure |
[in] | db2 | Db1 grid structure |
int db_grid_patch | ( | DbGrid * | ss_grid, |
DbGrid * | db_grid, | ||
int | iptr_ss, | ||
int | iptr_db, | ||
int | iptr_rank, | ||
int | new_rank, | ||
int | oper, | ||
int | verbose | ||
) |
Patch a sub-grid within a main grid
[in] | ss_grid | Db sub-grid structure |
[in] | db_grid | Db main grid structure |
[in] | iptr_ss | Rank of the attribute in the sub-grid |
[in] | iptr_db | Rank of the attribute in the main grid |
[in] | iptr_rank | Rank of the attribute storing object rank If <0, no check is performed: always patch |
[in] | new_rank | Rank of the current object to patch in main grid |
[in] | oper | >0 for larger; <0 for smaller |
[in] | verbose | Verbose flag |
void db_grid_print | ( | Db * | db | ) |
DbGrid* db_grid_reduce | ( | DbGrid * | db_grid, |
int | iptr, | ||
int * | margin, | ||
int * | limmin, | ||
int | flag_sel, | ||
int | flag_copy, | ||
int | verbose, | ||
double | vmin, | ||
double | vmax | ||
) |
Extract the subgrid (from a grid) which contains the only cells where the target variable lies wuthin the target interval Selection in the input grid is taken into account
[in] | db_grid | Db structure |
[in] | iptr | Rank of the column of the target variable |
[in] | margin | Array of margins (or NULL) |
[in] | limmin | Array of minimum dimensions (or NULL) |
[in] | flag_sel | Create the selection |
[in] | flag_copy | 1 if the selection must be copied in sub-grid |
[in] | verbose | Verbose flag |
[in] | vmin | Lower bound (included) |
[in] | vmax | Upper bound (excluded) |
int db_index_grid_to_sample | ( | const DbGrid * | db, |
const int * | indg | ||
) |
Converts from grid indices to the absolute address
[in] | db | descriptor of the grid parameters |
[in] | indg | array of grid indices |
void db_index_sample_to_grid | ( | const DbGrid * | db, |
int | iech, | ||
int * | indg | ||
) |
int db_index_sorted_in_grid | ( | const DbGrid * | db, |
int | iech, | ||
int * | indg | ||
) |
Return the index of the ordered grid sample (see remarks)
[in] | db | Db structure |
[in] | iech | Rank of the sample |
[out] | indg | Array used for sorting grid indices |
int* db_indg_alloc | ( | const Db * | db | ) |
Allocates an array for the storage of grid indices
[in] | db | Db descriptor |
int* db_indg_free | ( | int * | indice | ) |
Frees an array for the storage of grid indices
[in] | indice | Array to be freed |
int db_is_isotropic | ( | const Db * | db, |
int | iech, | ||
double * | data | ||
) |
Check if a sample corresponding to a given rank is isotropic or not
[in] | db | Db descriptor |
[in] | iech | Rank of the target sample |
[out] | data | If the output vector is provided. Returns the data value at target sample as a vector |
int db_locate_in_grid | ( | DbGrid * | db_grid, |
double * | coor | ||
) |
int db_locator_attribute_add | ( | Db * | db, |
const ELoc & | locatorType, | ||
int | number, | ||
int | r_tem, | ||
double | valinit, | ||
int * | iptr | ||
) |
Add and initiate several attributes corresponding to a given locator
[in] | db | Db structure |
[in] | locatorType | Rank of the Pointer (ELoc) |
[in] | number | Number of locators to be defined |
[in] | r_tem | Rank of the first item in the pointer |
[in] | valinit | Value to be used for initialization |
[out] | iptr | Rank of the first new attribute |
void db_locators_correct | ( | VectorString & | strings, |
const VectorInt & | current, | ||
int | flag_locnew | ||
) |
int db_merge | ( | Db * | db, |
int | ncol, | ||
int * | cols | ||
) |
void db_monostat | ( | Db * | db, |
int | iatt, | ||
double * | wtot, | ||
double * | mean, | ||
double * | var, | ||
double * | mini, | ||
double * | maxi | ||
) |
Monovariate statistics
[in] | db | Db structure |
[in] | iatt | Rank of the attribute |
[out] | wtot | Sum of the weights |
[out] | mean | Mean of the variable |
[out] | var | variance of the variable |
[out] | mini | Minimum value |
[out] | maxi | Maximum value |
Returns the name assigned to the given attribute
[in] | db | Db structure |
[in] | iatt | Rank of the attribute (starting at 0) |
Returns the name assigned to the given column
[in] | db | Db structure |
[in] | icol | Rank of the column (starting at 0) |
Identify the attribute by its name
[in] | db | Db descriptor |
[in] | string | attribute name |
Define the name assigned to the given attribute
[in] | db | Db structure |
[in] | iatt | Rank of the attribute (starting at 0) |
[in] | name | Name assigned to the current attribute |
int db_prop_read | ( | DbGrid * | db, |
int | ix, | ||
int | iy, | ||
double * | props | ||
) |
int db_prop_write | ( | DbGrid * | db, |
int | ix, | ||
int | iy, | ||
double * | props | ||
) |
Calculates the proportions of facies within a grid
[in] | db | Input Db structure |
[in] | dbgrid | Output Grid Db structure |
[in] | nfac1max | Maximum number of facies for the first variable |
[in] | nfac2max | Maximum number of facies for the second variable |
[out] | nclout | Total number of classes |
double* db_sample_alloc | ( | const Db * | db, |
const ELoc & | locatorType | ||
) |
Allocates the array for storing a sample
[in] | db | Db descriptor |
[in] | locatorType | vector type (ELoc) |
double* db_sample_free | ( | double * | tab | ) |
Frees the array for storing a sample
[in] | tab | Sample array to be freed |
int db_sample_get_att | ( | Db * | db, |
int | iech, | ||
int | number, | ||
int | iatt, | ||
double * | tab | ||
) |
int db_sample_load | ( | Db * | db, |
const ELoc & | locatorType, | ||
int | iech, | ||
double * | tab | ||
) |
void db_sample_print | ( | Db * | db, |
int | iech, | ||
int | flag_ndim, | ||
int | flag_nvar, | ||
int | flag_nerr | ||
) |
Print a sample
[in] | db | Db structure |
[in] | iech | Rank of the sample |
[in] | flag_ndim | 1 if the coordinates must be printed |
[in] | flag_nvar | 1 if the variables must be printed |
[in] | flag_nerr | 1 if the error measurement variance must be printed |
void db_sample_put_att | ( | Db * | db, |
int | iech, | ||
int | number, | ||
int | iatt, | ||
double * | tab | ||
) |
Saves the contents of several (consecutive) attributes for a sample
[in] | db | Db descriptor |
[in] | iech | Rank of the sample |
[in] | number | Number of columns |
[in] | iatt | Rank of the starting attribute |
[in] | tab | array of values |
int db_selection_get | ( | const Db * | db, |
int | item, | ||
double * | tab | ||
) |
int db_selref | ( | int | ndim, |
int * | nx, | ||
int * | ref, | ||
double * | tabin, | ||
double * | tabout | ||
) |
double* db_vector_alloc | ( | const Db * | db | ) |
Allocates the array for storing a column of the Db
[in] | db | Db descriptor |
double* db_vector_free | ( | double * | tab | ) |
Frees the array for storing a vector
[in] | tab | Vector array to be freed |
int db_vector_get | ( | Db * | db, |
const ELoc & | locatorType, | ||
int | item, | ||
double * | tab | ||
) |
int db_vector_get_att | ( | const Db * | db, |
int | iatt, | ||
double * | tab | ||
) |
int db_vector_get_att_sel | ( | Db * | db, |
int | iatt, | ||
double * | tab | ||
) |
int db_vector_get_att_sel_compress | ( | Db * | db, |
int | iatt, | ||
int * | number, | ||
double * | tab | ||
) |
int db_vector_put | ( | Db * | db, |
const ELoc & | locatorType, | ||
int | locatorIndex, | ||
double * | tab | ||
) |
double distance_grid | ( | DbGrid * | db, |
int | flag_moins1, | ||
int | iech1, | ||
int | iech2, | ||
double * | dist_vect | ||
) |
Calculates the distance between two points in the same grid Db
[in] | db | Db structure |
[in] | flag_moins1 | 1 to use the cell center |
[in] | iech1 | rank of the first sample |
[in] | iech2 | rank of the second sample |
[out] | dist_vect | If the output vector is provided. Returns the distance as a vector |
Calculates the distance between two points
[in] | db1 | Db structure for the first sample |
[in] | db2 | Db structure for the second sample |
[in] | iech1 | rank of the first sample |
[in] | iech2 | rank of the second sample |
[out] | dist_vect | If the output vector is provided. Returns the distance as a vector |
double distance_intra | ( | const Db * | db, |
int | iech1, | ||
int | iech2, | ||
double * | dist_vect | ||
) |
Calculates the distance between two points in the same Db
[in] | db | Db structure |
[in] | iech1 | rank of the first sample |
[in] | iech2 | rank of the second sample |
[out] | dist_vect | If the output vector is provided. Returns the distance as a vector |
int exist_LOCATOR | ( | Db * | db, |
const ELoc & | locatorType | ||
) |
double get_grid_value | ( | DbGrid * | dbgrid, |
int | iptr, | ||
int * | indg, | ||
int | ix, | ||
int | iy, | ||
int | iz | ||
) |
Returns a value from the a 3-D (maximum) grid
double get_LOCATOR_ITEM | ( | Db * | db, |
const ELoc & | locatorType, | ||
int | item, | ||
int | iech | ||
) |
int get_LOCATOR_NITEM | ( | const Db * | db, |
const ELoc & | locatorType | ||
) |
Returns 1 when the last element of the iteration is reached
Increment the Grid iterator
void grid_to_point | ( | const DbGrid * | db, |
int * | indg, | ||
double * | percent, | ||
double * | coor | ||
) |
Converts from grid indices and percentages to the point absolute coordinates
[in] | db | descriptor of the grid parameters |
[in] | indg | array of indices of the grid |
[in] | percent | array of grid percentages (NULL if absent) |
[out] | coor | coordinates of the point |
int index_point_to_grid | ( | const Db * | dbin, |
int | iech, | ||
int | flag_outside, | ||
const DbGrid * | dbout, | ||
double * | coor | ||
) |
Find the index of the output grid file which is the closest to the sample of the input file
[in] | dbin | descriptor of the input file |
[in] | iech | Index of the data point |
[in] | flag_outside | value returned for the point outside the grid
|
[in] | dbout | descriptor of the output grid file |
[out] | coor | Working array (dimension: ndim) |
Check if a grid is a multiple of the other grid
[in] | db1 | Db1 small grid structure |
[in] | db2 | Db1 coarse grid structure |
int point_to_bench | ( | const DbGrid * | db, |
double * | coor, | ||
int | flag_outside, | ||
int * | indb | ||
) |
Converts from point coordinates to index of the bench to which it belongs
[in] | db | descriptor of the grid parameters |
[in] | coor | array of coordinates of the point |
[in] | flag_outside | value returned for the point outside the grid
|
[out] | indb | index of the bench |
int point_to_grid | ( | const DbGrid * | db, |
const double * | coor, | ||
int | flag_outside, | ||
int * | indg | ||
) |
Converts from point coordinates to nearest grid node indices
[in] | db | descriptor of the grid parameters |
[in] | coor | array of coordinates of the point |
[in] | flag_outside | value returned for the point outside the grid
|
[out] | indg | indices of the closest grid node |
int point_to_point | ( | Db * | db, |
double * | coor | ||
) |
Returns the rank of the closest isolated point
[in] | db | descriptor of the Db |
[in] | coor | array of coordinates of the point |
void set_grid_value | ( | DbGrid * | dbgrid, |
int | iptr, | ||
int * | indg, | ||
int | ix, | ||
int | iy, | ||
int | iz, | ||
double | value | ||
) |
Set the value in the a 3-D (maximum) grid
void set_LOCATOR_ITEM | ( | Db * | db, |
const ELoc & | locatorType, | ||
int | item, | ||
int | iech, | ||
double | value | ||
) |