CommGraph

This class is used to manage the communication graph. More…

#include "CommGraph.h"

Public Functions

Name
CommGraph & operator=(CommGraph & other)
Copy operator.
CommGraph()
Constructs an empty object.
CommGraph(const type_MPI_int input_ncon_L, const type_MPI_int input_ncon_R)
Constructs the CommGraph object.
~CommGraph()
Deletes the object.
void overlap(type_MPI_int nProc, type_MPI_int ncon_L, type_MPI_int ncon_R, type_MPI_int * comList)
Fills object assigning pointer.
void assign_nullptr()
Assign null pointer.
void mk_OutMatGraph(CommGraph & OutMatGraph)
Creates the outgoing communication graph.
type_MPI_int get_ncon_L() const
Get ncon_L.
type_MPI_int get_ncon_R() const
Get ncon_R.
type_MPI_int get_nProc() const
Get nProc.
type_MPI_int get_comList_size() const
Return size of comList.
type_MPI_int * get_ptr_comList_data()
Return pointer to comList.
const type_MPI_int * get_ptr_comList_data() const
type_MPI_int * get_proc_L()
Return proc_L.
const type_MPI_int * get_proc_L() const
type_MPI_int * get_proc_R()
Return proc_R.
const type_MPI_int * get_proc_R() const
VEC_CPU< type_MPI_int > * get_ptr_comList()
Return pointer to comList.
const VEC_CPU< type_MPI_int > * get_ptr_comList() const
void resize(const type_MPI_int new_ncon_L, const type_MPI_int new_ncon_R)
Resizes the CommGraph object.
bool allocated() const
Check if the object has been allocated.
void update(const type_MPI_int nactive, type_MPI_int *restrict map_active)
Updates the graph according to the new communicator.

Public Attributes

Name
type_MPI_int * myid
current processor rank.

Detailed Description

class CommGraph;

This class is used to manage the communication graph.

class CommGraph.

Public Functions Documentation

function operator=

CommGraph & operator=(
    CommGraph & other
)

Copy operator.

function CommGraph

CommGraph()

Constructs an empty object.

function CommGraph

CommGraph(
    const type_MPI_int input_ncon_L,
    const type_MPI_int input_ncon_R
)

Constructs the CommGraph object.

Parameters:

  • input_ncon_L number of left communicators.
  • input_ncon_R number of right communicators.

function ~CommGraph

~CommGraph()

Deletes the object.

function overlap

void overlap(
    type_MPI_int nProc,
    type_MPI_int ncon_L,
    type_MPI_int ncon_R,
    type_MPI_int * comList
)

Fills object assigning pointer.

function assign_nullptr

void assign_nullptr()

Assign null pointer.

function mk_OutMatGraph

void mk_OutMatGraph(
    CommGraph & OutMatGraph
)

Creates the outgoing communication graph.

Parameters:

  • OutMatGraph outgoing communication graph.

function get_ncon_L

type_MPI_int get_ncon_L() const

Get ncon_L.

Return: ncon_L

function get_ncon_R

type_MPI_int get_ncon_R() const

Get ncon_R.

Return: ncon_R

function get_nProc

type_MPI_int get_nProc() const

Get nProc.

Return: nProc

function get_comList_size

type_MPI_int get_comList_size() const

Return size of comList.

Return: ncon_L+ncon_R+1

function get_ptr_comList_data

type_MPI_int * get_ptr_comList_data()

Return pointer to comList.

Return: comList.data()

function get_ptr_comList_data

const type_MPI_int * get_ptr_comList_data() const

function get_proc_L

type_MPI_int * get_proc_L()

Return proc_L.

Return: proc_L

function get_proc_L

const type_MPI_int * get_proc_L() const

function get_proc_R

type_MPI_int * get_proc_R()

Return proc_R.

Return: proc_R

function get_proc_R

const type_MPI_int * get_proc_R() const

function get_ptr_comList

VEC_CPU< type_MPI_int > * get_ptr_comList()

Return pointer to comList.

function get_ptr_comList

const VEC_CPU< type_MPI_int > * get_ptr_comList() const

function resize

void resize(
    const type_MPI_int new_ncon_L,
    const type_MPI_int new_ncon_R
)

Resizes the CommGraph object.

Parameters:

  • new_ncon_L number of left communicators.
  • new_ncon_R number of right communicators.

function allocated

bool allocated() const

Check if the object has been allocated.

function update

void update(
    const type_MPI_int nactive,
    type_MPI_int *__restrict__ map_active
)

Updates the graph according to the new communicator.

Parameters:

  • nactive number of active processes.
  • map_active index map (from old to new).

Public Attributes Documentation

variable myid

type_MPI_int * myid;

current processor rank.


Updated on 19 November 2024 at 10:20:48 CET