Epetra Development
Loading...
Searching...
No Matches
Epetra_Import_Util Namespace Reference

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

Functions

int EPETRA_LIB_DLL_EXPORT PackAndPrepareWithOwningPIDs (const Epetra_CrsMatrix &SourceMatrix, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, std::vector< int > &SourcePids)
 PackAndPrepareWithOwningPIDs.
int EPETRA_LIB_DLL_EXPORT 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.
int EPETRA_LIB_DLL_EXPORT 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.
int EPETRA_LIB_DLL_EXPORT 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.
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.
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.

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

◆ LowCommunicationMakeColMapAndReindex() [1/2]

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.

References LowCommunicationMakeColMapAndReindex().

Referenced by LowCommunicationMakeColMapAndReindex(), and LowCommunicationMakeColMapAndReindex().

◆ LowCommunicationMakeColMapAndReindex() [2/2]

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.

References LowCommunicationMakeColMapAndReindex().

◆ PackAndPrepareWithOwningPIDs()

int EPETRA_LIB_DLL_EXPORT 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.

References PackAndPrepareWithOwningPIDs().

Referenced by PackAndPrepareWithOwningPIDs().

◆ UnpackAndCombineIntoCrsArrays() [1/2]

int EPETRA_LIB_DLL_EXPORT 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.

References UnpackAndCombineIntoCrsArrays().

Referenced by UnpackAndCombineIntoCrsArrays(), and UnpackAndCombineIntoCrsArrays().

◆ UnpackAndCombineIntoCrsArrays() [2/2]

int EPETRA_LIB_DLL_EXPORT 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.

References UnpackAndCombineIntoCrsArrays().

◆ UnpackWithOwningPIDsCount()

int EPETRA_LIB_DLL_EXPORT 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.

References UnpackWithOwningPIDsCount().

Referenced by UnpackWithOwningPIDsCount().