EpetraExt Package Browser (Single Doxygen Collection) Development
Private Member Functions | Private Attributes
EpetraExt_PointToBlockDiagPermute Class Reference

EpetraExt_PointToBlockDiagPermute: A class for managing point-to-block-diagonal permutations. More...

#include <EpetraExt_PointToBlockDiagPermute.h>

Inheritance diagram for EpetraExt_PointToBlockDiagPermute:
Inheritance graph
[legend]

List of all members.

Private Member Functions

int ExtractBlockDiagonal ()
 Pulls the block diagonal of the matrix and then builds the BDMat_.
int SetupContiguousMode ()
 Setup/Cleanup for Contiguous Mode.
int CleanupContiguousMode ()
void UpdateImportVector (int NumVectors) const
void UpdateExportVector (int NumVectors) const

Private Attributes

Teuchos::ParameterList List_
const Epetra_CrsMatrixMatrix_
bool PurelyLocalMode_
bool ContiguousBlockMode_
int ContiguousBlockSize_
int NumBlocks_
int * Blockstart_
int * Blockids_
Epetra_BlockMapBDMap_
Epetra_MapCompatibleMap_
EpetraExt_BlockDiagMatrixBDMat_
Epetra_ImportImporter_
Epetra_ExportExporter_
Epetra_MultiVectorImportVector_
Epetra_MultiVectorExportVector_
 EpetraExt_PointToBlockDiagPermute (const Epetra_CrsMatrix &MAT)
 @ Name Constructors

Destructor

virtual ~EpetraExt_PointToBlockDiagPermute ()
 Destructor.

Attribute set methods

virtual int SetParameters (Teuchos::ParameterList &List)
 Sets the parameter list.
virtual int SetUseTranspose (bool UseTranspose)
 If set true, transpose of this operator will be applied. NOT IMPLEMENTED.
virtual int Compute ()
 Extracts the block-diagonal, builds maps, etc.

Mathematical functions

virtual int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
virtual int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.
virtual double NormInf () const
 Returns the infinity norm of the global matrix - NOT IMPLEMENTED.

Attribute access functions

virtual const char * Label () const
 Returns a character string describing the operator.
virtual bool UseTranspose () const
 Returns the current UseTranspose setting.
virtual bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise.
virtual const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator.
virtual const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this.
virtual const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this.
virtual const
EpetraExt_BlockDiagMatrix
BlockMatrix ()
 Returns the block matrix. Only call this after calling Compute.
virtual Epetra_FECrsMatrixCreateFECrsMatrix ()
 Creates an Epetra_FECrsMatrix from the BlockDiagMatrix. This is generally only useful if you want to do a matrix-matrix multiply.

Miscellaneous

virtual void Print (ostream &os) const
 Print method.

Import/Export Methods

int Import (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Imports an Epetra_DistObject using the Epetra_Import object.
int Import (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Imports an Epetra_DistObject using the Epetra_Export object.
int Export (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Exports an Epetra_DistObject using the Epetra_Import object.
int Export (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Exports an Epetra_DistObject using the Epetra_Export object.

Internal utilities

virtual int CheckSizes (const Epetra_SrcDistObject &Source)
 Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.
virtual int CopyAndPermute (const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor)
 Perform ID copies and permutations that are on processor.
virtual int PackAndPrepare (const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor)
 Perform any packing or preparation required for call to DoTransfer().
virtual int UnpackAndCombine (const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor)
 Perform any unpacking and combining after call to DoTransfer().

Detailed Description

EpetraExt_PointToBlockDiagPermute: A class for managing point-to-block-diagonal permutations.

Manages point-to-block-diagonal permutations (and vice versa) as well as service routines for extracting block diagonals from matrices.

Definition at line 71 of file EpetraExt_PointToBlockDiagPermute.h.


Constructor & Destructor Documentation

EpetraExt_PointToBlockDiagPermute::EpetraExt_PointToBlockDiagPermute ( const Epetra_CrsMatrix MAT)

@ Name Constructors

Constructor

Definition at line 57 of file EpetraExt_PointToBlockDiagPermute.cpp.

EpetraExt_PointToBlockDiagPermute::~EpetraExt_PointToBlockDiagPermute ( ) [virtual]

Destructor.

Definition at line 79 of file EpetraExt_PointToBlockDiagPermute.cpp.


Member Function Documentation

int EpetraExt_PointToBlockDiagPermute::SetParameters ( Teuchos::ParameterList List) [virtual]

Sets the parameter list.

Definition at line 94 of file EpetraExt_PointToBlockDiagPermute.cpp.

virtual int EpetraExt_PointToBlockDiagPermute::SetUseTranspose ( bool  UseTranspose) [inline, virtual]

If set true, transpose of this operator will be applied. NOT IMPLEMENTED.

Implements Epetra_Operator.

Definition at line 94 of file EpetraExt_PointToBlockDiagPermute.h.

int EpetraExt_PointToBlockDiagPermute::Compute ( ) [virtual]

Extracts the block-diagonal, builds maps, etc.

Definition at line 132 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::Apply ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [virtual]

Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.

Parameters:
InX - A Epetra_MultiVector of dimension NumVectors to multiply with matrix.
OutY -A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.

Implements Epetra_Operator.

Definition at line 139 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::ApplyInverse ( const Epetra_MultiVector X,
Epetra_MultiVector Y 
) const [virtual]

Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.

Parameters:
InX - A Epetra_MultiVector of dimension NumVectors to solve for.
OutY -A Epetra_MultiVector of dimension NumVectors containing result.
Returns:
Integer error code, set to 0 if successful.
Warning:
In order to work with AztecOO, any implementation of this method must support the case where X and Y are the same object.

Implements Epetra_Operator.

Definition at line 146 of file EpetraExt_PointToBlockDiagPermute.cpp.

virtual double EpetraExt_PointToBlockDiagPermute::NormInf ( ) const [inline, virtual]

Returns the infinity norm of the global matrix - NOT IMPLEMENTED.

Implements Epetra_Operator.

Definition at line 130 of file EpetraExt_PointToBlockDiagPermute.h.

virtual const char* EpetraExt_PointToBlockDiagPermute::Label ( ) const [inline, virtual]

Returns a character string describing the operator.

Implements Epetra_Operator.

Definition at line 137 of file EpetraExt_PointToBlockDiagPermute.h.

virtual bool EpetraExt_PointToBlockDiagPermute::UseTranspose ( ) const [inline, virtual]

Returns the current UseTranspose setting.

Implements Epetra_Operator.

Definition at line 140 of file EpetraExt_PointToBlockDiagPermute.h.

virtual bool EpetraExt_PointToBlockDiagPermute::HasNormInf ( ) const [inline, virtual]

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements Epetra_Operator.

Definition at line 143 of file EpetraExt_PointToBlockDiagPermute.h.

virtual const Epetra_Comm& EpetraExt_PointToBlockDiagPermute::Comm ( ) const [inline, virtual]

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Reimplemented from Epetra_DistObject.

Definition at line 146 of file EpetraExt_PointToBlockDiagPermute.h.

virtual const Epetra_Map& EpetraExt_PointToBlockDiagPermute::OperatorDomainMap ( ) const [inline, virtual]

Returns the Epetra_Map object associated with the domain of this.

Implements Epetra_Operator.

Definition at line 150 of file EpetraExt_PointToBlockDiagPermute.h.

virtual const Epetra_Map& EpetraExt_PointToBlockDiagPermute::OperatorRangeMap ( ) const [inline, virtual]

Returns the Epetra_Map object associated with the range of this.

Implements Epetra_Operator.

Definition at line 154 of file EpetraExt_PointToBlockDiagPermute.h.

virtual const EpetraExt_BlockDiagMatrix& EpetraExt_PointToBlockDiagPermute::BlockMatrix ( ) [inline, virtual]

Returns the block matrix. Only call this after calling Compute.

Definition at line 158 of file EpetraExt_PointToBlockDiagPermute.h.

Epetra_FECrsMatrix * EpetraExt_PointToBlockDiagPermute::CreateFECrsMatrix ( ) [virtual]

Creates an Epetra_FECrsMatrix from the BlockDiagMatrix. This is generally only useful if you want to do a matrix-matrix multiply.

Definition at line 503 of file EpetraExt_PointToBlockDiagPermute.cpp.

void EpetraExt_PointToBlockDiagPermute::Print ( ostream &  os) const [virtual]

Print method.

Reimplemented from Epetra_DistObject.

Definition at line 198 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::Import ( const Epetra_SrcDistObject A,
const Epetra_Import Importer,
Epetra_CombineMode  CombineMode,
const Epetra_OffsetIndex Indexor = 0 
)

Imports an Epetra_DistObject using the Epetra_Import object.

Parameters:
InSource - Distributed object that will be imported into the "\e this" object.
InImporter - A Epetra_Import object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_DistObject.

Definition at line 569 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::Import ( const Epetra_SrcDistObject A,
const Epetra_Export Exporter,
Epetra_CombineMode  CombineMode,
const Epetra_OffsetIndex Indexor = 0 
)

Imports an Epetra_DistObject using the Epetra_Export object.

Parameters:
InSource - Distributed object that will be imported into the "\e this" object.
InExporter - A Epetra_Export object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_DistObject.

Definition at line 574 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::Export ( const Epetra_SrcDistObject A,
const Epetra_Import Importer,
Epetra_CombineMode  CombineMode,
const Epetra_OffsetIndex Indexor = 0 
)

Exports an Epetra_DistObject using the Epetra_Import object.

Parameters:
InSource - Distributed object that will be exported to the "\e this" object.
InImporter - A Epetra_Import object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_DistObject.

Definition at line 579 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::Export ( const Epetra_SrcDistObject A,
const Epetra_Export Exporter,
Epetra_CombineMode  CombineMode,
const Epetra_OffsetIndex Indexor = 0 
)

Exports an Epetra_DistObject using the Epetra_Export object.

Parameters:
InSource - Distributed object that will be exported to the "\e this" multivector.
InExporter - A Epetra_Export object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns:
Integer error code, set to 0 if successful.

Reimplemented from Epetra_DistObject.

Definition at line 584 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::CheckSizes ( const Epetra_SrcDistObject Source) [protected, virtual]

Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.

Implements Epetra_DistObject.

Definition at line 590 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::CopyAndPermute ( const Epetra_SrcDistObject Source,
int  NumSameIDs,
int  NumPermuteIDs,
int *  PermuteToLIDs,
int *  PermuteFromLIDs,
const Epetra_OffsetIndex Indexor 
) [protected, virtual]

Perform ID copies and permutations that are on processor.

Implements Epetra_DistObject.

Definition at line 596 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::PackAndPrepare ( const Epetra_SrcDistObject Source,
int  NumExportIDs,
int *  ExportLIDs,
int &  LenExports,
char *&  Exports,
int &  SizeOfPacket,
int *  Sizes,
bool &  VarSizes,
Epetra_Distributor Distor 
) [protected, virtual]

Perform any packing or preparation required for call to DoTransfer().

Implements Epetra_DistObject.

Definition at line 607 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::UnpackAndCombine ( const Epetra_SrcDistObject Source,
int  NumImportIDs,
int *  ImportLIDs,
int  LenImports,
char *  Imports,
int &  SizeOfPacket,
Epetra_Distributor Distor,
Epetra_CombineMode  CombineMode,
const Epetra_OffsetIndex Indexor 
) [protected, virtual]

Perform any unpacking and combining after call to DoTransfer().

Implements Epetra_DistObject.

Definition at line 621 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::ExtractBlockDiagonal ( ) [private]

Pulls the block diagonal of the matrix and then builds the BDMat_.

Definition at line 206 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::SetupContiguousMode ( ) [private]

Setup/Cleanup for Contiguous Mode.

Definition at line 463 of file EpetraExt_PointToBlockDiagPermute.cpp.

int EpetraExt_PointToBlockDiagPermute::CleanupContiguousMode ( ) [private]

Definition at line 492 of file EpetraExt_PointToBlockDiagPermute.cpp.

void EpetraExt_PointToBlockDiagPermute::UpdateImportVector ( int  NumVectors) const [private]

Definition at line 537 of file EpetraExt_PointToBlockDiagPermute.cpp.

void EpetraExt_PointToBlockDiagPermute::UpdateExportVector ( int  NumVectors) const [private]

Definition at line 551 of file EpetraExt_PointToBlockDiagPermute.cpp.


Member Data Documentation

Definition at line 287 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 288 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 289 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 292 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 293 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 295 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 296 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 297 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 298 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 299 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 300 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 301 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 302 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 303 of file EpetraExt_PointToBlockDiagPermute.h.

Definition at line 304 of file EpetraExt_PointToBlockDiagPermute.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines