20 using namespace common;
21 using namespace common::PE;
42 SCOTCH_dgraphExit(&
graph);
69 Uint total_nb_edges = 0;
74 total_nb_edges+=nb_edges;
88 if (SCOTCH_dgraphBuild(&
graph,
104 SCOTCH_dgraphSize(&
graph,
144 if (SCOTCH_dgraphCheck(&
graph))
155 SCOTCH_Strat stradat;
156 if(SCOTCH_stratInit(&stradat))
163 if (SCOTCH_dgraphPart(&
graph,
164 options().value<Uint>(
"nb_parts"),
169 SCOTCH_stratExit(&stradat);
197 Uint comp;
Uint loc_idx;
bool found;
202 boost::tie(comp,loc_idx) =
location_idx(owned_objects[i]);
std::vector< SCOTCH_Num > vertloctab
std::string name(ComponentWrapper &self)
void list_of_objects_owned_by_part(const Uint part, VectorT &obj_list) const
Helper class to create the Builder and place it in the factory.
cf3::common::ComponentBuilder< Partitioner, MeshTransformer, LibPTScotch > ptscotch_partitioner_builder
virtual void build_graph()
Partitioning functions.
void list_of_connected_objects_in_part(const Uint part, VectorT &connections_per_obj, WeightsT &edge_weights) const
boost::tuple< Uint, Uint > location_idx(const Uint glb_obj) const
Uint nb_objects_owned_by_part(const Uint part) const
Graph building functions.
SCOTCH_Dgraph graph
common values accessed by all tests goes here
#define CF3_DEBUG_POINT
Definition of a macro for placing a debug point in the code.
Uint size() const
Return the number of processes, or 1 if is_init==0.
std::vector< SCOTCH_Num > edgeloctab
std::vector< SCOTCH_Num > proccnttab
virtual ~Partitioner()
Virtual destructor.
Partitioner(const std::string &name)
type of pointer to Component
Top-level namespace for coolfluid.
std::vector< std::vector< Uint > > m_nodes_to_export
nodes_to_export[part][loc_node_idx]
std::vector< SCOTCH_Num > procvrttab
unsigned int Uint
typedef for unsigned int
std::vector< SCOTCH_Num > partloctab
std::vector< std::vector< std::vector< Uint > > > m_elements_to_export
elements_to_export[part][elements_comp_idx][loc_elem_idx]
static Comm & instance()
Return a reference to the current PE.
Uint nb_connected_objects_in_part(const Uint part, VectorT &nb_connections_per_obj) const
T * all_gather(const T *in_values, const int in_n, T *out_values, const int stride=1)
std::vector< SCOTCH_Num > edgegsttab
virtual void partition_graph()