42 #ifndef EPETRAEXT_POINTTOBLOCKDIAGPERMUTE_H
43 #define EPETRAEXT_POINTTOBLOCKDIAGPERMUTE_H
45 #if defined(EpetraExt_SHOW_DEPRECATED_WARNINGS)
47 #warning "The EpetraExt package is deprecated"
51 #include "Epetra_ConfigDefs.h"
52 #include "Epetra_DistObject.h"
53 #include "Epetra_BlockMap.h"
54 #include "Epetra_BlockMap.h"
55 #include "Epetra_Map.h"
56 #include "Epetra_Operator.h"
57 #include "Epetra_CrsMatrix.h"
58 #include "Epetra_FECrsMatrix.h"
59 #include "Teuchos_ParameterList.hpp"
149 virtual const char *
Label()
const{
return "Fix Me";}
178 virtual void Print(std::ostream& os)
const;
257 int * PermuteFromLIDs,
287 int ExtractBlockDiagonal();
290 int SetupContiguousMode();
291 int CleanupContiguousMode();
294 void UpdateImportVector(
int NumVectors)
const;
295 void UpdateExportVector(
int NumVectors)
const;
297 Teuchos::ParameterList List_;
299 bool PurelyLocalMode_;
302 bool ContiguousBlockMode_;
303 int ContiguousBlockSize_;
308 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
309 long long *Blockids_LL_;
319 template<
typename int_type>
322 template<
typename int_type>
323 int TSetupContiguousMode();
325 template<
typename int_type>
326 int TExtractBlockDiagonal();
328 template<
typename int_type>
329 int TSetParameters(Teuchos::ParameterList & List);
331 template<
typename int_type>
332 const int_type* Blockids_const_ptr()
const;
334 template<
typename int_type>
335 int_type*& Blockids_ref();
339 template<>
inline const int* EpetraExt_PointToBlockDiagPermute::Blockids_const_ptr<int>()
const {
return Blockids_int_; }
341 template<>
inline int*& EpetraExt_PointToBlockDiagPermute::Blockids_ref<int>() {
return Blockids_int_; }
343 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
344 template<>
inline const long long* EpetraExt_PointToBlockDiagPermute::Blockids_const_ptr<long long>()
const {
return Blockids_LL_; }
345 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.