src/fvm/fvm_tesselation.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 | Typedefs | Functions
fvm_tesselation.c File Reference
`#include "cs_defs.h"`
`#include <assert.h>`
`#include <math.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "bft_error.h"`
`#include "bft_mem.h"`
`#include "bft_printf.h"`
`#include "fvm_defs.h"`
`#include "fvm_io_num.h"`
`#include "fvm_triangulate.h"`
`#include "cs_parall.h"`
`#include "fvm_tesselation.h"`
Include dependency graph for fvm_tesselation.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 | _ENCODING_BITS (sizeof(fvm_tesselation_encoding_t)*8/3)
#define | _DECODE_TRIANGLE_VERTICES(vertex_list, encoding, decoding_mask)

## Typedefs
typedef unsigned | fvm_tesselation_encoding_t

## Functions
fvm_tesselation_t * | fvm_tesselation_create (fvm_element_t element_type, cs_lnum_t n_elements, const cs_lnum_t face_index[], const cs_lnum_t face_num[], const cs_lnum_t vertex_index[], const cs_lnum_t vertex_num[], const fvm_io_num_t *global_element_num)
fvm_tesselation_t * | fvm_tesselation_destroy (fvm_tesselation_t *this_tesselation)
void | fvm_tesselation_init (fvm_tesselation_t *this_tesselation, int dim, const cs_coord_t vertex_coords[], const cs_lnum_t parent_vertex_num[], cs_lnum_t *error_count)
void | fvm_tesselation_reduce (fvm_tesselation_t *this_tesselation)
cs_lnum_t | fvm_tesselation_n_elements (const fvm_tesselation_t *this_tesselation)
cs_gnum_t | fvm_tesselation_n_g_vertices_add (const fvm_tesselation_t *this_tesselation)
cs_lnum_t | fvm_tesselation_n_vertices_add (const fvm_tesselation_t *this_tesselation)
int | fvm_tesselation_n_sub_types (const fvm_tesselation_t *this_tesselation)
fvm_element_t | fvm_tesselation_sub_type (const fvm_tesselation_t *this_tesselation, int sub_type_id)
cs_lnum_t | fvm_tesselation_n_sub_elements (const fvm_tesselation_t *this_tesselation, fvm_element_t sub_type)
void | fvm_tesselation_get_global_size (const fvm_tesselation_t *this_tesselation, fvm_element_t sub_type, cs_gnum_t *n_sub_elements_glob, cs_lnum_t *n_sub_elements_max)
const fvm_io_num_t * | fvm_tesselation_global_vertex_num (const fvm_tesselation_t *this_tesselation)
void | fvm_tesselation_vertex_coords (const fvm_tesselation_t *this_tesselation, cs_coord_t vertex_coords[])
const cs_lnum_t * | fvm_tesselation_sub_elt_index (const fvm_tesselation_t *this_tesselation, fvm_element_t sub_type)
cs_lnum_t | fvm_tesselation_decode (const fvm_tesselation_t *this_tesselation, fvm_element_t connect_type, cs_lnum_t start_id, cs_lnum_t buffer_limit, cs_lnum_t extra_vertex_base, cs_lnum_t vertex_num[])
void | fvm_tesselation_distribute (const fvm_tesselation_t *this_tesselation, fvm_element_t connect_type, cs_lnum_t start_id, cs_lnum_t end_id, size_t size, void *data)
void | fvm_tesselation_vertex_values (const fvm_tesselation_t *this_tesselation, int src_dim, int src_dim_shift, int dest_dim, cs_lnum_t start_id, cs_lnum_t end_id, cs_interlace_t src_interlace, cs_datatype_t src_datatype, cs_datatype_t dest_datatype, int n_parent_lists, const cs_lnum_t parent_num_shift[], const cs_lnum_t parent_num[], const void *const src_data[], void *const dest_data)
void | fvm_tesselation_dump (const fvm_tesselation_t *this_tesselation)

## 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 _DECODE_TRIANGLE_VERTICES | ( |  | vertex_list,
|  |  | encoding,
|  |  | decoding_mask
| ) |  |

Value:
(\
vertex_list[0] = encoding & decoding_mask[0], \
vertex_list[1] = (encoding & decoding_mask[1]) >> _ENCODING_BITS, \
vertex_list[2] = (encoding & decoding_mask[2]) >> (_ENCODING_BITS*2) )

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

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

