geompack.C File Reference
Include dependency graph for geompack.C:

Go to the source code of this file.

Macros

#define LEVEL_MAX   25
 
#define INCX   5
 
#define INCX   10
 
#define TIME_SIZE   29
 
#define TIME_SIZE   29
 
#define DIM_NUM   2
 
#define DIM_NUM   2
 

Functions

double d_epsilon (void)
 
double d_max (double x, double y)
 
double d_min (double x, double y)
 
void d2vec_part_quick_a (int n, double a[], int *l, int *r)
 
void d2vec_permute (int n, double a[], int p[])
 
int * d2vec_sort_heap_index_a (int n, double a[])
 
void d2vec_sort_quick_a (int n, double a[])
 
int diaedg (double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)
 
void dmat_transpose_print (int m, int n, double a[], const char *title)
 
void dmat_transpose_print_some (int m, int n, double a[], int ilo, int jlo, int ihi, int jhi, const char *title)
 
void dmat_uniform (int m, int n, double b, double c, int *seed, double r[])
 
int dtris2 (int point_num, double point_xy[], int *tri_num, int tri_vert[], int tri_nabe[])
 
bool dvec_eq (int n, double a1[], double a2[])
 
bool dvec_gt (int n, double a1[], double a2[])
 
bool dvec_lt (int n, double a1[], double a2[])
 
void dvec_print (int n, double a[], const char *title)
 
void dvec_swap (int n, double a1[], double a2[])
 
int i_max (int i1, int i2)
 
int i_min (int i1, int i2)
 
int i_modp (int i, int j)
 
int i_sign (int i)
 
int i_wrap (int ival, int ilo, int ihi)
 
void imat_transpose_print (int m, int n, int a[], const char *title)
 
void imat_transpose_print_some (int m, int n, int a[], int ilo, int jlo, int ihi, int jhi, const char *title)
 
void ivec_heap_d (int n, int a[])
 
int * ivec_indicator (int n)
 
void ivec_sort_heap_a (int n, int a[])
 
void ivec_sorted_unique (int n, int a[], int *nuniq)
 
int lrline (double xu, double yu, double xv1, double yv1, double xv2, double yv2, double dv)
 
bool perm_check (int n, int p[])
 
void perm_inv (int n, int p[])
 
int * points_delaunay_naive_2d (int n, double p[], int *ntri)
 
int s_len_trim (const char *s)
 
int swapec (int i, int *top, int *btri, int *bedg, int point_num, double point_xy[], int tri_num, int tri_vert[], int tri_nabe[], int stack[])
 
void timestamp (void)
 
char * timestring (void)
 
double * triangle_circumcenter_2d (double t[])
 
bool triangulation_plot_eps (const char *file_out_name, int g_num, double g_xy[], int tri_num, int nod_tri[])
 
void triangulation_print (int point_num, double xc[], int tri_num, int tri_vert[], int tri_nabe[])
 
void vbedg (double x, double y, int point_num, double point_xy[], int tri_num, int tri_vert[], int tri_nabe[], int *ltri, int *ledg, int *rtri, int *redg)
 

Macro Definition Documentation

◆ LEVEL_MAX

#define LEVEL_MAX   25

Referenced by d2vec_sort_quick_a().

◆ INCX [1/2]

#define INCX   5

◆ INCX [2/2]

#define INCX   10

◆ TIME_SIZE [1/2]

#define TIME_SIZE   29

Referenced by timestamp(), and timestring().

◆ TIME_SIZE [2/2]

#define TIME_SIZE   29

◆ DIM_NUM [1/2]

#define DIM_NUM   2

◆ DIM_NUM [2/2]

#define DIM_NUM   2

Function Documentation

◆ d_epsilon()

double d_epsilon ( void  )

Definition at line 15 of file geompack.C.

Referenced by diaedg(), and dtris2().

Here is the caller graph for this function:

◆ d_max()

double d_max ( double  x,
double  y 
)

Definition at line 57 of file geompack.C.

References x, and y.

Referenced by diaedg(), dtris2(), lrline(), and triangulation_plot_eps().

Here is the caller graph for this function:

◆ d_min()

double d_min ( double  x,
double  y 
)

Definition at line 91 of file geompack.C.

References x, and y.

Referenced by triangulation_plot_eps().

Here is the caller graph for this function:

◆ d2vec_part_quick_a()

void d2vec_part_quick_a ( int  n,
double  a[],
int *  l,
int *  r 
)

Definition at line 125 of file geompack.C.

References dvec_eq(), dvec_gt(), dvec_lt(), dvec_swap(), Foam::exit(), and n.

Referenced by d2vec_sort_quick_a().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ d2vec_permute()

