src/base/cs_order.h 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
Functions
cs_order.h File Reference
`#include "cs_defs.h"`
Include dependency graph for cs_order.h:

Go to the source code of this file.

## Functions
int | cs_order_gnum_test (const cs_lnum_t list[], const cs_gnum_t number[], size_t nb_ent)
| Test if an array of global numbers is ordered. More...
int | cs_order_gnum_test_s (const cs_lnum_t list[], const cs_gnum_t number[], size_t stride, size_t nb_ent)
| Test if an array of global numbers is lexicographically ordered. More...
cs_lnum_t * | cs_order_gnum (const cs_lnum_t list[], const cs_gnum_t number[], size_t nb_ent)
| Return an ordering table associated with an array of global numbers. More...
cs_lnum_t * | cs_order_gnum_s (const cs_lnum_t list[], const cs_gnum_t number[], size_t stride, size_t nb_ent)
| Return a lexicographical ordering table associated with a strided array of global numbers. More...
cs_lnum_t * | cs_order_gnum_i (const cs_lnum_t list[], const cs_gnum_t number[], const cs_lnum_t index[], size_t nb_ent)
| Return a lexicographical ordering table associated with an indexed array of global numbers. More...
void | cs_order_gnum_allocated (const cs_lnum_t list[], const cs_gnum_t number[], cs_lnum_t order[], size_t nb_ent)
| Compute an ordering table associated with an array of global numbers. More...
void | cs_order_gnum_allocated_s (const cs_lnum_t list[], const cs_gnum_t number[], size_t stride, cs_lnum_t order[], size_t nb_ent)
| Compute a lexicographical ordering table associated with an array of strided global numbers. More...
void | cs_order_gnum_allocated_i (const cs_lnum_t list[], const cs_gnum_t number[], const cs_lnum_t index[], cs_lnum_t order[], size_t nb_ent)
| Compute a lexicographical ordering table associated with an indexed array of global numbers. More...
void | cs_order_lnum_allocated (const cs_lnum_t list[], const cs_lnum_t number[], cs_lnum_t order[], size_t nb_ent)
| Compute an ordering table associated with an array of local numbers. More...
void | cs_order_lnum_allocated_s (const cs_lnum_t list[], const cs_lnum_t number[], size_t stride, cs_lnum_t order[], size_t nb_ent)
| Compute a lexicographical ordering table associated with an array of strided local numbers. More...
cs_lnum_t * | cs_order_renumbering (const cs_lnum_t order[], size_t nb_ent)
| Build local renumbering array based on ordering of entities. More...

## Function Documentation

cs_lnum_t* cs_order_gnum | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | size_t | nb_ent
| ) |  |

Return an ordering table associated with an array of global numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (number of entity i given by number[i] or number[list[i] - 1]) if list exists (if NULL, a default 1 to n numbering is considered)
  [in] | nb_ent | number of entities considered

Returns
  pointer to list of nb_ent entities (0 to n-1 numbering) ordered by increasing associated number. The calling code is responsible for freeing this array when it is not needed anymore.

void cs_order_gnum_allocated | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | cs_lnum_t | order[],
|  | size_t | nb_ent
| ) |  |

Compute an ordering table associated with an array of global numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (number of entity i given by number[i] or number[list[i] - 1]) if list exists (if NULL, a default 1 to n numbering is considered)
  [out] | order | pointer to pre-allocated ordering table
  [in] | nb_ent | number of entities considered

void cs_order_gnum_allocated_i | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | const cs_lnum_t | index[],
|  | cs_lnum_t | order[],
|  | size_t | nb_ent
| ) |  |

Compute a lexicographical ordering table associated with an indexed array of global numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (numbers of entity i start at index[i] or _index[i] (reduced index) if list exists). If list = NULL, a default 1 to n numbering is considered)
  [in] | index | number of values to compare for each entity (from 0)
  [out] | order | pointer to pre-allocated ordering table
  [in] | nb_ent | number of entities considered

void cs_order_gnum_allocated_s | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | size_t | stride,
|  | cs_lnum_t | order[],
|  | const size_t | nb_ent
| ) |  |