#define _ENCODING_BITS (sizeof(fvm_tesselation_encoding_t)*8/3)

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

## Typedef Documentation

typedef unsigned fvm_tesselation_encoding_t

## Function Documentation

fvm_tesselation_t* fvm_tesselation_create | ( | fvm_element_t | element_type,
|  | cs_lnum_t | n_elements,
|  | const cs_lnum_t | face_index[],
|  | const cs_lnum_t | face_num[],
|  | const cs_lnum_t | vertex_index[],
|  | const cs_lnum_t | vertex_num[],
|  | const fvm_io_num_t * | global_element_num
| ) |  |

cs_lnum_t fvm_tesselation_decode | ( | const fvm_tesselation_t * | this_tesselation,
|  | fvm_element_t | connect_type,
|  | cs_lnum_t | start_id,
|  | cs_lnum_t | buffer_limit,
|  | cs_lnum_t | extra_vertex_base,
|  | cs_lnum_t | vertex_num[]
| ) |  |

fvm_tesselation_t* fvm_tesselation_destroy | ( | fvm_tesselation_t * | this_tesselation | ) |

void fvm_tesselation_distribute | ( | const fvm_tesselation_t * | this_tesselation,
|  | fvm_element_t | connect_type,
|  | cs_lnum_t | start_id,
|  | cs_lnum_t | end_id,
|  | size_t | size,
|  | void * | data
| ) |  |

void fvm_tesselation_dump | ( | const fvm_tesselation_t * | this_tesselation | ) |

void fvm_tesselation_get_global_size | ( | const fvm_tesselation_t * | this_tesselation,
|  | fvm_element_t | sub_type,
|  | cs_gnum_t * | n_sub_elements_glob,
|  | cs_lnum_t * | n_sub_elements_max
| ) |  |

const fvm_io_num_t* fvm_tesselation_global_vertex_num | ( | const fvm_tesselation_t * | this_tesselation | ) |

void fvm_tesselation_init | ( | fvm_tesselation_t * | this_tesselation,
|  | int | dim,
|  | const cs_coord_t | vertex_coords[],
|  | const cs_lnum_t | parent_vertex_num[],
|  | cs_lnum_t * | error_count
| ) |  |

cs_lnum_t fvm_tesselation_n_elements | ( | const fvm_tesselation_t * | this_tesselation | ) |

cs_gnum_t fvm_tesselation_n_g_vertices_add | ( | const fvm_tesselation_t * | this_tesselation | ) |

cs_lnum_t fvm_tesselation_n_sub_elements | ( | const fvm_tesselation_t * | this_tesselation,
|  | fvm_element_t | sub_type
| ) |  |

int fvm_tesselation_n_sub_types | ( | const fvm_tesselation_t * | this_tesselation | ) |

cs_lnum_t fvm_tesselation_n_vertices_add | ( | const fvm_tesselation_t * | this_tesselation | ) |

void fvm_tesselation_reduce | ( | fvm_tesselation_t * | this_tesselation | ) |

const cs_lnum_t* fvm_tesselation_sub_elt_index | ( | const fvm_tesselation_t * | this_tesselation,
|  | fvm_element_t | sub_type
| ) |  |

fvm_element_t fvm_tesselation_sub_type | ( | const fvm_tesselation_t * | this_tesselation,
|  | int | sub_type_id
| ) |  |

void fvm_tesselation_vertex_coords | ( | const fvm_tesselation_t * | this_tesselation,
|  | cs_coord_t | vertex_coords[]
| ) |  |

void fvm_tesselation_vertex_values | ( | const fvm_tesselation_t * | this_tesselation,
|  | int | src_dim,
|  | int | src_dim_shift,
|  | int | dest_dim,
|  | cs_lnum_t | start_id,
|  | cs_lnum_t | end_id,
|  | cs_interlace_t | src_interlace,
|  | cs_datatype_t | src_datatype,
|  | cs_datatype_t | dest_datatype,
|  | int | n_parent_lists,
|  | const cs_lnum_t | parent_num_shift[],
|  | const cs_lnum_t | parent_num[],
|  | const void *const | src_data[],
|  | void *const | dest_data
| ) |  |