42 #ifndef EPETRAEXT_POINTTOBLOCKDIAGPERMUTE_H 43 #define EPETRAEXT_POINTTOBLOCKDIAGPERMUTE_H 45 #include "Epetra_ConfigDefs.h" 46 #include "Epetra_DistObject.h" 47 #include "Epetra_BlockMap.h" 48 #include "Epetra_BlockMap.h" 49 #include "Epetra_Map.h" 50 #include "Epetra_Operator.h" 51 #include "Epetra_CrsMatrix.h" 52 #include "Epetra_FECrsMatrix.h" 119 virtual int Apply(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
133 virtual int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
143 virtual const char *
Label()
const{
return "Fix Me";}
152 virtual const Epetra_Comm &
Comm()
const {
return Map().Comm();}
172 virtual void Print(std::ostream& os)
const;
191 int Import(
const Epetra_SrcDistObject&
A,
const Epetra_Import& Importer, Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0);
206 int Import(
const Epetra_SrcDistObject&
A,
const Epetra_Export& Exporter, Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0);
221 int Export(
const Epetra_SrcDistObject&
A,
const Epetra_Import & Importer, Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0);
236 int Export(
const Epetra_SrcDistObject&
A,
const Epetra_Export& Exporter, Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0);
244 virtual int CheckSizes(
const Epetra_SrcDistObject& Source);
251 int * PermuteFromLIDs,
252 const Epetra_OffsetIndex * Indexor,
253 Epetra_CombineMode CombineMode = Zero);
264 Epetra_Distributor& Distor);
273 Epetra_Distributor& Distor,
274 Epetra_CombineMode CombineMode,
275 const Epetra_OffsetIndex * Indexor);
302 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 313 template<
typename int_type>
316 template<
typename int_type>
319 template<
typename int_type>
322 template<
typename int_type>
325 template<
typename int_type>
328 template<
typename int_type>
333 template<>
inline const int* EpetraExt_PointToBlockDiagPermute::Blockids_const_ptr<int>()
const {
return Blockids_int_; }
335 template<>
inline int*& EpetraExt_PointToBlockDiagPermute::Blockids_ref<int>() {
return Blockids_int_; }
337 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 338 template<>
inline const long long* EpetraExt_PointToBlockDiagPermute::Blockids_const_ptr<long long>()
const {
return Blockids_LL_; }
339 template<>
inline long long*& EpetraExt_PointToBlockDiagPermute::Blockids_ref<long long>() {
return Blockids_LL_; }
Epetra_MultiVector * ExportVector_
virtual int SetUseTranspose(bool useTranspose)
Set whether to use the transpose.
virtual void Print(std::ostream &os) const
Print information about this object to the given output stream.
virtual bool HasNormInf() const
Return true if the this object can provide an approximate Inf-norm, false otherwise.
int TSetParameters(Teuchos::ParameterList &List)
virtual const EpetraExt_BlockDiagMatrix & BlockMatrix()
Return the block matrix. Only call this after calling Compute.
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...
EpetraExt_PointToBlockDiagPermute: A class for managing point-to-block-diagonal permutations.
virtual int SetParameters(Teuchos::ParameterList &List)
Sets the parameter list.
int TSetupContiguousMode()
const int_type * Blockids_const_ptr() const
void UpdateImportVector(int NumVectors) const
virtual double NormInf() const
Returns the infinity norm of the global matrix - NOT IMPLEMENTED.
int_type *& Blockids_ref()
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.
Epetra_FECrsMatrix * TCreateFECrsMatrix()
virtual const Epetra_Map & OperatorDomainMap() const
Return the Epetra_Map object associated with the domain of this operator.
bool ContiguousBlockMode_
EpetraExt_BlockDiagMatrix: A class for storing distributed block matrices.
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().
virtual int CheckSizes(const Epetra_SrcDistObject &Source)
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not...
virtual const char * Label() const
Return a string describing the operator.
int CleanupContiguousMode()
virtual const Epetra_Map & OperatorRangeMap() const
Return the Epetra_Map object associated with the range of this operator.
virtual int CopyAndPermute(const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero)
Perform ID copies and permutations that are on processor.
EpetraExt_BlockDiagMatrix * BDMat_
Epetra_Map * CompatibleMap_
virtual ~EpetraExt_PointToBlockDiagPermute()
Destructor.
EpetraExt_PointToBlockDiagPermute(const Epetra_CrsMatrix &MAT)
@ Name Constructors
virtual int Compute()
Extracts the block-diagonal, builds maps, etc.
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 Epetra_FECrsMatrix * CreateFECrsMatrix()
Create an Epetra_FECrsMatrix from the BlockDiagMatrix.
int TExtractBlockDiagonal()
int SetupContiguousMode()
Setup/Cleanup for Contiguous Mode.
Epetra_Import * Importer_
const Epetra_CrsMatrix * Matrix_
Epetra_MultiVector * ImportVector_
virtual bool UseTranspose() const
Return the current UseTranspose setting.
int ExtractBlockDiagonal()
Pulls the block diagonal of the matrix and then builds the BDMat_.
Teuchos::ParameterList List_
void UpdateExportVector(int NumVectors) const
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 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.
Epetra_Export * Exporter_
virtual const Epetra_Comm & Comm() const
Return a pointer to the Epetra_Comm communicator associated with this operator.