MueLu
Version of the Day
|
#include <MueLu_Aggregates_kokkos_decl.hpp>
Public Types | |
using | local_ordinal_type = LocalOrdinal |
using | global_ordinal_type = GlobalOrdinal |
using | execution_space = typename DeviceType::execution_space |
using | node_type = Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > |
using | device_type = DeviceType |
using | range_type = Kokkos::RangePolicy< local_ordinal_type, execution_space > |
using | LO_view = Kokkos::View< local_ordinal_type *, device_type > |
using | aggregates_sizes_type = Kokkos::View< LocalOrdinal *, device_type > |
using | local_graph_type = typename LWGraph_kokkos::local_graph_type |
using | colors_view_type = Kokkos::View< typename local_graph_type::entries_type::data_type, typename local_graph_type::device_type::memory_space > |
Public Member Functions | |
Aggregates_kokkos (LWGraph_kokkos graph) | |
Standard constructor for Aggregates structure. More... | |
Aggregates_kokkos (const RCP< const Map > &map) | |
Constructor for Aggregates structure. More... | |
virtual | ~Aggregates_kokkos () |
Destructor. More... | |
void | SetNumAggregates (LO nAggregates) |
Set number of local aggregates on current processor. More... | |
void | SetNumGlobalAggregates (GO nGlobalAggregates) |
Set number of global aggregates on current processor. More... | |
KOKKOS_INLINE_FUNCTION LO | GetNumAggregates () const |
KOKKOS_INLINE_FUNCTION void | AggregatesCrossProcessors (const bool &flag) |
Record whether aggregates include DOFs from other processes. More... | |
KOKKOS_INLINE_FUNCTION bool | AggregatesCrossProcessors () const |
Return false if and only if no aggregates include DOFs from other processes. More... | |
RCP< LOMultiVector > & | 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< LOMultiVector > & | 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... | |
KOKKOS_INLINE_FUNCTION bool | IsRoot (LO i) const |
Returns true if node with given local node id is marked to be a root node. More... | |
KOKKOS_INLINE_FUNCTION 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... | |
aggregates_sizes_type::const_type | ComputeAggregateSizes (bool forceRecompute=false) const |
Compute sizes of aggregates. More... | |
local_graph_type | GetGraph () const |
void | ComputeNodesInAggregate (LO_view &aggPtr, LO_view &aggNodes, LO_view &unaggregated) const |
Generates a compressed list of nodes in each aggregate, where the entries in aggNodes[aggPtr[i]] up to aggNodes[aggPtr[i+1]-1] contain the nodes in aggregate i. unaggregated contains the list of nodes which are, for whatever reason, not aggregated (e.g. Dirichlet) More... | |
GO | GetNumGlobalAggregatesComputeIfNeeded () |
Get global number of aggregates. More... | |
Public Member Functions inherited from MueLu::BaseClass | |
virtual | ~BaseClass () |
Destructor. More... | |
Public Member Functions inherited from MueLu::VerboseObject | |
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... | |
Public Member Functions inherited from Teuchos::VerboseObject< VerboseObject > | |
VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) | |
virtual const VerboseObject & | setVerbLevel (const EVerbosityLevel verbLevel) const |
virtual const VerboseObject & | setOverridingVerbLevel (const EVerbosityLevel verbLevel) const |
virtual EVerbosityLevel | getVerbLevel () const |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< const ParameterList > | getValidVerboseObjectSublist () |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | setupVerboseObjectSublist (ParameterList *paramList) |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel) |
void | readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject) |
Public Member Functions inherited from Teuchos::VerboseObjectBase | |
virtual | ~VerboseObjectBase () |
VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) | |
virtual const VerboseObjectBase & | setOStream (const RCP< FancyOStream > &oStream) const |
virtual const VerboseObjectBase & | setOverridingOStream (const RCP< FancyOStream > &oStream) const |
virtual VerboseObjectBase & | setLinePrefix (const std::string &linePrefix) |
virtual RCP< FancyOStream > | getOStream () const |
virtual RCP< FancyOStream > | getOverridingOStream () const |
virtual std::string | getLinePrefix () const |
virtual OSTab | getOSTab (const int tabs=1, const std::string &linePrefix="") const |
Public Member Functions inherited from MueLu::Describable | |
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... | |
Public Member Functions inherited from Teuchos::Describable | |
void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
LabeledObject () | |
virtual | ~LabeledObject () |
virtual void | setObjectLabel (const std::string &objectLabel) |
virtual std::string | getObjectLabel () const |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
Private Types | |
typedef node_type | Node |
Set/Get Methods for specific aggregation data | |
RCP< IndexManager_kokkos > & | GetIndexManager () |
Get the index manager used by structured aggregation algorithms. This has to be done by the aggregation factory. More... | |
void | SetIndexManager (RCP< IndexManager_kokkos > &geoData) |
Set the index manager used by structured aggregation algorithms. This has to be done by the aggregation factory. More... | |
colors_view_type & | GetGraphColors () |
Get a distance 2 coloring of the underlying graph. The coloring is computed and set during Phase1 of aggregation. More... | |
void | SetGraphColors (colors_view_type graphColors) |
Set a distance 2 coloring of the underlying graph. The coloring is computed and set during Phase1 of aggregation. More... | |
LO | GetGraphNumColors () |
Get the number of colors needed by the distance 2 coloring. More... | |
void | SetGraphNumColors (const LO graphNumColors) |
Set the number of colors needed by the distance 2 coloring. More... | |
Overridden from Teuchos::Describable | |
LO | numAggregates_ |
Number of aggregates on this processor. More... | |
GO | numGlobalAggregates_ |
Number of global aggregates. More... | |
RCP< LOMultiVector > | vertex2AggId_ |
RCP< LOVector > | procWinner_ |
RCP< IndexManager_kokkos > | geoData_ |
colors_view_type | graphColors_ |
LO | graphNumColors_ |
Kokkos::View< bool *, device_type > | isRoot_ |
bool | aggregatesIncludeGhosts_ |
Set to false iff aggregates do not include any DOFs belong to other processes. More... | |
aggregates_sizes_type | aggregateSizes_ |
Array of sizes of each local aggregate. More... | |
local_graph_type | graph_ |
Aggregates represented as Kokkos graph type. 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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from MueLu::VerboseObject | |
static void | SetMueLuOStream (const Teuchos::RCP< Teuchos::FancyOStream > &mueluOStream) |
static void | SetMueLuOFileStream (const std::string &filename) |
static Teuchos::RCP < Teuchos::FancyOStream > | GetMueLuOStream () |
static void | SetDefaultVerbLevel (const VerbLevel defaultVerbLevel) |
Set the default (global) verbosity level. More... | |
static VerbLevel | GetDefaultVerbLevel () |
Get the default (global) verbosity level. More... | |
Static Public Member Functions inherited from Teuchos::VerboseObject< VerboseObject > | |
static void | setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel) |
static EVerbosityLevel | getDefaultVerbLevel () |
Static Public Member Functions inherited from Teuchos::VerboseObjectBase | |
static void | setDefaultOStream (const RCP< FancyOStream > &defaultOStream) |
static RCP< FancyOStream > | getDefaultOStream () |
Static Public Attributes inherited from Teuchos::Describable | |
static const EVerbosityLevel | verbLevel_default |
Protected Member Functions inherited from Teuchos::VerboseObject< VerboseObject > | |
void | initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) |
Protected Member Functions inherited from Teuchos::VerboseObjectBase | |
void | initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) |
virtual void | informUpdatedVerbosityState () const |
Definition at line 106 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::local_ordinal_type = LocalOrdinal |
Definition at line 112 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::global_ordinal_type = GlobalOrdinal |
Definition at line 113 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::execution_space = typename DeviceType::execution_space |
Definition at line 114 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::node_type = Tpetra::KokkosCompat::KokkosDeviceWrapperNode<DeviceType> |
Definition at line 115 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::device_type = DeviceType |
Definition at line 116 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::range_type = Kokkos::RangePolicy<local_ordinal_type, execution_space> |
Definition at line 117 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::LO_view = Kokkos::View<local_ordinal_type*, device_type> |
Definition at line 118 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::aggregates_sizes_type = Kokkos::View<LocalOrdinal*, device_type> |
Definition at line 120 of file MueLu_Aggregates_kokkos_decl.hpp.
|
private |
Definition at line 124 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::local_graph_type = typename LWGraph_kokkos::local_graph_type |
Definition at line 131 of file MueLu_Aggregates_kokkos_decl.hpp.
using MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::colors_view_type = Kokkos::View<typename local_graph_type::entries_type::data_type, typename local_graph_type::device_type::memory_space> |
Definition at line 133 of file MueLu_Aggregates_kokkos_decl.hpp.
MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::Aggregates_kokkos | ( | LWGraph_kokkos | 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 63 of file MueLu_Aggregates_kokkos_def.hpp.
MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::Aggregates_kokkos | ( | 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 82 of file MueLu_Aggregates_kokkos_def.hpp.
|
inlinevirtual |
Destructor.
Definition at line 154 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Get the index manager used by structured aggregation algorithms. This has to be done by the aggregation factory.
Definition at line 162 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Set the index manager used by structured aggregation algorithms. This has to be done by the aggregation factory.
Definition at line 167 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Get a distance 2 coloring of the underlying graph. The coloring is computed and set during Phase1 of aggregation.
Definition at line 172 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Set a distance 2 coloring of the underlying graph. The coloring is computed and set during Phase1 of aggregation.
Definition at line 177 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Get the number of colors needed by the distance 2 coloring.
Definition at line 181 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Set the number of colors needed by the distance 2 coloring.
Definition at line 185 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Set number of local aggregates on current processor.
This has to be done by the aggregation routines.
Definition at line 193 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Set number of global aggregates on current processor.
This has to be done by the aggregation routines.returns the number of aggregates of the current processor. Note: could/should be renamed to GetNumLocalAggregates?
Definition at line 199 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Definition at line 202 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Record whether aggregates include DOFs from other processes.
Definition at line 207 of file MueLu_Aggregates_kokkos_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 215 of file MueLu_Aggregates_kokkos_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 223 of file MueLu_Aggregates_kokkos_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 229 of file MueLu_Aggregates_kokkos_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 234 of file MueLu_Aggregates_kokkos_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 240 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Returns true if node with given local node id is marked to be a root node.
Definition at line 244 of file MueLu_Aggregates_kokkos_decl.hpp.
|
inline |
Set root node information.
Used by aggregation methods only.
Definition at line 251 of file MueLu_Aggregates_kokkos_decl.hpp.
const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > > > MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::GetMap | ( | ) | const |
returns (overlapping) map of aggregate/node distribution
Definition at line 268 of file MueLu_Aggregates_kokkos_def.hpp.
Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::aggregates_sizes_type::const_type MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::ComputeAggregateSizes | ( | bool | forceRecompute = 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. |
Definition at line 101 of file MueLu_Aggregates_kokkos_def.hpp.
Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::local_graph_type MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::GetGraph | ( | ) | const |
Definition at line 130 of file MueLu_Aggregates_kokkos_def.hpp.
void MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::ComputeNodesInAggregate | ( | LO_view & | aggPtr, |
LO_view & | aggNodes, | ||
LO_view & | unaggregated | ||
) | const |
Generates a compressed list of nodes in each aggregate, where the entries in aggNodes[aggPtr[i]] up to aggNodes[aggPtr[i+1]-1] contain the nodes in aggregate i. unaggregated contains the list of nodes which are, for whatever reason, not aggregated (e.g. Dirichlet)
Definition at line 188 of file MueLu_Aggregates_kokkos_def.hpp.
GlobalOrdinal MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::GetNumGlobalAggregatesComputeIfNeeded | ( | ) |
Get global number of aggregates.
Definition at line 255 of file MueLu_Aggregates_kokkos_def.hpp.
|
virtual |
Return a simple one-line description of this object.
Reimplemented from MueLu::Describable.
Definition at line 239 of file MueLu_Aggregates_kokkos_def.hpp.
void MueLu::Aggregates_kokkos< LocalOrdinal, GlobalOrdinal, Tpetra::KokkosCompat::KokkosDeviceWrapperNode< DeviceType > >::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 245 of file MueLu_Aggregates_kokkos_def.hpp.
|
private |
Number of aggregates on this processor.
Definition at line 289 of file MueLu_Aggregates_kokkos_decl.hpp.
|
private |
Number of global aggregates.
Definition at line 290 of file MueLu_Aggregates_kokkos_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 296 of file MueLu_Aggregates_kokkos_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 302 of file MueLu_Aggregates_kokkos_decl.hpp.
|
private |
geoData stores an index manager object that is used to perform structured aggreation on a problem.
Definition at line 307 of file MueLu_Aggregates_kokkos_decl.hpp.
|
private |
graphColors_ stores a view that assigns a color to each node in the graph These colors are used to parallelize the aggregation process in UncoupledAggregation
Definition at line 312 of file MueLu_Aggregates_kokkos_decl.hpp.
|
private |
graphNumColors_ stores the number of colors that are needed to perform a distance 2 coloring of the underlying graph.
Definition at line 317 of file MueLu_Aggregates_kokkos_decl.hpp.
|
private |
Definition at line 319 of file MueLu_Aggregates_kokkos_decl.hpp.
|
private |
Set to false iff aggregates do not include any DOFs belong to other processes.
Definition at line 322 of file MueLu_Aggregates_kokkos_decl.hpp.
|
mutableprivate |
Array of sizes of each local aggregate.
Definition at line 326 of file MueLu_Aggregates_kokkos_decl.hpp.
|
mutableprivate |
Aggregates represented as Kokkos graph type.
Definition at line 330 of file MueLu_Aggregates_kokkos_decl.hpp.