My Project
programmer's documentation
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_all_to_all.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:

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...
 

Function Documentation

◆ cs_partition()

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]meshpointer to mesh structure
[in,out]mbpointer to mesh builder structure
[in]stageassociated partitioning stage

◆ cs_partition_add_partitions()

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_partitionsnumber of extra partitionings to compute
[in]extra_partitions_listlist of extra partitions to compute

◆ cs_partition_external_library_info()

void cs_partition_external_library_info ( void  )

Print information on external libraries.

◆ cs_partition_get_preprocess()

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

◆ cs_partition_set_algorithm()

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]stageassociated partitioning stage
[in]algorithmpartitioning algorithm choice
[in]rank_stepif > 1, partitioning done on at most n_ranks / rank_step processes (for graph-based partitioning only)
[in]ignore_perioif true, ignore periodicity information when present (for graph-based partitioning only)

◆ cs_partition_set_preprocess()

void cs_partition_set_preprocess ( bool  active)

Activate or deactivate initial partitioning for preprocessing.

Parameters
[in]activetrue to activate pre-partitiong for the preprocessing stage, false to de-activate it

◆ cs_partition_set_preprocess_hints()

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]jointrue if a mesh joining operation is planned.
[in]join_periodictrue if a mesh periodic matching operation is planned

◆ cs_partition_set_write_level()

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_flagoption to save partitioning information: 0: never 1: for graph-based partitioning only 2: always