1.1.0
CCC
 
Delaunay.cpp File Reference
#include "geoslib_old_f.h"
#include "geoslib_f_private.h"
#include "Basic/Utilities.hpp"
#include "Basic/Law.hpp"
#include "Basic/MathFunc.hpp"
#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "Mesh/MeshEStandard.hpp"
#include "Geometry/GeometryHelper.hpp"
#include <math.h>
#include <string.h>
#include <stdio.h>

Functions

int MSS (int ndim, int ipol, int icas, int icorn, int idim)
 
double * extend_grid (DbGrid *db, const double *gext, int *nout)
 
double * extend_point (Db *db, const double *gext, int *nout)
 
double * get_db_extension (Db *dbin, Db *dbout, int *nout)
 
AMeshmeshes_turbo_2D_grid_build (DbGrid *dbgrid)
 
int meshes_2D_write (const char *file_name, const char *obj_name, int verbose, int ndim, int ncode, int ntri, int npoints, const VectorInt &ntcode, const VectorInt &triangles, const VectorDouble &points)
 
void mesh_stats (int ndim, int ncorner, int nmesh, int *meshes, double *points)
 
AMeshmeshes_turbo_3D_grid_build (DbGrid *dbgrid)
 
AMeshmeshes_turbo_1D_grid_build (DbGrid *dbgrid)
 

Function Documentation

double* extend_grid ( DbGrid db,
const double *  gext,
int *  nout 
)

Extend a Grid by gext

Returns
The coordinates of the extension points (Dimension: number * ndim)
Parameters
[in]dbOutput Db grid structure
[in]gextArray of domain dilation
[out]noutNumber of extension points
Remarks
The returned array 'ext' must be freed by the calling function
double* extend_point ( Db db,
const double *  gext,
int *  nout 
)

Extend a Point Domain by gext

Returns
The coordinates of the extension points (Dimension: number * ndim)
Parameters
[in]dbOutput Db grid structure
[in]gextArray of domain dilation
[out]noutNumber of extension points
Remarks
The returned array 'ext' must be freed by the calling function
double* get_db_extension ( Db dbin,
Db dbout,
int *  nout 
)

Define the maximum extension between dbin and/or dbout

Returns
Array of extensions
Parameters
[in]dbinDb input (optional)
[in]dboutDb output (optional)
[out]noutNumber of extension points
Remarks
The calling function must free the returned array 'ext'
with its dimension: ndim * 2^ndim
void mesh_stats ( int  ndim,
int  ncorner,
int  nmesh,
int *  meshes,
double *  points 
)

Calculate the statistics on a set of meshes

Parameters
[in]ndimSpace dimension
[in]ncornerNumber of corners for each mesh
[in]nmeshNumber of meshes
[in]meshesArray of vertex indices for each mesh
[in]pointsArray of 'ndim' coordinates for mesh vertex
int meshes_2D_write ( const char *  file_name,
const char *  obj_name,
int  verbose,
int  ndim,
int  ncode,
int  ntri,
int  npoints,
const VectorInt ntcode,
const VectorInt triangles,
const VectorDouble points 
)

Dump the contents of a triangulation in an ASCII file according to the STL format

Parameters
[in]file_nameNmae of the created ASCII file
[in]obj_nameName assigned to the object
[in]verboseVerbose flag
[in]ndimSpace dimension
[in]ncodeNumber of different codes
[in]ntriNumber of triangles (expected)
[in]npointsNumber of poins (expected)
[in]ntcodeArray of number of triangles per code
[in]trianglesArray of vertex indices for each triangle
[in]pointsArray of 3-D coordinates for triangle vertices
AMesh* meshes_turbo_1D_grid_build ( DbGrid dbgrid)

Build the regular meshing from a 1-D grid

Returns
The newly created AMesh structure
Parameters
[in]dbgridDb structure
AMesh* meshes_turbo_2D_grid_build ( DbGrid dbgrid)

Build the regular 2-D grid meshing

Returns
Pointer to the newly created AMesh structure
Parameters
[in]dbgridDb structure
AMesh* meshes_turbo_3D_grid_build ( DbGrid dbgrid)

Build the regular 3-D grid meshing

Returns
Pointer to the newly created AMesh structure
Parameters
[in]dbgridDb structure
int MSS ( int  ndim,
int  ipol,
int  icas,
int  icorn,
int  idim 
)

Returns the shift value for the apex('icorn')

Returns
Shift value
Parameters
[in]ndimSpace dimension (1, 2 or 3)
[in]ipolRank of the polarization (starting from 0)
[in]icasRank of the case (starting from 0)
[in]icornRank of the corner (starting from 0)
[in]idimRank of the coordinate (starting from 0)
Remarks
This function returns the shift value to be applied to each
coordinate index, for each apex for each mesh which constitutes
the partition of a cell into meshes (using Turbo facility)
When 'ndim' is provided as negative, a special case is programmed