void d2vec_permute ( int  n,
double  a[],
int  p[] 
)

Definition at line 255 of file geompack.C.

References Foam::exit(), n, and perm_check().

Referenced by dtris2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ d2vec_sort_heap_index_a()

int* d2vec_sort_heap_index_a ( int  n,
double  a[] 
)

Definition at line 380 of file geompack.C.

References ivec_indicator(), and n.

Referenced by dtris2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ d2vec_sort_quick_a()

void d2vec_sort_quick_a ( int  n,
double  a[] 
)

Definition at line 510 of file geompack.C.

References d2vec_part_quick_a(), Foam::exit(), LEVEL_MAX, and n.

Here is the call graph for this function:

◆ diaedg()

int diaedg ( double  x0,
double  y0,
double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3 
)

Definition at line 628 of file geompack.C.

References d_epsilon(), d_max(), s(), and Foam::y0().

Referenced by swapec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dmat_transpose_print()

void dmat_transpose_print ( int  m,
int  n,
double  a[],
const char *  title 
)

Definition at line 745 of file geompack.C.

References dmat_transpose_print_some().

Referenced by triangulation_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dmat_transpose_print_some()

void dmat_transpose_print_some ( int  m,
int  n,
double  a[],
int  ilo,
int  jlo,
int  ihi,
int  jhi,
const char *  title 
)

Definition at line 776 of file geompack.C.

References i_max(), i_min(), INCX, s_len_trim(), and Foam::setw().

Referenced by dmat_transpose_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dmat_uniform()

void dmat_uniform ( int  m,
int  n,
double  b,
double  c,
int *  seed,
double  r[] 
)

Definition at line 862 of file geompack.C.

References Foam::constant::physicoChemical::b, k, and n.

◆ dtris2()

int dtris2 ( int  point_num,
double  point_xy[],
int *  tri_num,
int  tri_vert[],
int  tri_nabe[] 
)

Definition at line 949 of file geompack.C.

References d2vec_permute(), d2vec_sort_heap_index_a(), d_epsilon(), d_max(), Foam::constant::electromagnetic::e, k, lrline(), n, perm_inv(), swapec(), and vbedg().

Referenced by triSurfaceTools::delaunay2D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dvec_eq()

bool dvec_eq ( int  n,
double  a1[],
double  a2[] 
)

Definition at line 1297 of file geompack.C.

References n.

Referenced by d2vec_part_quick_a().

Here is the caller graph for this function:

◆ dvec_gt()

bool dvec_gt ( int  n,
double  a1[],
double  a2[] 
)

Definition at line 1338 of file geompack.C.

References n.

Referenced by d2vec_part_quick_a().

Here is the caller graph for this function:

◆ dvec_lt()

bool dvec_lt ( int  n,
double  a1[],
double  a2[] 
)

Definition at line 1392 of file geompack.C.

References n.

Referenced by d2vec_part_quick_a().

Here is the caller graph for this function:

◆ dvec_print()

void dvec_print ( int  n,
double  a[],
const char *  title 
)

Definition at line 1445 of file geompack.C.

References s_len_trim(), and Foam::setw().

Here is the call graph for this function:

◆ dvec_swap()

void dvec_swap ( int  n,
double  a1[],
double  a2[] 
)

Definition at line 1490 of file geompack.C.

References n.

Referenced by d2vec_part_quick_a().

Here is the caller graph for this function:

◆ i_max()

int i_max ( int  i1,
int  i2 
)

Definition at line 1527 of file geompack.C.

Referenced by dmat_transpose_print_some(), i_wrap(), and imat_transpose_print_some().

Here is the caller graph for this function:

◆ i_min()

int i_min ( int  i1,
int  i2 
)

Definition at line 1562 of file geompack.C.

Referenced by dmat_transpose_print_some(), i_wrap(), and imat_transpose_print_some().

Here is the caller graph for this function:

◆ i_modp()

int i_modp ( int  i,
int  j 
)

Definition at line 1597 of file geompack.C.

References Foam::exit().

Referenced by i_wrap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ i_sign()

int i_sign ( int  i)

Definition at line 1672 of file geompack.C.

Referenced by perm_inv().

Here is the caller graph for this function:

◆ i_wrap()

int i_wrap ( int  ival,
int  ilo,
int  ihi 
)

Definition at line 1711 of file geompack.C.

References i_max(), i_min(), and i_modp().

Referenced by swapec(), triangulation_plot_eps(), triangulation_print(), and vbedg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imat_transpose_print()

void imat_transpose_print ( int  m,
int  n,
int  a[],
const char *  title 
)

Definition at line 1783 of file geompack.C.

References imat_transpose_print_some().

