MueLu
Version of the Day
|
Container class for aggregation information. More...
#include <MueLu_Aggregates_decl.hpp>
Public Member Functions | |
Aggregates (const GraphBase &graph) | |
Standard constructor for Aggregates structure. More... | |
Aggregates (const RCP< const Map > &map) | |
Constructor for Aggregates structure. More... | |
virtual | ~Aggregates () |
Destructor. More... | |
LO | GetNumAggregates () const |
returns the number of aggregates of the current processor. Note: could/should be renamed to GetNumLocalAggregates? More... | |
void | SetNumAggregates (LO nAggregates) |
Set number of local aggregates on current processor. More... | |
void | AggregatesCrossProcessors (const bool &flag) |
Record whether aggregates include DOFs from other processes. More... | |
bool | AggregatesCrossProcessors () const |
Return false if and only if no aggregates include DOFs from other processes. More... | |
RCP< LOVector > & | GetVertex2AggIdNonConst () |
Returns a nonconstant vector that maps local node IDs to local aggregates IDs. More... | |
RCP< LOVector > & | GetProcWinnerNonConst () |
Returns nonconsant vector that maps local node IDs to owning processor IDs. More... | |
const RCP< LOVector > & | GetVertex2AggId () const |
Returns constant vector that maps local node IDs to local aggregates IDs. More... | |
const RCP< LOVector > & | GetProcWinner () const |
Returns constant vector that maps local node IDs to owning processor IDs. More... | |
bool | IsRoot (LO i) const |
Returns true if node with given local node id is marked to be a root node. More... | |
void | SetIsRoot (LO i, bool value=true) |
Set root node information. More... | |
const RCP< const Map > | GetMap () const |
returns (overlapping) map of aggregate/node distribution More... | |
Teuchos::ArrayRCP< LO > | ComputeAggregateSizes (bool forceRecompute=true, bool cacheSizes=false) const |
Compute sizes of aggregates. More... | |
![]() | |
virtual | ~BaseClass () |
Destructor. More... | |
![]() | |
VerbLevel | GetVerbLevel () const |
Get the verbosity level. More... | |
void | SetVerbLevel (const VerbLevel verbLevel) |
Set the verbosity level of this object. More... | |
int | GetProcRankVerbose () const |
Get proc rank used for printing. Do not use this information for any other purpose. More... | |
int | SetProcRankVerbose (int procRank) const |
Set proc rank used for printing. More... | |
bool | IsPrint (MsgType type, int thisProcRankOnly=-1) const |
Find out whether we need to print out information for a specific message type. More... | |
Teuchos::FancyOStream & | GetOStream (MsgType type, int thisProcRankOnly=0) const |
Get an output stream for outputting the input message type. More... | |
Teuchos::FancyOStream & | GetBlackHole () const |
VerboseObject () | |
virtual | ~VerboseObject () |
Destructor. More... | |
![]() | |
virtual | ~Describable () |
Destructor. More... | |
virtual std::string | ShortClassName () const |
Return the class name of the object, without template parameters and without namespace. More... | |
virtual void | describe (Teuchos::FancyOStream &out_arg, const VerbLevel verbLevel=Default) const |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Print the object with some verbosity level to an FancyOStream object. More... | |
Overridden from Teuchos::Describable | |
LO | nAggregates_ |
Number of aggregates on this processor. More... | |
RCP< LOVector > | vertex2AggId_ |
RCP< LOVector > | procWinner_ |
Teuchos::ArrayRCP< bool > | isRoot_ |
bool | aggregatesIncludeGhosts_ |
Set to false iff aggregates do not include any DOFs belong to other processes. More... | |
Teuchos::ArrayRCP< LO > | aggregateSizes_ |
Array of sizes of each local aggregate. More... | |
std::string | description () const |
Return a simple one-line description of this object. More... | |
void | print (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=verbLevel_default) const |
Print the object with some verbosity level to an FancyOStream object. More... | |
GO | GetNumGlobalAggregates () const |
Get global number of aggregates. More... | |
Additional Inherited Members | |
![]() | |
static void | SetDefaultOStream (const Teuchos::RCP< Teuchos::FancyOStream > &defaultOStream) |
static Teuchos::RCP< Teuchos::FancyOStream > | GetDefaultOStream () |
static void | SetDefaultVerbLevel (const VerbLevel defaultVerbLevel) |
Set the default (global) verbosity level. More... | |
static VerbLevel | GetDefaultVerbLevel () |
Get the default (global) verbosity level. More... | |
Container class for aggregation information.
Structure holding aggregate information. Right now, nAggregates, IsRoot, Vertex2AggId, procWinner are populated. This allows us to look at a node and determine the aggregate to which it has been assigned and the id of the processor that owns this aggregate. It is not so easy to determine vertices within the kth aggregate or the size of the kth aggregate. Thus, it might be useful to have a secondary structure which would be a rectangular CrsGraph where rows (or vertices) correspond to aggregates and colunmns (or edges) correspond to nodes. While not strictly necessary, it might be convenient.
Definition at line 98 of file MueLu_Aggregates_decl.hpp.
MueLu::Aggregates< LocalOrdinal, GlobalOrdinal, Node >::Aggregates | ( | const GraphBase & | graph | ) |
Standard constructor for Aggregates structure.
Standard constructor of aggregates takes a Graph object as parameter. Uses the graph.GetImportMap() to initialize the internal vector for mapping nodes to (local) aggregate ids as well as the mapping of node to the owning processor id.
Definition at line 61 of file MueLu_Aggregates_def.hpp.
MueLu::Aggregates< LocalOrdinal, GlobalOrdinal, Node >::Aggregates | ( | const RCP< const Map > & | map | ) |
Constructor for Aggregates structure.
This constructor takes a RCP pointer to a map which is used for the internal mappings of nodes to the (local) aggregate ids and the owning processor.
Definition at line 78 of file MueLu_Aggregates_def.hpp.
|
inlinevirtual |
Destructor.
Definition at line 123 of file MueLu_Aggregates_decl.hpp.
|
inline |
returns the number of aggregates of the current processor. Note: could/should be renamed to GetNumLocalAggregates?
Definition at line 125 of file MueLu_Aggregates_decl.hpp.
|
inline |
Set number of local aggregates on current processor.
This has to be done by the aggregation routines.
Definition at line 131 of file MueLu_Aggregates_decl.hpp.
|
inline |
Record whether aggregates include DOFs from other processes.
Definition at line 134 of file MueLu_Aggregates_decl.hpp.
|
inline |
Return false if and only if no aggregates include DOFs from other processes.
Used in construction of tentative prolongator to skip a communication phase.
Definition at line 140 of file MueLu_Aggregates_decl.hpp.
|
inline |
Returns a nonconstant vector that maps local node IDs to local aggregates IDs.
For local node ID i, the corresponding vector entry v[i] is the local aggregate id to which i belongs on the current processor.
Definition at line 146 of file MueLu_Aggregates_decl.hpp.
|
inline |
Returns nonconsant vector that maps local node IDs to owning processor IDs.
For local node ID i, the corresponding vector entry v[i] is the owning processor ID.
Definition at line 152 of file MueLu_Aggregates_decl.hpp.
|
inline |
Returns constant vector that maps local node IDs to local aggregates IDs.
For local node ID i, the corresponding vector entry v[i] is the local aggregate id to which i belongs on the current processor.
Definition at line 157 of file MueLu_Aggregates_decl.hpp.
|
inline |
Returns constant vector that maps local node IDs to owning processor IDs.
For local node ID i, the corresponding vector entry v[i] is the owning processor ID.
Definition at line 163 of file MueLu_Aggregates_decl.hpp.
|
inline |
Returns true if node with given local node id is marked to be a root node.
Definition at line 166 of file MueLu_Aggregates_decl.hpp.
|
inline |
Set root node information.
Used by aggregation methods only.
Definition at line 172 of file MueLu_Aggregates_decl.hpp.
const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > MueLu::Aggregates< LocalOrdinal, GlobalOrdinal, Node >::GetMap | ( | ) | const |
returns (overlapping) map of aggregate/node distribution
Definition at line 151 of file MueLu_Aggregates_def.hpp.
Teuchos::ArrayRCP< LocalOrdinal > MueLu::Aggregates< LocalOrdinal, GlobalOrdinal, Node >::ComputeAggregateSizes | ( | bool | forceRecompute = true , |
bool | cacheSizes = false |
||
) | const |
Compute sizes of aggregates.
Returns the number of nodes in each aggregate in an array. If the aggregate sizes are not stored internally (which is the default), they are computed and returned. If the aggregate sizes have been stored internally, then they are not recomputed, but instead the stored sizes are returned.
[in] | forceRecompute | if true, force recomputation of the aggregate sizes. |
[in] | cacheSizes | if true and either forceRecompute==true or sizes haven't yet been calculated, compute and store the sizes. If forceRecompute==false and sizes have been calculated previously, then this parameter has no effect. Sizes should only be cached when the aggregation phases are complete, i.e, aggregate sizes are no longer changing! |
Definition at line 95 of file MueLu_Aggregates_def.hpp.
|
virtual |
Return a simple one-line description of this object.
Reimplemented from MueLu::Describable.
Definition at line 127 of file MueLu_Aggregates_def.hpp.
void MueLu::Aggregates< LocalOrdinal, GlobalOrdinal, Node >::print | ( | Teuchos::FancyOStream & | out, |
const Teuchos::EVerbosityLevel | verbLevel = verbLevel_default |
||
) | const |
Print the object with some verbosity level to an FancyOStream object.
Definition at line 135 of file MueLu_Aggregates_def.hpp.
|
private |
Get global number of aggregates.
Definition at line 144 of file MueLu_Aggregates_def.hpp.
|
private |
Number of aggregates on this processor.
Definition at line 202 of file MueLu_Aggregates_decl.hpp.
|
private |
vertex2AggId[k] gives a local id corresponding to the aggregate to which local id k has been assigned. While k is the local id on my processor (MyPID), vertex2AggId[k] is the local id on the processor which actually owns the aggregate.
Definition at line 208 of file MueLu_Aggregates_decl.hpp.
|
private |
If k is the local id on my processor (MyPID), the owning processor has the id given by procWinner[k]
Definition at line 214 of file MueLu_Aggregates_decl.hpp.
|
private |
Definition at line 216 of file MueLu_Aggregates_decl.hpp.
|
private |
Set to false iff aggregates do not include any DOFs belong to other processes.
Definition at line 219 of file MueLu_Aggregates_decl.hpp.
|
mutableprivate |
Array of sizes of each local aggregate.
Definition at line 222 of file MueLu_Aggregates_decl.hpp.