My Project
programmer's documentation
Enumerations | Functions
cs_partition.h File Reference
#include "cs_defs.h"
#include "cs_base.h"
#include "cs_mesh.h"
#include "cs_mesh_builder.h"
Include dependency graph for cs_partition.h:

Go to the source code of this file.

Enumerations

enum  cs_partition_stage_t { CS_PARTITION_FOR_PREPROCESS, CS_PARTITION_MAIN }
 
enum  cs_partition_algorithm_t {
  CS_PARTITION_DEFAULT, CS_PARTITION_SFC_MORTON_BOX, CS_PARTITION_SFC_MORTON_CUBE, CS_PARTITION_SFC_HILBERT_BOX,
  CS_PARTITION_SFC_HILBERT_CUBE, CS_PARTITION_SCOTCH, CS_PARTITION_METIS, CS_PARTITION_BLOCK
}
 

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 *mesh_builder, cs_partition_stage_t stage)
 Partition mesh based on current options. More...
 

Enumeration Type Documentation

◆ cs_partition_algorithm_t

Enumerator
CS_PARTITION_DEFAULT 
CS_PARTITION_SFC_MORTON_BOX 
CS_PARTITION_SFC_MORTON_CUBE 
CS_PARTITION_SFC_HILBERT_BOX 
CS_PARTITION_SFC_HILBERT_CUBE 
CS_PARTITION_SCOTCH 
CS_PARTITION_METIS 
CS_PARTITION_BLOCK 

◆ cs_partition_stage_t

Enumerator
CS_PARTITION_FOR_PREPROCESS 
CS_PARTITION_MAIN 

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