Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
Epetra_Import_Util Namespace Reference

Epetra_Import_Util: The Epetra ImportUtil Wrapper Namespace. More...

Functions

template<typename int_type >
int TPackAndPrepareWithOwningPIDs (const Epetra_CrsMatrix &A, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, std::vector< int > &pids)
 
int PackAndPrepareWithOwningPIDs (const Epetra_CrsMatrix &SourceMatrix, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, std::vector< int > &SourcePids)
 PackAndPrepareWithOwningPIDs. More...
 
template<typename int_type >
int TUnpackWithOwningPIDsCount (const Epetra_CrsMatrix &SourceMatrix, int NumSameIDs, int NumRemoteIDs, const int *, int NumPermuteIDs, const int *, const int *PermuteFromLIDs, int, char *Imports)
 
int UnpackWithOwningPIDsCount (const Epetra_CrsMatrix &SourceMatrix, int NumSameIDs, int NumRemoteIDs, const int *RemoteLIDs, int NumPermuteIDs, const int *PermuteToLIDs, const int *PermuteFromLIDs, int LenImports, char *Imports)
 UnpackWithOwningPIDsCount. More...
 
template<typename int_type >
int TUnpackAndCombineIntoCrsArrays (const Epetra_CrsMatrix &SourceMatrix, int NumSameIDs, int NumRemoteIDs, const int *RemoteLIDs, int NumPermuteIDs, const int *PermuteToLIDs, const int *PermuteFromLIDs, int, char *Imports, int TargetNumRows, int TargetNumNonzeros, int MyTargetPID, int *CSR_rowptr, int_type *CSR_colind, double *CSR_vals, const std::vector< int > &SourcePids, std::vector< int > &TargetPids)
 
int UnpackAndCombineIntoCrsArrays (const Epetra_CrsMatrix &SourceMatrix, int NumSameIDs, int NumRemoteIDs, const int *RemoteLIDs, int NumPermuteIDs, const int *PermuteToLIDs, const int *PermuteFromLIDs, int LenImports, char *Imports, int TargetNumRows, int TargetNumNonzeros, int MyTargetPID, int *CSR_rowptr, int *CSR_colind, double *CSR_values, const std::vector< int > &SourcePids, std::vector< int > &TargetPids)
 UnpackAndCombineIntoCrsArrays. More...
 
int UnpackAndCombineIntoCrsArrays (const Epetra_CrsMatrix &SourceMatrix, int NumSameIDs, int NumRemoteIDs, const int *RemoteLIDs, int NumPermuteIDs, const int *PermuteToLIDs, const int *PermuteFromLIDs, int LenImports, char *Imports, int TargetNumRows, int TargetNumNonzeros, int MyTargetPID, int *CSR_rowptr, long long *CSR_colind, double *CSR_values, const std::vector< int > &SourcePids, std::vector< int > &TargetPids)
 UnpackAndCombineIntoCrsArrays. More...
 
template<typename int_type , class MapType1 , class MapType2 >
int TLowCommunicationMakeColMapAndReindex (int N, const int *rowptr, int *colind_LID, const int_type *colind_GID, const Epetra_Map &domainMap, const int *owningPIDs, bool SortGhostsAssociatedWithEachProcessor, std::vector< int > &RemotePIDs, MapType1 &NewColMap)
 
int LowCommunicationMakeColMapAndReindex (int N, const int *rowptr, int *colind, const Epetra_Map &domainMap, const int *owningPIDs, bool SortGhostsAssociatedWithEachProcessor, std::vector< int > &RemotePIDs, Epetra_BlockMap &NewColMap)
 LowCommunicationMakeColMapAndReindex. More...
 
int LowCommunicationMakeColMapAndReindex (int N, const int *rowptr, int *colind_LID, long long *colind_GID, const Epetra_Map &domainMap, const int *owningPIDs, bool SortGhostsAssociatedWithEachProcessor, std::vector< int > &RemotePIDs, Epetra_BlockMap &NewColMap)
 LowCommunicationMakeColMapAndReindex. More...
 

Detailed Description

Epetra_Import_Util: The Epetra ImportUtil Wrapper Namespace.

The Epetra_Import_Util namepsace is a collection of useful functions for data import. The goal of this is to rmevoe code duplication between Epetra and EpetraExt.

Function Documentation

template<typename int_type >
int Epetra_Import_Util::TPackAndPrepareWithOwningPIDs ( const Epetra_CrsMatrix A,
int  NumExportIDs,
int *  ExportLIDs,
int &  LenExports,
char *&  Exports,
int &  SizeOfPacket,
int *  Sizes,
bool &  VarSizes,
std::vector< int > &  pids 
)

Definition at line 63 of file Epetra_Import_Util.cpp.

int Epetra_Import_Util::PackAndPrepareWithOwningPIDs ( const Epetra_CrsMatrix SourceMatrix,
int  NumExportIDs,
int *  ExportLIDs,
int &  LenExports,
char *&  Exports,
int &  SizeOfPacket,
int *  Sizes,
bool &  VarSizes,
std::vector< int > &  SourcePids 
)

PackAndPrepareWithOwningPIDs.

Note: The SourcePids vector should contain a list of owning PIDs for each column in the ColMap, as from Epetra_Util::GetPids, without the "-1 for local" option being used.

Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 165 of file Epetra_Import_Util.cpp.

template<typename int_type >
int Epetra_Import_Util::TUnpackWithOwningPIDsCount ( const Epetra_CrsMatrix SourceMatrix,
int  NumSameIDs,
int  NumRemoteIDs,
const int *  ,
int  NumPermuteIDs,
const int *  ,
const int *  PermuteFromLIDs,
int  ,
char *  Imports 
)

Definition at line 189 of file Epetra_Import_Util.cpp.

int Epetra_Import_Util::UnpackWithOwningPIDsCount ( const Epetra_CrsMatrix SourceMatrix,
int  NumSameIDs,
int  NumRemoteIDs,
const int *  RemoteLIDs,
int  NumPermuteIDs,
const int *  PermuteToLIDs,
const int *  PermuteFromLIDs,
int  LenImports,
char *  Imports 
)

UnpackWithOwningPIDsCount.

Counts the number of non-zeros in the resulting matrix. Call this before UnpackAndCombineIntoCrsArrays.

Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 235 of file Epetra_Import_Util.cpp.

template<typename int_type >
int Epetra_Import_Util::TUnpackAndCombineIntoCrsArrays ( const Epetra_CrsMatrix SourceMatrix,
int  NumSameIDs,
int  NumRemoteIDs,
const int *  RemoteLIDs,
int  NumPermuteIDs,
const int *  PermuteToLIDs,
const int *  PermuteFromLIDs,
int  ,
char *  Imports,
int  TargetNumRows,
int  TargetNumNonzeros,
int  MyTargetPID,
int *  CSR_rowptr,
int_type *  CSR_colind,
double *  CSR_vals,
const std::vector< int > &  SourcePids,
std::vector< int > &  TargetPids 
)

Definition at line 262 of file Epetra_Import_Util.cpp.

int Epetra_Import_Util::UnpackAndCombineIntoCrsArrays ( const Epetra_CrsMatrix SourceMatrix,
int  NumSameIDs,
int  NumRemoteIDs,
const int *  RemoteLIDs,
int  NumPermuteIDs,
const int *  PermuteToLIDs,
const int *  PermuteFromLIDs,
int  LenImports,
char *  Imports,
int  TargetNumRows,
int  TargetNumNonzeros,
int  MyTargetPID,
int *  CSR_rowptr,
int *  CSR_colind,
double *  CSR_values,
const std::vector< int > &  SourcePids,
std::vector< int > &  TargetPids 
)

