src/mesh/cs_partition.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
Typedefs | Functions
cs_partition.c File Reference
`#include "cs_defs.h"`
`#include <assert.h>`
`#include <errno.h>`
`#include <locale.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_io_num.h"`
`#include "cs_base.h"`
`#include "cs_block_dist.h"`
`#include "cs_block_to_part.h"`
`#include "cs_file.h"`
`#include "cs_io.h"`
`#include "cs_log.h"`
`#include "cs_mesh.h"`
`#include "cs_mesh_builder.h"`
`#include "cs_part_to_block.h"`
`#include "cs_timer.h"`
`#include "cs_partition.h"`
Include dependency graph for cs_partition.c:

## Typedefs
typedef double | _vtx_coords_t [3]

## Functions
void | cs_partition_external_library_info (void)
| Print information on external libraries. More...
void | cs_partition_set_algorithm (cs_partition_stage_t stage, cs_partition_algorithm_t algorithm, int rank_step, bool ignore_perio)
| Set algorithm for domain partitioning. More...
void | cs_partition_set_write_level (int write_flag)
| Set partitioning write to file option. More...
void | cs_partition_set_preprocess_hints (bool join, bool join_periodic)
| Define hints indicating if initial partitioning fo a preprocessing stage is required. More...
void | cs_partition_set_preprocess (bool active)
| Activate or deactivate initial partitioning for preprocessing. More...
bool | cs_partition_get_preprocess (void)
| Indicate if re-partitiong for the computation stage is required. More...
void | cs_partition_add_partitions (int n_extra_partitions, int extra_partitions_list[])
| Define list of extra partitionings to build. More...
void | cs_partition (cs_mesh_t *mesh, cs_mesh_builder_t *mb, cs_partition_stage_t stage)
| Partition mesh based on current options. More...

## Typedef Documentation

typedef double _vtx_coords_t[3]

## Function Documentation

void cs_partition | ( | cs_mesh_t * | mesh,
|  | cs_mesh_builder_t * | mb,
|  | cs_partition_stage_t | stage
| ) |  |

Partition mesh based on current options.

Parameters

  [in] | mesh | pointer to mesh structure
  [in,out] | mb | pointer to mesh builder structure
  [in] | stage | associated partitioning stage

void cs_partition_add_partitions | ( | int | n_extra_partitions,
|  | int | extra_partitions_list[]
| ) |  |

Define list of extra partitionings to build.

Partitionings in this list will be output to file, and may be used for subsequent calculations.

When partitioning for both preprocessing and calculation stages, output to file of partioning data or generation of additional partitionings (see cs_partition_add_partitions) will only be done for the second stage.

Parameters

  [in] | n_extra_partitions | number of extra partitionings to compute
  [in] | extra_partitions_list | list of extra partitions to compute

void cs_partition_external_library_info | ( | void |  | ) |

Print information on external libraries.

bool cs_partition_get_preprocess | ( | void |  | ) |

Indicate if re-partitiong for the computation stage is required.

Returns
  true if initial partitioning for preprocessing is active, false otherwise

void cs_partition_set_algorithm | ( | cs_partition_stage_t | stage,
|  | cs_partition_algorithm_t | algorithm,
|  | int | rank_step,
|  | bool | ignore_perio
| ) |  |

Set algorithm for domain partitioning.

Parameters

  [in] | stage | associated partitioning stage
  [in] | algorithm | partitioning algorithm choice
  [in] | rank_step | if > 1, partitioning done on at most n_ranks / rank_step processes (for graph-based partitioning only)
  [in] | ignore_perio | if true, ignore periodicity information when present (for graph-based partitioning only)

void cs_partition_set_preprocess | ( | bool | active | ) |

Activate or deactivate initial partitioning for preprocessing.

Parameters

  [in] | active | true to activate pre-partitiong for the preprocessing stage, false to de-activate it

void cs_partition_set_preprocess_hints | ( | bool | join,
|  | bool | join_periodic
| ) |  |

Define hints indicating if initial partitioning fo a preprocessing stage is required.

Parameters

  [in] | join | true if a mesh joining operation is planned.
  [in] | join_periodic | true if a mesh periodic matching operation is planned

void cs_partition_set_write_level | ( | int | write_flag | ) |

Set partitioning write to file option.

Partitioning information for subsequent calculations is written to file after the last partitioning stage depending on the output level.

Note that partitioning information for additional partitionings is always written to file, regardless of this option.

Parameters

  [in] | write_flag | option to save partitioning information: 0: never 1: for graph-based partitioning only 2: always