src/fvm/fvm_triangulate.c File Reference

| programmer's documentation

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
fvm_triangulate.c File Reference
`#include "cs_defs.h"`
`#include <assert.h>`
`#include <math.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "bft_mem.h"`
`#include "fvm_defs.h"`
`#include "fvm_triangulate.h"`
Include dependency graph for fvm_triangulate.c:

## Macros
#define | _CROSS_PRODUCT_3D(cross_v1_v2, v1, v2)
#define | _DOT_PRODUCT_3D(v1, v2)
#define | _MODULE_3D(v) sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2])
#define | _N_VERTICES_AUTO_MAX
#define | _EDGE_INDEX(i_min, i_max) (n_vertices*i_min - i_min*(i_min+1)/2 + i_max-i_min - 1)

## Functions
fvm_triangulate_state_t * | fvm_triangulate_state_create (const int n_vertices_max)
fvm_triangulate_state_t * | fvm_triangulate_state_destroy (fvm_triangulate_state_t *this_state)
int | fvm_triangulate_polygon (int dim, int n_vertices, const cs_coord_t coords[], const cs_lnum_t parent_vertex_num[], const cs_lnum_t polygon_vertices[], fvm_triangulate_def_t mode, cs_lnum_t triangle_vertices[], fvm_triangulate_state_t *const state)
int | fvm_triangulate_quadrangle (int dim, const cs_coord_t coords[], const cs_lnum_t parent_vertex_num[], const cs_lnum_t quadrangle_vertices[], cs_lnum_t triangle_vertices[])

## Macro Definition Documentation

#define _CROSS_PRODUCT_3D | ( |  | cross_v1_v2,
|  |  | v1,
|  |  | v2
| ) |  |

Value:
( \
cross_v1_v2[0] = v1[1]*v2[2] - v1[2]*v2[1], \
cross_v1_v2[1] = v1[2]*v2[0] - v1[0]*v2[2], \
cross_v1_v2[2] = v1[0]*v2[1] - v1[1]*v2[0] )

#define _DOT_PRODUCT_3D | ( |  | v1,
|  |  | v2
| ) |  |

Value:
( \
v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2])

#define _EDGE_INDEX | ( |  | i_min,
|  |  | i_max
| ) |  | (n_vertices*i_min - i_min*(i_min+1)/2 + i_max-i_min - 1)

#define _MODULE_3D | ( |  | v | ) | sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2])

#define _N_VERTICES_AUTO_MAX

Value:
20 /* Size of local temporary coordinates
buffer; above this size, allocation
is necessary */

## Function Documentation

int fvm_triangulate_polygon | ( | int | dim,
|  | int | n_vertices,
|  | const cs_coord_t | coords[],
|  | const cs_lnum_t | parent_vertex_num[],
|  | const cs_lnum_t | polygon_vertices[],
|  | fvm_triangulate_def_t | mode,
|  | cs_lnum_t | triangle_vertices[],
|  | fvm_triangulate_state_t *const | state
| ) |  |

int fvm_triangulate_quadrangle | ( | int | dim,
|  | const cs_coord_t | coords[],
|  | const cs_lnum_t | parent_vertex_num[],
|  | const cs_lnum_t | quadrangle_vertices[],
|  | cs_lnum_t | triangle_vertices[]
| ) |  |

fvm_triangulate_state_t* fvm_triangulate_state_create | ( | const int | n_vertices_max | ) |

fvm_triangulate_state_t* fvm_triangulate_state_destroy | ( | fvm_triangulate_state_t * | this_state | ) |