Compute a lexicographical ordering table associated with an array of strided global numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (numbers of entity i start at number[i*stride] or number[(list[i] - 1)*stride]) if list exists (if NULL, a default 1 to n numbering is considered)
  [in] | stride | stride of number array (number of values to compare)
  [out] | order | pointer to pre-allocated ordering table
  [in] | nb_ent | number of entities considered

cs_lnum_t* cs_order_gnum_i | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | const cs_lnum_t | index[],
|  | size_t | nb_ent
| ) |  |

Return a lexicographical ordering table associated with an indexed array of global numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (numbers of entity i start at index[i] or _index[i] (reduced index) if list exists). If list = NULL, a default 1 to n numbering is considered)
  [in] | index | number of values to compare for each entity
  [in] | nb_ent | number of entities considered

Returns
  pointer to list of nb_ent entities (0 to n-1 numbering) ordered by increasing associated number. The calling code is responsible for freeing this array when it is not needed anymore.

cs_lnum_t* cs_order_gnum_s | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | size_t | stride,
|  | size_t | nb_ent
| ) |  |

Return a lexicographical ordering table associated with a strided array of global numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (number of entity i given by number[i] or number[list[i] - 1]) if list exists (if NULL, a default 1 to n numbering is considered)
  [in] | stride | stride of number array (number of values to compare)
  [in] | nb_ent | number of entities considered

Returns
  pointer to list of nb_ent entities (0 to n-1 numbering) ordered by increasing associated number. The calling code is responsible for freeing this array when it is not needed anymore.

int cs_order_gnum_test | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | size_t | nb_ent
| ) |  |

Test if an array of global numbers is ordered.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (number of entity i given by number[i] or number[list[i] - 1]) if list exists (if NULL, a default 1 to n numbering is considered)
  [in] | nb_ent | number of entities considered

Returns
  1 if ordered, 0 otherwise.

int cs_order_gnum_test_s | ( | const cs_lnum_t | list[],
|  | const cs_gnum_t | number[],
|  | size_t | stride,
|  | size_t | nb_ent
| ) |  |

Test if an array of global numbers is lexicographically ordered.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (number of entity i given by number[i] or number[list[i] - 1]) if list exists (if NULL, a default 1 to n numbering is considered)
  [in] | stride | stride of number array (number of values to compare)
  [in] | nb_ent | number of entities considered

Returns
  1 if ordered, 0 otherwise.

void cs_order_lnum_allocated | ( | const cs_lnum_t | list[],
|  | const cs_lnum_t | number[],
|  | cs_lnum_t | order[],
|  | size_t | nb_ent
| ) |  |

Compute an ordering table associated with an array of local numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (number of entity i given by number[i] or number[list[i] - 1]) if list exists (if NULL, a default 1 to n numbering is considered)
  [out] | order | pointer to pre-allocated ordering table
  [in] | nb_ent | number of entities considered

void cs_order_lnum_allocated_s | ( | const cs_lnum_t | list[],
|  | const cs_lnum_t | number[],
|  | size_t | stride,
|  | cs_lnum_t | order[],
|  | const size_t | nb_ent
| ) |  |

Compute a lexicographical ordering table associated with an array of strided local numbers.

Parameters

  [in] | list | optional list (1 to n numbering) of selected entities (or NULL if all nb_ent are selected). This list may contain element numbers in any order
  [in] | number | array of all entity numbers (numbers of entity i start at number[i*stride] or number[(list[i] - 1)*stride]) if list exists (if NULL, a default 1 to n numbering is considered)
  [in] | stride | stride of number array (number of values to compare)
  [out] | order | pointer to pre-allocated ordering table
  [in] | nb_ent | number of entities considered

cs_lnum_t* cs_order_renumbering | ( | const cs_lnum_t | order[],
|  | size_t | nb_ent
| ) |  |

Build local renumbering array based on ordering of entities.

Parameters

  [in] | order | 0 to n-1 ordering of entities by increasing attribute
  [in] | nb_ent | number of entities considered

Returns
  pointer to renumbering array (0 to n-1 numbering) indicating the new index of renumbered entities; The calling code is responsible for freeing this array when it is not needed anymore.