#include "geoslib_old_f.h"
#include "Basic/Utilities.hpp"
#include "Basic/String.hpp"
#include "Basic/OptDbg.hpp"
#include "Basic/VectorHelper.hpp"
#include "LithoRule/RuleProp.hpp"
#include "LithoRule/PropDef.hpp"
#include "LithoRule/Rule.hpp"
#include "LithoRule/RuleShift.hpp"
#include "LithoRule/RuleShadow.hpp"
#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "Variogram/Vario.hpp"
#include "Model/Model.hpp"
Functions | |
Rule * | rule_free (const Rule *rule) |
static int | st_proportion_locate (PropDef *propdef, int ifac_ref) |
static int | st_proportion_transform (PropDef *propdef) |
void | proportion_rule_process (PropDef *propdef, const EProcessOper &mode) |
void | proportion_print (PropDef *propdef) |
static int | st_proportion_changed (PropDef *propdef) |
static int | st_proportion_define (PropDef *propdef, const Db *db, int iech, int isimu, int nbsimu, int *jech) |
int | rule_thresh_define_shadow (PropDef *propdef, Db *db, const RuleShadow *rule, int facies, int iech, int isimu, int nbsimu, double *t1min, double *t1max, double *t2min, double *t2max, double *sh_dsup, double *sh_down) |
int | rule_thresh_define (PropDef *propdef, Db *db, const Rule *rule, int facies, int iech, int isimu, int nbsimu, int flag_check, double *t1min, double *t1max, double *t2min, double *t2max) |
int | db_rule_shadow (Db *db, Db *dbprop, RuleShadow *rule, Model *model, const VectorDouble &props, int flag_stat, int nfacies) |
int | _db_rule (Db *db, const RuleProp *ruleprop, Model *model, const NamingConvention &namconv) |
int | db_bounds_shadow (Db *db, Db *dbprop, RuleShadow *rule, Model *model, const VectorDouble &props, int flag_stat, int nfacies) |
int | _db_bounds (Db *db, const RuleProp *ruleprop, Model *model, const NamingConvention &namconv) |
void | propdef_reset (PropDef *propdef) |
PropDef * | proportion_manage (int mode, int flag_facies, int flag_stat, int ngrf1, int ngrf2, int nfac1, int nfac2, Db *db, const Db *dbprop, const VectorDouble &propcst, PropDef *proploc) |
int | _db_threshold (Db *db, const RuleProp *ruleprop, Model *model, const NamingConvention &namconv) |
Model * | model_rule_combine (const Model *model1, const Model *model2, const Rule *rule) |
int _db_bounds | ( | Db * | db, |
const RuleProp * | ruleprop, | ||
Model * | model, | ||
const NamingConvention & | namconv | ||
) |
int _db_rule | ( | Db * | db, |
const RuleProp * | ruleprop, | ||
Model * | model, | ||
const NamingConvention & | namconv | ||
) |
Apply the Rule transformation to convert a set of Gaussian vectors into the corresponding Facies in a Db
[in] | db | Output Db structure |
[in] | ruleprop | RuleProp structure |
[in] | model | First Model structure (only for SHIFT) |
[in] | namconv | Naming convention |
int _db_threshold | ( | Db * | db, |
const RuleProp * | ruleprop, | ||
Model * | model, | ||
const NamingConvention & | namconv | ||
) |
int db_bounds_shadow | ( | Db * | db, |
Db * | dbprop, | ||
RuleShadow * | rule, | ||
Model * | model, | ||
const VectorDouble & | props, | ||
int | flag_stat, | ||
int | nfacies | ||
) |
int db_rule_shadow | ( | Db * | db, |
Db * | dbprop, | ||
RuleShadow * | rule, | ||
Model * | model, | ||
const VectorDouble & | props, | ||
int | flag_stat, | ||
int | nfacies | ||
) |
Apply the Rule transformation to the GRFs of a Db (Shadow case)
[in] | db | Output Db structure |
[in] | dbprop | Db structure used for proportions (non-stationary case) |
[in] | rule | Lithotype Rule definition |
[in] | model | First Model structure (only for SHIFT) |
[in] | props | Array of proportions for the facies |
[in] | flag_stat | 1 for stationary; 0 otherwise |
[in] | nfacies | Number of facies |
void propdef_reset | ( | PropDef * | propdef | ) |
Set memory proportion so as to provoke the update at first usage
[in] | propdef | Pointer to Propdef structure |
PropDef* proportion_manage | ( | int | mode, |
int | flag_facies, | ||
int | flag_stat, | ||
int | ngrf1, | ||
int | ngrf2, | ||
int | nfac1, | ||
int | nfac2, | ||
Db * | db, | ||
const Db * | dbprop, | ||
const VectorDouble & | propcst, | ||
PropDef * | proploc | ||
) |
Allocate or deallocate a proportion array
[in] | mode | 1 for allocation; -1 for deallocation |
[in] | flag_facies | 1 if Gibbs is used for facies |
[in] | flag_stat | 1 if the proportions are stationary |
[in] | ngrf1 | Number of GRFs for the first PGS |
[in] | ngrf2 | Number of GRFs for the second PGS |
[in] | nfac1 | Number of facies for the first PGS |
[in] | nfac2 | Number of facies for the second PGS |
[in] | db | Db structure containing the data |
[in] | dbprop | Db structure containing the proportions (only used in the non-stationary case) |
[in] | propcst | Constant set of proportions (used if flag_stat) |
[in] | proploc | PropDef structure (used for mode<0) |
void proportion_print | ( | PropDef * | propdef | ) |
Print the (non-stationary) proportions
[in] | propdef | PropDef structure |
void proportion_rule_process | ( | PropDef * | propdef, |
const EProcessOper & | mode | ||
) |
Set the method to compute Proportions
[in] | propdef | PropDef structure |
[in] | mode | Type of operation (EProcessOper) |
int rule_thresh_define | ( | PropDef * | propdef, |
Db * | db, | ||
const Rule * | rule, | ||
int | facies, | ||
int | iech, | ||
int | isimu, | ||
int | nbsimu, | ||
int | flag_check, | ||
double * | t1min, | ||
double * | t1max, | ||
double * | t2min, | ||
double * | t2max | ||
) |
Set the (non-stationary) proportions and define thresholds
[in] | propdef | PropDef structure |
[in] | db | Db input structure |
[in] | rule | Rule structure |
[in] | facies | Facies of interest (or ITEST) starting from 1 |
[in] | iech | Rank of the data in the input Db |
[in] | isimu | Rank of the simulation (EProcessOper::CONDITIONAL) |
[in] | nbsimu | Number of simulations |
[in] | flag_check | 1 if the consistency check with the actual proportion of the current facies must be done |
[out] | t1min | Minimum threshold for Y1 |
[out] | t1max | Maximum threshold for Y1 |
[out] | t2min | Minimum threshold for Y2 |
[out] | t2max | Maximum threshold for Y2 |
int rule_thresh_define_shadow | ( | PropDef * | propdef, |
Db * | db, | ||
const RuleShadow * | rule, | ||
int | facies, | ||
int | iech, | ||
int | isimu, | ||
int | nbsimu, | ||
double * | t1min, | ||
double * | t1max, | ||
double * | t2min, | ||
double * | t2max, | ||
double * | sh_dsup, | ||
double * | sh_down | ||
) |
Set the (non-stationary) proportions and define thresholds (for shadow only)
[in] | propdef | PropDef structure |
[in] | db | Db input structure |
[in] | rule | Rule structure |
[in] | facies | Facies of interest (or GV_ITEST) |
[in] | iech | Rank of the data in the input Db |
[in] | isimu | Rank of the simulation (EProcessOper::CONDITIONAL) |
[in] | nbsimu | Number of simulations (EProcessOper::CONDITIONAL) |
[out] | t1min | Minimum threshold for Y1 |
[out] | t1max | Maximum threshold for Y1 |
[out] | t2min | Minimum threshold for Y2 |
[out] | t2max | Maximum threshold for Y2 |
[out] | sh_dsup | Local or global upwards shift (shadow) |
[out] | sh_down | Local or global downwards shift (shadow) |
|
static |
Check if the proportion has changed since the previous usage and store the current proportions for future comparison
[in] | propdef | PropDef structure |
|
static |
Set the (non-stationary) proportions
[in] | propdef | PropDef structure |
[in] | db | Db input structure |
[in] | iech | Rank of the data in the input Db |
[in] | isimu | Rank of the simulation (EProcessOper::CONDITIONAL) |
[in] | nbsimu | Number of simulations |
[out] | jech | Rank of the auxiliary data in the input Db |
|
static |
Locate the current proportions
[in] | propdef | PropDef structure |
[in] | ifac_ref | Conditional (first variable) facies (Only used for EProcessOper::CONDITIONAL) |