44 #ifndef EPETRA_MAPCOLORING_H
45 #define EPETRA_MAPCOLORING_H
162 int& operator [] (
int LID) {ListsAreValid_ =
false;
return ElementColors_[LID];};
170 int& operator () (
long long GID) {ListsAreValid_ =
false;
return ElementColors_[
Map().
LID(GID)];};
179 const int& operator [] (
int LID)
const {
return ElementColors_[LID];};
187 const int& operator () (
long long GID)
const {
return ElementColors_[
Map().
LID(GID)];};
192 int NumColors()
const {
if (!ListsAreValid_) GenerateLists();
return(NumColors_);};
196 int MaxNumColors()
const;
203 int *
ListOfColors()
const {
if (!ListsAreValid_) GenerateLists();
return(ListOfColors_);};
209 int NumElementsWithColor(
int Color)
const;
216 int * ColorLIDList(
int Color)
const;
222 int *
ElementColors()
const{
if (!ListsAreValid_) GenerateLists();
return(ElementColors_);};
251 virtual void Print(std::ostream & os)
const;
255 int Allocate(
int * ElementColors,
int Increment);
256 int GenerateLists()
const;
257 int DeleteLists()
const;
258 bool InItemList(
int ColorValue)
const;
267 int * PermuteFromLIDs,
297 : ItemValue(itemValue), NextItem(nextItem){}
318 template<
typename int_type>
321 template<
typename int_type>
327 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
329 #warning "The Epetra package is deprecated"
Epetra_Map: A class for partitioning vectors and matrices.
Epetra_MapColoring: A class for coloring Epetra_Map and Epetra_BlockMap objects.
Epetra_HashTable< int > * ColorIDs_
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
virtual int CopyAndPermute(const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero)=0
Perform ID copies and permutations that are on processor.
Epetra_OffsetIndex: This class builds index for efficient mapping of data from one Epetra_CrsGraph ba...
virtual void Print(std::ostream &os) const
Print method.
virtual int CheckSizes(const Epetra_SrcDistObject &Source)=0
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not...
int DefaultColor() const
Returns default color.
int * ListOfColors() const
Array of length NumColors() containing List of color values used in this coloring.
int * ElementColors() const
Returns pointer to array of the colors associated with the LIDs on the calling processor.
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)=0
Perform any unpacking and combining after call to DoTransfer().
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int LID(int GID) const
Returns local ID of global ID, return -1 if not found on this processor.
Epetra_DistObject & operator=(const Epetra_DistObject &src)
ListItem(const int itemValue=0, ListItem *nextItem=0)
Epetra_SrcDistObject: A class for supporting flexible source distributed objects for import/export op...
Epetra_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in pa...
virtual int PackAndPrepare(const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor)=0
Perform any packing or preparation required for call to DoTransfer().
const Epetra_BlockMap & Map() const
Returns the address of the Epetra_BlockMap for this multi-vector.