Skip to content
Snippets Groups Projects
Commit 367dcf2d authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Use the GlobalP1Mapper instead of a GlobalIndexSet where appropriate

[[Imported from SVN: r9936]]
parent e7030e6f
No related branches found
No related tags found
No related merge requests found
...@@ -247,12 +247,25 @@ setup(const GridType& grid, ...@@ -247,12 +247,25 @@ setup(const GridType& grid,
// If we are on more than 1 processors, join all local transfer matrices on rank 0, // If we are on more than 1 processors, join all local transfer matrices on rank 0,
// and construct a single global transfer operator there. // and construct a single global transfer operator there.
typedef Dune::GlobalIndexSet<typename GridType::LevelGridView, gridDim> LevelGUIndex; typedef Dune::GlobalIndexSet<typename GridType::LevelGridView> LevelGUIndex;
LevelGUIndex fineGUIndex(grid_->levelGridView(i+1)); LevelGUIndex fineGUIndex(grid_->levelGridView(i+1), gridDim);
LevelGUIndex coarseGUIndex(grid_->levelGridView(i)); LevelGUIndex coarseGUIndex(grid_->levelGridView(i), gridDim);
typedef Dune::MultipleCodimMultipleGeomTypeMapper<typename GridType::LevelGridView, Dune::MCMGVertexLayout> LevelLocalMapper;
LevelLocalMapper fineLevelLocalMapper(grid_->levelGridView(i+1));
LevelLocalMapper coarseLevelLocalMapper(grid_->levelGridView(i));
typedef typename TruncatedCompressedMGTransfer<CorrectionType>::TransferOperatorType TransferOperatorType; typedef typename TruncatedCompressedMGTransfer<CorrectionType>::TransferOperatorType TransferOperatorType;
MatrixCommunicator<LevelGUIndex, TransferOperatorType> matrixComm(fineGUIndex, coarseGUIndex, 0); MatrixCommunicator<LevelGUIndex,
typename GridType::LevelGridView,
TransferOperatorType,
LevelLocalMapper,
LevelLocalMapper> matrixComm(fineGUIndex,
coarseGUIndex,
grid_->levelGridView(i),
fineLevelLocalMapper,
coarseLevelLocalMapper,
0);
mmgStep->mgTransfer_[i] = new TruncatedCompressedMGTransfer<CorrectionType>; mmgStep->mgTransfer_[i] = new TruncatedCompressedMGTransfer<CorrectionType>;
Dune::shared_ptr<TransferOperatorType> transferOperatorMatrix = Dune::make_shared<TransferOperatorType>(matrixComm.reduceCopy(newTransferOp->getMatrix())); Dune::shared_ptr<TransferOperatorType> transferOperatorMatrix = Dune::make_shared<TransferOperatorType>(matrixComm.reduceCopy(newTransferOp->getMatrix()));
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "geodesicfeassembler.hh" #include "geodesicfeassembler.hh"
#include <dune/grid/utility/globalindexset.hh> #include <dune/grid/utility/globalindexset.hh>
#include <dune/gfe/parallel/globalp1mapper.hh>
#include <dune/gfe/parallel/globalp2mapper.hh> #include <dune/gfe/parallel/globalp2mapper.hh>
/** \brief Riemannian trust-region solver for geodesic finite-element problems */ /** \brief Riemannian trust-region solver for geodesic finite-element problems */
...@@ -44,7 +45,7 @@ class RiemannianTrustRegionSolver ...@@ -44,7 +45,7 @@ class RiemannianTrustRegionSolver
#elif defined SECOND_ORDER #elif defined SECOND_ORDER
typedef Dune::GlobalP2Mapper<typename GridType::LeafGridView> GUIndex; typedef Dune::GlobalP2Mapper<typename GridType::LeafGridView> GUIndex;
#else #else
typedef GlobalUniqueIndex<typename GridType::LeafGridView, gridDim> GUIndex; typedef Dune::GlobalP1Mapper<typename GridType::LeafGridView> GUIndex;
#endif #endif
#ifdef THIRD_ORDER #ifdef THIRD_ORDER
...@@ -54,7 +55,7 @@ class RiemannianTrustRegionSolver ...@@ -54,7 +55,7 @@ class RiemannianTrustRegionSolver
typedef P2BasisMapper<typename GridType::LeafGridView> LocalMapper; typedef P2BasisMapper<typename GridType::LeafGridView> LocalMapper;
#else #else
typedef P1NodalBasis<typename GridType::LeafGridView,double> BasisType; typedef P1NodalBasis<typename GridType::LeafGridView,double> BasisType;
typedef Dune::MultipleCodimMultipleGeomTypeMapper<typename GridType::LeafGridView, Dune::VertexLayout> LocalMapper; typedef Dune::MultipleCodimMultipleGeomTypeMapper<typename GridType::LeafGridView, Dune::MCMGVertexLayout> LocalMapper;
#endif #endif
public: public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment