src/base/cs_renumber.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 | Variables
cs_renumber.c File Reference
`#include "cs_defs.h"`
`#include <math.h>`
`#include <stdarg.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <assert.h>`
`#include <mpi.h>`
`#include "bft_mem.h"`
`#include "bft_error.h"`
`#include "bft_printf.h"`
`#include "cs_prototypes.h"`
`#include "cs_mesh.h"`
`#include "cs_mesh_quantities.h"`
`#include "cs_order.h"`
`#include "cs_post.h"`
`#include "cs_renumber.h"`
Include dependency graph for cs_renumber.c:

## Macros
#define | CS_RENUMBER_N_SUBS 5 /* Number of categories for histograms */

## Functions
void | cs_renumber_set_n_threads (int n_threads)
| Set the target number of threads for mesh renumbering. More...
int | cs_renumber_get_n_threads (void)
| Return the target number of threads for mesh renumbering. More...
void | cs_renumber_set_min_subset_size (cs_lnum_t min_i_subset_size, cs_lnum_t min_b_subset_size)
| Set the minimum sunset sizes when renumbering for threads. More...
void | cs_renumber_get_min_subset_size (cs_lnum_t *min_i_subset_size, cs_lnum_t *min_b_subset_size)
| Get the minimum sunset sizes when renumbering for threads. More...
void | cs_renumber_set_i_face_algorithm (cs_renumber_i_faces_type_t algorithm)
| Select the algorithm for interior faces renumbering. More...
cs_renumber_i_faces_type_t | cs_renumber_get_i_face_algorithm (void)
| Return the algorithm for interior faces renumbering. More...
void | cs_renumber_mesh (cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities)
| Renumber mesh elements for vectorization or OpenMP depending on code options and target machine. More...

## Variables
int | _cs_renumber_n_threads = 0
cs_lnum_t | _min_i_subset_size = 64
cs_lnum_t | _min_b_subset_size = 64
cs_renumber_i_faces_type_t | _i_faces_algorithm = CS_RENUMBER_I_FACES_MULTIPASS

## Detailed Description

Optional mesh renumbering.

## Macro Definition Documentation

#define CS_RENUMBER_N_SUBS 5 /* Number of categories for histograms */

## Function Documentation

cs_renumber_i_faces_type_t cs_renumber_get_i_face_algorithm | ( | void |  | ) |

Return the algorithm for interior faces renumbering.

Returns
  algorithm type for interior faces renumbering

void cs_renumber_get_min_subset_size | ( | cs_lnum_t * | min_i_subset_size,
|  | cs_lnum_t * | min_b_subset_size
| ) |  |

Get the minimum sunset sizes when renumbering for threads.

Parameters

  [out] | min_i_subset_size | minimum number of interior faces per thread per group, or NULL
  [out] | min_b_subset_size | minimum number of boundary faces per thread per group, or NULL

int cs_renumber_get_n_threads | ( | void |  | ) |

Return the target number of threads for mesh renumbering.

Returns
  the target number of threads for mesh numbering

void cs_renumber_mesh | ( | cs_mesh_t * | mesh,
|  | cs_mesh_quantities_t * | mesh_quantities
| ) |  |

Renumber mesh elements for vectorization or OpenMP depending on code options and target machine.

Parameters

  [in,out] | mesh | Pointer to global mesh structure
  [in,out] | mesh_quantities | Pointer to global mesh quantities structure

void cs_renumber_set_i_face_algorithm | ( | cs_renumber_i_faces_type_t | algorithm | ) |

Select the algorithm for interior faces renumbering.

Parameters

  [in] | algorithm | algorithm type for interior faces renumbering

void cs_renumber_set_min_subset_size | ( | cs_lnum_t | min_i_subset_size,
|  | cs_lnum_t | min_b_subset_size
| ) |  |

Set the minimum sunset sizes when renumbering for threads.

Parameters

  [in] | min_i_subset_size | minimum number of interior faces per thread per group
  [in] | min_b_subset_size | minimum number of boundary faces per thread per group

void cs_renumber_set_n_threads | ( | int | n_threads | ) |

Set the target number of threads for mesh renumbering.

By default, the target number of threads is set to cs_glob_n_threads, but the value may be forced using this function. This is mainly useful for testing purposes.

Parameters

  [in] | n_threads | target number of threads for mesh numbering

## Variable Documentation

int _cs_renumber_n_threads = 0

cs_renumber_i_faces_type_t _i_faces_algorithm = CS_RENUMBER_I_FACES_MULTIPASS

cs_lnum_t _min_b_subset_size = 64

cs_lnum_t _min_i_subset_size = 64