Jpetra  Development
 All Classes Functions Variables
Public Member Functions | Static Public Attributes | List of all members
Jpetra.DistObject Class Referenceabstract
Inheritance diagram for Jpetra.DistObject:
Inheritance graph
[legend]
Collaboration diagram for Jpetra.DistObject:
Collaboration graph
[legend]

Public Member Functions

 DistObject ()
 
void importValues (DistObject distObjectSource, Import importer, int combineMode)
 
void importValues (DistObject distObjectSource, Export exporter, int combineMode)
 
void exportValues (DistObject distObjectSource, Import importer, int combineMode)
 
void exportValues (DistObject distObjectSource, Export exporter, int combineMode)
 
void doTransfer (DistObject distObjectSource, int numSameGids, int[] permuteToLids, int[] permuteFromLids, int[] exportGids, int[] exportLids, int combineMode, boolean doReverse)
 
abstract Serializable[] packAndPrepare (DistObject distObjectSource, int[] exportGids, int[] exportLids)
 
abstract int[][] unpackAndCombine (Serializable[] importData, int combineMode)
 
abstract void copyAndPermute (DistObject distObjectSource, int numSameGids, int[] permuteToLids, int[] permuteFromLids, int combineMode)
 
abstract VectorSpace getVectorSpace ()
 
void setFlopCounter (FlopCounter flops)
 
void updateFlops (double numFlops)
 
void resetFlops ()
 
double getFlops ()
 
double getGlobalMegaFlops (Comm comm)
 
FlopCounter getFlopCounter ()
 
- Public Member Functions inherited from Jpetra.JpetraObject
 JpetraObject ()
 
void initializeOutput ()
 

Static Public Attributes

static final int ADD = 0
 
static final int ZERO = 1
 
static final int AVERAGE = 2
 
static final int ABSMAX = 3
 
static final int REPLACE = 4
 
- Static Public Attributes inherited from Jpetra.JpetraObject
static HashMap outputStreams = new HashMap(4)
 
static boolean amIroot
 

Additional Inherited Members

- Static Public Member Functions inherited from Jpetra.JpetraObject
static void setRootPrint (String key, boolean rootPrint)
 
static void setRootStream (String key, PrintStream rootStream)
 
static void setVnodesPrint (String key, boolean vnodesPrint)
 
static void setVnodesStream (String key, PrintStream vnodesStream)
 
static void print (String key, String message)
 
static void println (String key, String message)
 
static void setAmIroot (Comm comm)
 

Detailed Description

Objects that extend DistObject can be constructed and distributed globally among the vnodes. DistObject presents a common interface to the user to use for all objects that can be distributed globally. Thus, some methods must be overriden by classes extending DistObject while others must not be overridden. DistObject also defines constants that correspond to the different avaliable combine modes.

Author
Jason Cross

Constructor & Destructor Documentation

Jpetra.DistObject.DistObject ( )
inline

Does nothing.

Member Function Documentation

abstract void Jpetra.DistObject.copyAndPermute ( DistObject  distObjectSource,
int  numSameGids,
int[]  permuteToLids,
int[]  permuteFromLids,
int  combineMode 
)
abstract

Should not be called directly by the user.

This method must be overridden by classes extending DistObject.

Parameters
distObjectSourceThe object from which local values will be copied and permuted.
numSameGidsThe number of global ids that are the same starting from myMinGlobalEntryId.
permuteToLidsThe local IDs of this DistObject that will permute elements from distObjectSource according to the corresponding local IDs in permuteFromLids.
permuteFromLidsThe local IDs from distObjectSource that will be permuted to the local IDs in permuteToLids correspndong to this DistObject.
combineModeOne of the declared combine mode constants in DistObject.

Referenced by Jpetra.DistObject.doTransfer().

void Jpetra.DistObject.doTransfer ( DistObject  distObjectSource,
int  numSameGids,
int[]  permuteToLids,
int[]  permuteFromLids,
int[]  exportGids,
int[]  exportLids,
int  combineMode,
boolean  doReverse 
)
inline

Should not be called directly by the user.

Calls copyAndPermute, packAndPrepare, and unpackAndCombine which are all overridden by the calling child class. doTransfer also calls Distributor.distribute in order to send all exports to the corresponding vnodes and receive all imports from other vnodes. This method should not be overriden by classes extending DistObject.

References Jpetra.DistObject.copyAndPermute(), Jpetra.DistObject.packAndPrepare(), Jpetra.DistObject.unpackAndCombine(), and Jpetra.DistObject.ZERO.

Referenced by Jpetra.DistObject.importValues().

void Jpetra.DistObject.importValues ( DistObject  distObjectSource,
Import  importer,
int  combineMode 
)
inline

Imports values from the source DistObject to this DistObject using the specified importer and combine mode. This method should not be overriden by classes extending DistObject.

Parameters
distObjectSourceThe DistObject to import values from.
importerThe Import object built from the source VectorSpace and the target VectorSpace.
combineModeOne of the declared combine mode constants in DistObject.

References Jpetra.DistObject.doTransfer().

abstract Serializable [] Jpetra.DistObject.packAndPrepare ( DistObject  distObjectSource,
int[]  exportGids,
int[]  exportLids 
)
abstract

Should not be called directly by the user.

This method must be overridden by classes extending DistObject.

Parameters
distObjectSourceThe object from which elements will be packedup for exportation to other vnodes.
exportGidsThe global IDs of the elements to be exported.
exportLidsThe local IDs of elements to be exported.
Returns
The packed data that Distributor.distribute will export to other vnodes.

Referenced by Jpetra.DistObject.doTransfer().

abstract int [][] Jpetra.DistObject.unpackAndCombine ( Serializable[]  importData,
int  combineMode 
)
abstract

Should not be called directly by the user.

This method must be overridden by classes extending DistObject.

Parameters
importDataThe data object returned from Distributor.distribute which contains all elements sent to this vnode.
combineModeOne of the declared combine mode constants in DistObject.

Referenced by Jpetra.DistObject.doTransfer().

Member Data Documentation

final int Jpetra.DistObject.ABSMAX = 3
static

This combine mode replaces values with the maximum absolute value of either the imported value or the existing corresponding local value.

final int Jpetra.DistObject.ADD = 0
static

This combine mode will cause all imported values to be added to existing values.

final int Jpetra.DistObject.AVERAGE = 2
static

This combine mode will cause all imported values to be averaged with existing values.

final int Jpetra.DistObject.REPLACE = 4
static

This combine mode replaces existing values with the imported ones.

final int Jpetra.DistObject.ZERO = 1
static

This combine mode will only copy and permute local values.

Referenced by Jpetra.DistObject.doTransfer().


The documentation for this class was generated from the following file: