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" 
   53 #include "Teuchos_ParameterList.hpp" 
  143   virtual const char * 
Label()
 const{
return "Fix Me";}
 
  172   virtual void Print(std::ostream& os) 
const;
 
  251                              int * PermuteFromLIDs,
 
  281   int ExtractBlockDiagonal();
 
  284   int SetupContiguousMode();
 
  285   int CleanupContiguousMode();
 
  288   void UpdateImportVector(
int NumVectors) 
const;
 
  289   void UpdateExportVector(
int NumVectors) 
const;
 
  291   Teuchos::ParameterList List_;
 
  293   bool PurelyLocalMode_;
 
  296   bool ContiguousBlockMode_;
 
  297   int ContiguousBlockSize_;
 
  302 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  303   long long *Blockids_LL_;
 
  313   template<
typename int_type>
 
  316   template<
typename int_type>
 
  317   int TSetupContiguousMode();
 
  319   template<
typename int_type>
 
  320   int TExtractBlockDiagonal();
 
  322   template<
typename int_type>
 
  323   int TSetParameters(Teuchos::ParameterList & List);
 
  325   template<
typename int_type>
 
  326   const int_type* Blockids_const_ptr() 
const;
 
  328   template<
typename int_type>
 
  329   int_type*& Blockids_ref();
 
  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_; }
 
virtual const EpetraExt_BlockDiagMatrix & BlockMatrix()
Return the block matrix. Only call this after calling Compute. 
EpetraExt_PointToBlockDiagPermute: A class for managing point-to-block-diagonal permutations. 
virtual const Epetra_Map & OperatorDomainMap() const 
Return the Epetra_Map object associated with the domain of this operator. 
virtual bool HasNormInf() const 
Return true if the this object can provide an approximate Inf-norm, false otherwise. 
virtual int SetParameters(Teuchos::ParameterList &List)
Sets the parameter list. 
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...
const Epetra_Map & OperatorDomainMap() const 
virtual const Epetra_Comm & Comm() const 
Return a pointer to the Epetra_Comm communicator associated with this operator. 
virtual bool UseTranspose() const 
Return the current UseTranspose setting. 
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 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. 
virtual ~EpetraExt_PointToBlockDiagPermute()
Destructor. 
EpetraExt_PointToBlockDiagPermute(const Epetra_CrsMatrix &MAT)
@ Name Constructors 
virtual const char * Label() const 
Return a string describing the operator. 
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. 
const Epetra_Map & OperatorRangeMap() const 
virtual const Epetra_Map & OperatorRangeMap() const 
Return the Epetra_Map object associated with the range of this operator. 
virtual void Print(std::ostream &os) const 
Print information about this object to the given output stream. 
virtual double NormInf() const 
Returns the infinity norm of the global matrix - NOT IMPLEMENTED. 
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. 
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. 
virtual int SetUseTranspose(bool)
Set whether to use the transpose. 
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.