Referenced by triangulation_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imat_transpose_print_some()

void imat_transpose_print_some ( int  m,
int  n,
int  a[],
int  ilo,
int  jlo,
int  ihi,
int  jhi,
const char *  title 
)

Definition at line 1816 of file geompack.C.

References i_max(), i_min(), INCX, s_len_trim(), and Foam::setw().

Referenced by imat_transpose_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ivec_heap_d()

void ivec_heap_d ( int  n,
int  a[] 
)

Definition at line 1913 of file geompack.C.

Referenced by ivec_sort_heap_a().

Here is the caller graph for this function:

◆ ivec_indicator()

int* ivec_indicator ( int  n)

Definition at line 2037 of file geompack.C.

References n.

Referenced by d2vec_sort_heap_index_a().

Here is the caller graph for this function:

◆ ivec_sort_heap_a()

void ivec_sort_heap_a ( int  n,
int  a[] 
)

Definition at line 2074 of file geompack.C.

References ivec_heap_d().

Referenced by triangulation_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ivec_sorted_unique()

void ivec_sorted_unique ( int  n,
int  a[],
int *  nuniq 
)

Definition at line 2148 of file geompack.C.

References n.

Referenced by triangulation_print().

Here is the caller graph for this function:

◆ lrline()

int lrline ( double  xu,
double  yu,
double  xv1,
double  yv1,
double  xv2,
double  yv2,
double  dv 
)

Definition at line 2199 of file geompack.C.

References d_max(), and Foam::sqrt().

Referenced by dtris2(), and vbedg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perm_check()

bool perm_check ( int  n,
int  p[] 
)

Definition at line 2284 of file geompack.C.

References found, and n.

Referenced by d2vec_permute(), and perm_inv().

Here is the caller graph for this function:

◆ perm_inv()

void perm_inv ( int  n,
int  p[] 
)

Definition at line 2342 of file geompack.C.

References Foam::exit(), i_sign(), n, and perm_check().

Referenced by dtris2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ points_delaunay_naive_2d()

int* points_delaunay_naive_2d ( int  n,
double  p[],
int *  ntri 
)

Definition at line 2429 of file geompack.C.

References Foam::count(), k, n, and Foam::yn().

Here is the call graph for this function:

◆ s_len_trim()

int s_len_trim ( const char *  s)

Definition at line 2564 of file geompack.C.

References n, and s().

Referenced by dmat_transpose_print_some(), dvec_print(), and imat_transpose_print_some().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swapec()

int swapec ( int  i,
int *  top,
int *  btri,
int *  bedg,
int  point_num,
double  point_xy[],
int  tri_num,
int  tri_vert[],
int  tri_nabe[],
int  stack[] 
)

Definition at line 2608 of file geompack.C.

References Foam::constant::physicoChemical::b, Foam::constant::universal::c, diaedg(), Foam::constant::electromagnetic::e, f(), i_wrap(), s(), x, and y.

Referenced by dtris2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timestamp()

void timestamp ( void  )

Definition at line 2886 of file geompack.C.

References TIME_SIZE.

◆ timestring()

char* timestring ( void  )

Definition at line 2933 of file geompack.C.

References s(), and TIME_SIZE.

Referenced by triangulation_plot_eps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triangle_circumcenter_2d()

double* triangle_circumcenter_2d ( double  t[])

Definition at line 2976 of file geompack.C.

References DIM_NUM.

◆ triangulation_plot_eps()

bool triangulation_plot_eps ( const char *  file_out_name,
int  g_num,
double  g_xy[],
int  tri_num,
int  nod_tri[] 
)

Definition at line 3049 of file geompack.C.

References d_max(), d_min(), Foam::constant::electromagnetic::e, g, i_wrap(), k, and timestring().

Here is the call graph for this function:

◆ triangulation_print()

void triangulation_print ( int  point_num,
double  xc[],
int  tri_num,
int  tri_vert[],
int  tri_nabe[] 
)

Definition at line 3276 of file geompack.C.

References DIM_NUM, dmat_transpose_print(), i_wrap(), imat_transpose_print(), ivec_sort_heap_a(), ivec_sorted_unique(), k, s(), and Foam::setw().

Here is the call graph for this function:

◆ vbedg()

void vbedg ( double  x,
double  y,
int  point_num,
double  point_xy[],
int  tri_num,
int  tri_vert[],
int  tri_nabe[],
int *  ltri,
int *  ledg,
int *  rtri,
int *  redg 
)

Definition at line 3446 of file geompack.C.

References Foam::constant::physicoChemical::b, Foam::constant::electromagnetic::e, i_wrap(), and lrline().

Referenced by dtris2().

Here is the call graph for this function:
Here is the caller graph for this function: