Commit 23d53307 authored by lisa_julia.nebel_at_tu-dresden.de's avatar lisa_julia.nebel_at_tu-dresden.de
Browse files

wip

parent 0cd73d5e
Pipeline #50514 passed with stage
in 12 minutes and 52 seconds
......@@ -141,8 +141,10 @@ setup(const typename BasisType::GridView::Grid& grid,
Dune::Fufem::DuneFunctionsOperatorAssembler<BasisType,BasisType>,
OperatorAssembler<DuneFunctionsBasis<BasisType>,DuneFunctionsBasis<BasisType>,Dune::Partitions::Interior> > operatorAssembler(basis,basis);
typedef Dune::Functions::LagrangeBasis<GridView,2> LBasis;
LBasis lBasis(grid_->leafGridView());
typedef typename BasisType::GridView::Grid::LeafGridView LeafGridView;
typedef Dune::Functions::LagrangeBasis<LeafGridView,2> LBasis;
LeafGridView gridView = grid_->leafGridView();
LBasis lBasis(gridView);
typedef DuneFunctionsBasis<LBasis> FufemBasis;
FufemBasis fufemBasis(lBasis);
OperatorAssembler<FufemBasis,FufemBasis> operatorAssemblerFuFem(fufemBasis,fufemBasis);
......@@ -365,7 +367,7 @@ template <class BasisType, class VectorType>
void TrustRegionSolver<BasisType,VectorType>::solve()
{
int rank = grid_->comm().rank();
#if !HAVE_DUNE_PARMG
#if 1 //! HAVE_DUNE_PARMG
MonotoneMGStep<MatrixType,CorrectionType>* mgStep = nullptr;
// if the inner solver is a monotone multigrid set up a max-norm trust-region
......@@ -416,7 +418,7 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
*hessianMatrix_,
i==0 // assemble occupation pattern only for the first call
);
#if HAVE_DUNE_PARMG
#if 0 //HAVE_DUNE_PARMG
std::function<void(VectorType&)> accumulate = Dune::ParMG::makeAccumulate<VectorType>(*(mgSetup_->comms_.back()));
accumulate(rhs);
#endif
......@@ -440,8 +442,9 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
}
if (this->verbosity_ == Solver::FULL)
std::cout << "Assembly took " << gradientTimer.elapsed() << " sec." << std::endl;
exit(0);
#if HAVE_DUNE_PARMG
#if 0 //HAVE_DUNE_PARMG
if (!mgSetup_->overlap())
Dune::ParMG::collectDiagonal(*hessianMatrix_, *mgSetup_->comms_.back());
mgSetup_->matrix(hessianMatrix_);
......@@ -460,7 +463,7 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
//Take the obstacles on the finest grid and give them to the multigrid solver, it will create a hierarchy for all coarser grids
trustRegionObstacles = trustRegion.obstacles();
#if ! HAVE_DUNE_PARMG
#if 1 //! HAVE_DUNE_PARMG
mgStep->setProblem(stiffnessMatrix, corr, rhs);
mgStep->setObstacles(trustRegionObstacles);
......@@ -551,7 +554,7 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
std::cout << "Solving the quadratic problem took " << solutionTimer.elapsed() << " seconds." << std::endl;
#if ! HAVE_DUNE_PARMG
#if 1 //! HAVE_DUNE_PARMG
if (mgStep)
corr = mgStep->getSol();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment