46#ifndef MUELU_INDEXMANAGER_DECL_HPP
47#define MUELU_INDEXMANAGER_DECL_HPP
50#include "Teuchos_CommHelpers.hpp"
51#include "Teuchos_OrdinalTraits.hpp"
53#include <Xpetra_Map_fwd.hpp>
54#include <Xpetra_Vector_fwd.hpp>
55#include <Xpetra_VectorFactory_fwd.hpp>
80 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
82#undef MUELU_INDEXMANAGER_SHORT
89 const RCP<const Teuchos::Comm<int> >
comm_;
134 const bool singleCoarsePoint,
const int NumDimensions,
135 const int interpolationOrder,
const Array<GO> GFineNodesPerDir,
136 const Array<LO> LFineNodesPerDir);
147 Array<LO>& ghostedNodeCoarseLIDs,
148 Array<int>& ghostedNodeCoarsePIDs,
149 Array<GO>& ghostedNodeCoarseGIDs)
const = 0;
152 Array<GO>& coarseNodeCoarseGIDs,
153 Array<GO>& coarseNodeFineGIDs)
const = 0;
229 virtual void getFineNodeGID(
const GO i,
const GO j,
const GO k, GO& myGID)
const = 0;
231 virtual void getFineNodeLID(
const LO i,
const LO j,
const LO k, LO& myLID)
const = 0;
253#define MUELU_INDEXMANAGER_SHORT
Base class for MueLu classes.
Container class for mesh layout and indices calculation.
LO getNumLocalGhostedNodes() const
Array< LO > offsets
distance between lowest (resp. highest) index to the lowest (resp. highest) ghostedNodeIndex in that ...
virtual void getFineNodeGlobalTuple(const GO myGID, GO &i, GO &j, GO &k) const =0
GO gNumCoarseNodes
global number of nodes remaining after coarsening.
bool isAggregationCoupled() const
virtual void getCoarseNodeLID(const LO i, const LO j, const LO k, LO &myLID) const =0
Array< int > getCoarseningEndRates() const
LO getNumLocalFineNodes() const
virtual void getCoarseNodesData(const RCP< const Map > fineCoordinatesMap, Array< GO > &coarseNodeCoarseGIDs, Array< GO > &coarseNodeFineGIDs) const =0
Array< LO > coarseNodeOffsets
distance between lowest (resp. highest) index to the lowest (resp. highest) coarseNodeIndex in that d...
virtual void getGhostedNodesData(const RCP< const Map > fineMap, Array< LO > &ghostedNodeCoarseLIDs, Array< int > &ghostedNodeCoarsePIDs, Array< GO > &ghostedNodeCoarseGIDs) const =0
virtual void getCoarseNodeGlobalTuple(const GO myGID, GO &i, GO &j, GO &k) const =0
GO getStartGhostedCoarseNode(int const dim) const
virtual void getFineNodeLocalTuple(const LO myLID, LO &i, LO &j, LO &k) const =0
Array< GO > getGlobalFineNodesPerDir() const
const int interpolationOrder_
Interpolation order used by grid transfer operators using these aggregates.
Array< GO > getGlobalCoarseNodesPerDir() const
const bool coupled_
Flag for coupled vs uncoupled aggregation mode, if true aggregation is coupled.
GO gNumFineNodes
global number of nodes.
int getNumDimensions() const
GO minGlobalIndex
lowest GID of any node in the local process
virtual void computeGlobalCoarseParameters()=0
int getInterpolationOrder() const
virtual void getGhostedNodeCoarseLID(const LO i, const LO j, const LO k, LO &myLID) const =0
GO getGlobalCoarseNodesInDir(const int dim) const
Array< LO > ghostedNodesPerDir
local number of ghosted nodes (i.e. ghost + coarse nodes) per direction
Array< GO > startGhostedCoarseNode
lowest coarse global tuple (i,j,k) of a node remaing on the local process after coarsening.
const Array< LO > lFineNodesPerDir
local number of nodes per direction.
virtual void getFineNodeGhostedTuple(const LO myLID, LO &i, LO &j, LO &k) const =0
virtual void getCoarseNodeFineLID(const LO i, const LO j, const LO k, LO &myLID) const =0
virtual void getCoarseNodeGhostedLID(const LO i, const LO j, const LO k, LO &myLID) const =0
Array< LO > getCoarseNodeOffsets() const
GO getNumGlobalCoarseNodes() const
virtual std::vector< std::vector< GO > > getCoarseMeshData() const =0
LO numGhostedNodes10
local number of ghosted nodes (i.e. ghost + coarse nodes) per 0-1 slice.
Array< GO > gCoarseNodesPerDir
global number of nodes per direction remaining after coarsening.
int getCoarseningRate(const int dim) const
Array< LO > getGhostedNodesPerDir() const
void computeMeshParameters()
Array< GO > startIndices
lowest global tuple (i,j,k) of a node on the local process
LO lNumCoarseNodes
local number of nodes remaining after coarsening.
GO gNumFineNodes10
global number of nodes per 0-1 slice.
Array< int > coarseRate
coarsening rate in each direction
virtual void getCoarseNodeGID(const GO i, const GO j, const GO k, GO &myGID) const =0
Array< GO > getStartGhostedCoarseNodes() const
LO getLocalCoarseNodesInDir(const int dim) const
bool getGhostInterface(const int dir) const
Array< LO > getLocalFineNodesPerDir() const
LO getNumLocalCoarseNodes() const
GO getStartIndex(int const dim) const
bool ghostedDir[6]
flags indicating if ghost points are needed at ilo, ihi, jlo, jhi, klo and khi boundaries.
LO numGhostNodes
local number of ghost nodes
bool meshEdge[6]
flags indicating if we run into the edge of the mesh in ilo, ihi, jlo, jhi, klo or khi.
virtual void getFineNodeGID(const GO i, const GO j, const GO k, GO &myGID) const =0
virtual void getCoarseNodeLocalTuple(const LO myLID, LO &i, LO &j, LO &k) const =0
bool getMeshEdge(const int dir) const
bool ghostInterface[6]
flags indicating if ghost points are needed at ilo, ihi, jlo, jhi, klo and khi boundaries.
Array< GO > getStartIndices() const
int getCoarseningEndRate(const int dim) const
const bool singleCoarsePoint_
Flag telling us if can reduce dimensions to a single layer.
Array< LO > getOffsets() const
const int numDimensions
Number of spacial dimensions in the problem.
GO getNumGlobalFineNodes() const
LO lNumCoarseNodes10
local number of nodes per 0-1 slice remaining after coarsening.
virtual void getGhostedNodeFineLID(const LO i, const LO j, const LO k, LO &myLID) const =0
LO lNumFineNodes10
local number of nodes per 0-1 slice.
GO getGlobalFineNodesInDir(const int dim) const
LO getCoarseNodeOffset(int const dim) const
LO getOffset(int const dim) const
LO lNumFineNodes
local number of nodes.
virtual void getFineNodeLID(const LO i, const LO j, const LO k, LO &myLID) const =0
const RCP< const Teuchos::Comm< int > > comm_
Communicator used by uncoupled aggregation.
Array< LO > getLocalCoarseNodesPerDir() const
GO gNumCoarseNodes10
global number of nodes per 0-1 slice remaining after coarsening.
Array< int > endRate
adapted coarsening rate at the edge of the mesh in each direction.
LO numGhostedNodes
local number of ghosted nodes (i.e. ghost + coarse nodes).
const Array< GO > gFineNodesPerDir
global number of nodes per direction.
Array< int > getCoarseningRates() const
Array< LO > lCoarseNodesPerDir
local number of nodes per direction remaing after coarsening.
LO getLocalFineNodesInDir(const int dim) const
bool isSingleCoarsePoint() const
LO getGhostedNodesInDir(const int dim) const
Namespace for MueLu classes and methods.