1.4.0
CCC
 
surface.cpp File Reference
#include "geoslib_old_f.h"
#include "Basic/Utilities.hpp"
#include "Matrix/MatrixSquareSymmetric.hpp"
#include "Db/Db.hpp"
#include "Basic/Memory.hpp"
#include "Core/Keypair.hpp"
#include "Model/Model.hpp"
#include <math.h>

Classes

struct  Surf_Def
 

Macros

#define MAT(i, j)   (mat[3*(i) + (j)])
 
#define EIGVEC(i, j)   (eigvec[3*(i) + (j)])
 

Functions

static Surf_Defst_reference_manage (int mode, Surf_Def *surf_reference)
 
static void st_normalize_vector (double *vect)
 
static int st_reference_define (Db *db, int *iptr_init, Surf_Def *surf_reference)
 
static void st_mima_init (double mima[2][3], int *nundefs)
 
static void st_mima_process (double mima[2][3], double x, double y, double z, int *nundefs)
 
static void st_mima_print (const char *title, double mima[2][3], int nundefs)
 
static void st_transform_init2proj (Surf_Def *surf_reference, Db *db, int *iptr_init, int *iptr_proj)
 
static void st_transform_proj2init (Surf_Def *surf_reference, int npoint, VectorDouble &points)
 
static int st_selection_per_code (Db *db, int icode, int iptr_sel)
 
static int st_concatenate_arrays (int ndim, int ntri, int npoints, VectorInt &triloc, VectorDouble &poiloc, int *ntri_arg, int *npoint_arg, VectorInt &triangles, VectorDouble &points)
 
static int st_rectangle_surface (Surf_Def *surf_reference, int *ntri_arg, int *npoint_arg, VectorInt &triangles, VectorDouble &points)
 
int db_trisurf (Db *db, Model *model, const String &triswitch, int icode0, int verbose, int *ncode_arg, int *ntri_arg, int *npoint_arg, double *codesel, VectorInt &ntcode, VectorInt &triangles, VectorDouble &points)
 

Variables

static int VERBOSE = 0
 

Macro Definition Documentation

◆ EIGVEC

#define EIGVEC (   i,
 
)    (eigvec[3*(i) + (j)])

◆ MAT

#define MAT (   i,
 
)    (mat[3*(i) + (j)])

Function Documentation

◆ db_trisurf()

int db_trisurf ( Db db,
Model model,
const String triswitch,
int  icode0,
int  verbose,
int *  ncode_arg,
int *  ntri_arg,
int *  npoint_arg,
double *  codesel,
VectorInt ntcode,
VectorInt triangles,
VectorDouble points 
)

Free the triangleio structure

Parameters
[in]dbDb structure
[in]modelModel structure
[in]triswitchTriangulation option
[in]icode0Reference Code attributed to the Target Fault
[in]verboseVerbose option
[out]ncode_argNumber of different codes
[out]ntri_argNumber of triangles
[out]npoint_argNumber of vertices
[out]codeselSelected code (if any)
[out]ntcodeArray for the number of triangles per code
[out]trianglesArray on the triangle corners
[out]pointsArray on the 3-D vertices coordinates
Remarks
The returned arrays 'triangle', 'points'
must be freed by the calling function

◆ st_concatenate_arrays()

static int st_concatenate_arrays ( int  ndim,
int  ntri,
int  npoints,
VectorInt triloc,
VectorDouble poiloc,
int *  ntri_arg,
int *  npoint_arg,
VectorInt triangles,
VectorDouble points 
)
static

Concatenate the resulting arrays to the returned arrays

Parameters
[in]ndimSpace dimension
[in]ntriNumber of triangles
[in]npointsNumber of vertices
[in]trilocArray on the triangle corners
[in]poilocArray on the vertices coordinates
[out]ntri_argCumulated number of triangles
[out]npoint_argCumulated number of vertices
[out]trianglesCumulated array on the triangle corners
[out]pointsCumulated array on the 3-D vertices coordinates

◆ st_mima_init()

static void st_mima_init ( double  mima[2][3],
int *  nundefs 
)
static

Initialize the minimum-maximum array

Parameters
[out]mimaStatistics array
[out]nundefsNumber of undefined values

◆ st_mima_print()

static void st_mima_print ( const char *  title,
double  mima[2][3],
int  nundefs 
)
static

Update the minimum-maximum array

Parameters
[in]titleTitle of the statistics
[in]mimaStatistics array
[in]nundefsNumber of undefined values

◆ st_mima_process()

static void st_mima_process ( double  mima[2][3],
double  x,
double  y,
double  z,
int *  nundefs 
)
static

Print the minimum-maximum array

Parameters
[in,out]mimaStatistics array
[in]x,y,zCoordinates
[in,out]nundefsNumber of undefined values

◆ st_normalize_vector()

static void st_normalize_vector ( double *  vect)
static

Normalize the input vector

Parameters
[in,out]vectVector to be normalized

◆ st_rectangle_surface()

static int st_rectangle_surface ( Surf_Def surf_reference,
int *  ntri_arg,
int *  npoint_arg,
VectorInt triangles,
VectorDouble points 
)
static

Generate the surface as the rectangle containing the surface

Parameters
[in]surf_referenceSurf_Def structure (used for deallocation)
[out]ntri_argNumber of triangles generated
[out]npoint_argNumber of vertices
[out]trianglesArray of triangulate vertex indices
[out]pointsArray containing the 2-D vertices

◆ st_reference_define()

static int st_reference_define ( Db db,
int *  iptr_init,
Surf_Def surf_reference 
)
static

Define the Projection new system by Total Least Squares

Parameters
[in]dbDb structure
[in]iptr_initArray of coordinate locators (initial)
[out]surf_referenceSurf_Def structure

◆ st_reference_manage()

static Surf_Def* st_reference_manage ( int  mode,
Surf_Def surf_reference 
)
static

Manage the Projection system

Returns
Pointer to the newly managed Surf_Def structure
Parameters
[in]modeType operation (1: allocation; -1: deallocation)
[in]surf_referenceSurf_Def structure (used for deallocation)

◆ st_selection_per_code()

static int st_selection_per_code ( Db db,
int  icode,
int  iptr_sel 
)
static

Select the samples corresponding to the target code (if defined)

Returns
Returns the number of selected samples
Parameters
[in]dbDb structure
[in]icodeReference Code value
[in]iptr_selPointer to the selection
Remarks
Any already existing selection is not taken into account
If the code is undefined, this function has no action

◆ st_transform_init2proj()

static void st_transform_init2proj ( Surf_Def surf_reference,
Db db,
int *  iptr_init,
int *  iptr_proj 
)
static

Project the samples on the reference plane

Parameters
[in]surf_referenceSurf_Ref structure
[in]dbDb structure
[in]iptr_initArray of coordinate locators (initial)
[in]iptr_projArray of coordinate locators (projected)

◆ st_transform_proj2init()

static void st_transform_proj2init ( Surf_Def surf_reference,
int  npoint,
VectorDouble points 
)
static

Project the samples from the projected to the initial space

Parameters
[in]surf_referenceSurf_Ref structure
[in]npointNumber of points
[in]pointsArray of 3-D coordinates

Variable Documentation

◆ VERBOSE

int VERBOSE = 0
static