UnpackAndCombineIntoCrsArrays.

You should call UnpackWithOwningPIDsCount first and allocate all arrays accordingly.

Note: The SourcePids vector (on input) should contain of owning PIDs for each column in the ColMap, as from Epetra_Util::GetPids, with the "-1 for local" option being used.

Note: The TargetPids vector (on output) will contain of owning PIDs for each column in the ColMap, as from Epetra_Util::GetPids, with the "-1 for local" option being used.

Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 415 of file Epetra_Import_Util.cpp.

int Epetra_Import_Util::UnpackAndCombineIntoCrsArrays ( const Epetra_CrsMatrix SourceMatrix,
int  NumSameIDs,
int  NumRemoteIDs,
const int *  RemoteLIDs,
int  NumPermuteIDs,
const int *  PermuteToLIDs,
const int *  PermuteFromLIDs,
int  LenImports,
char *  Imports,
int  TargetNumRows,
int  TargetNumNonzeros,
int  MyTargetPID,
int *  CSR_rowptr,
long long *  CSR_colind,
double *  CSR_values,
const std::vector< int > &  SourcePids,
std::vector< int > &  TargetPids 
)

UnpackAndCombineIntoCrsArrays.

You should call UnpackWithOwningPIDsCount first and allocate all arrays accordingly.

Note: The SourcePids vector (on input) should contain of owning PIDs for each column in the ColMap, as from Epetra_Util::GetPids, with the "-1 for local" option being used.

Note: The TargetPids vector (on output) will contain of owning PIDs for each column in the ColMap, as from Epetra_Util::GetPids, with the "-1 for local" option being used.

Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 444 of file Epetra_Import_Util.cpp.

template<typename int_type , class MapType1 , class MapType2 >
int Epetra_Import_Util::TLowCommunicationMakeColMapAndReindex ( int  N,
const int *  rowptr,
int *  colind_LID,
const int_type *  colind_GID,
const Epetra_Map domainMap,
const int *  owningPIDs,
bool  SortGhostsAssociatedWithEachProcessor,
std::vector< int > &  RemotePIDs,
MapType1 &  NewColMap 
)

Definition at line 475 of file Epetra_Import_Util.cpp.

int Epetra_Import_Util::LowCommunicationMakeColMapAndReindex ( int  N,
const int *  rowptr,
int *  colind,
const Epetra_Map domainMap,
const int *  owningPIDs,
bool  SortGhostsAssociatedWithEachProcessor,
std::vector< int > &  RemotePIDs,
Epetra_BlockMap NewColMap 
)

LowCommunicationMakeColMapAndReindex.

If you know the owning PIDs already, you can make the colmap a lot less expensively.

Note: The owningPids vector (on input) should contain of owning PIDs for each column in the ColMap, as from Epetra_Util::GetPids, with the "-1 for local" can be used, or not, here.

Note: This method will return a std::vector of the RemotePIDs, used for construction of the importer.

Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 689 of file Epetra_Import_Util.cpp.

int Epetra_Import_Util::LowCommunicationMakeColMapAndReindex ( int  N,
const int *  rowptr,
int *  colind_LID,
long long *  colind_GID,
const Epetra_Map domainMap,
const int *  owningPIDs,
bool  SortGhostsAssociatedWithEachProcessor,
std::vector< int > &  RemotePIDs,
Epetra_BlockMap NewColMap 
)

LowCommunicationMakeColMapAndReindex.

If you know the owning PIDs already, you can make the colmap a lot less expensively.

Note: The owningPids vector (on input) should contain of owning PIDs for each column in the ColMap, as from Epetra_Util::GetPids, with the "-1 for local" can be used, or not, here.

Note: This method will return a std::vector of the RemotePIDs, used for construction of the importer.

Warning
This method is intended for expert developer use only, and should never be called by user code.

Definition at line 703 of file Epetra_Import_Util.cpp.