| 1 |
// @HEADER |
| 2 |
// ***************************************************************************** |
| 3 |
// ShyLU: Scalable Hybrid LU Preconditioner and Solver |
| 4 |
// |
| 5 |
// Copyright 2011 NTESS and the ShyLU contributors. |
| 6 |
// SPDX-License-Identifier: BSD-3-Clause |
| 7 |
// ***************************************************************************** |
| 8 |
// @HEADER |
| 9 |
|
| 10 |
#ifndef _FROSCH_CONSTANTPARTITIONOFUNITY_DECL_HPP |
| 11 |
#define _FROSCH_CONSTANTPARTITIONOFUNITY_DECL_HPP |
| 12 |
|
| 13 |
#include <FROSch_PartitionOfUnity_def.hpp> |
| 14 |
|
| 15 |
|
| 16 |
namespace FROSch { |
| 17 |
|
| 18 |
using namespace Teuchos; |
| 19 |
using namespace Xpetra; |
| 20 |
|
| 21 |
template <class SC = double, |
| 22 |
class LO = int, |
| 23 |
class GO = DefaultGlobalOrdinal, |
| 24 |
class NO = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType> |
| 25 |
class ConstantPartitionOfUnity : public PartitionOfUnity<SC,LO,GO,NO> { |
| 26 |
|
| 27 |
protected: |
| 28 |
|
| 29 |
using CommPtr = typename PartitionOfUnity<SC,LO,GO,NO>::CommPtr; |
| 30 |
|
| 31 |
using XMapPtr = typename PartitionOfUnity<SC,LO,GO,NO>::XMapPtr; |
| 32 |
using ConstXMapPtr = typename PartitionOfUnity<SC,LO,GO,NO>::ConstXMapPtr; |
| 33 |
using XMapPtrVecPtr = typename PartitionOfUnity<SC,LO,GO,NO>::XMapPtrVecPtr; |
| 34 |
using ConstXMapPtrVecPtr = typename PartitionOfUnity<SC,LO,GO,NO>::ConstXMapPtrVecPtr; |
| 35 |
|
| 36 |
using XMultiVectorPtr = typename PartitionOfUnity<SC,LO,GO,NO>::XMultiVectorPtr; |
| 37 |
using ConstXMultiVectorPtr = typename PartitionOfUnity<SC,LO,GO,NO>::ConstXMultiVectorPtr; |
| 38 |
using XMultiVectorPtrVecPtr = typename PartitionOfUnity<SC,LO,GO,NO>::XMultiVectorPtrVecPtr; |
| 39 |
using ConstXMultiVectorPtrVecPtr = typename PartitionOfUnity<SC,LO,GO,NO>::ConstXMultiVectorPtrVecPtr; |
| 40 |
|
| 41 |
using ParameterListPtr = typename PartitionOfUnity<SC,LO,GO,NO>::ParameterListPtr; |
| 42 |
|
| 43 |
using DDInterfacePtr = typename PartitionOfUnity<SC,LO,GO,NO>::DDInterfacePtr; |
| 44 |
|
| 45 |
using EntitySetPtr = typename PartitionOfUnity<SC,LO,GO,NO>::EntitySetPtr; |
| 46 |
|
| 47 |
using UN = typename PartitionOfUnity<SC,LO,GO,NO>::UN; |
| 48 |
|
| 49 |
using LOVec = typename PartitionOfUnity<SC,LO,GO,NO>::LOVec; |
| 50 |
|
| 51 |
using GOVec = typename PartitionOfUnity<SC,LO,GO,NO>::GOVec; |
| 52 |
using GOVecView = typename PartitionOfUnity<SC,LO,GO,NO>::GOVecView; |
| 53 |
|
| 54 |
using SCVec = typename PartitionOfUnity<SC,LO,GO,NO>::SCVec; |
| 55 |
|
| 56 |
public: |
| 57 |
|
| 58 |
ConstantPartitionOfUnity(CommPtr mpiComm, |
| 59 |
CommPtr serialComm, |
| 60 |
UN dimension, |
| 61 |
UN dofsPerNode, |
| 62 |
ConstXMapPtr nodesMap, |
| 63 |
ConstXMapPtrVecPtr dofsMaps, |
| 64 |
ParameterListPtr parameterList, |
| 65 |
Verbosity verbosity = All, |
| 66 |
UN levelID = 1, |
| 67 |
DDInterfacePtr ddInterface = null); |
| 68 |
|
| 69 |
virtual ~ConstantPartitionOfUnity(); |
| 70 |
|
| 71 |
virtual int removeDirichletNodes(GOVecView dirichletBoundaryDofs, |
| 72 |
ConstXMultiVectorPtr nodeList = null); |
| 73 |
|
| 74 |
virtual int computePartitionOfUnity(ConstXMultiVectorPtr nodeList = null); |
| 75 |
|
| 76 |
protected: |
| 77 |
|
| 78 |
DDInterfacePtr DDInterface_; |
| 79 |
|
| 80 |
bool UseVolumes_ = false; |
| 81 |
|
| 82 |
EntitySetPtr Volumes_; |
| 83 |
}; |
| 84 |
|
| 85 |
} |
| 86 |
|
| 87 |
#endif |