Skip to content
Snippets Groups Projects
Commit 48cb5230 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

WIP: TR solver should not construct basis objects

The basis given from the outside may have state.  Therefore,
we may not construct additional basis objects in the solver
itself.  Even if they have the correct type, they may have
the wrong state.

I noticed this when toying around with a basis for a periodic
finite element space.
parent 31cb5912
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ setup(const typename BasisType::GridView::Grid& grid,
std::conditional_t< // do we have a dune-functions basis? -> choose right assembler type
Dune::models<Dune::Functions::Concept::GlobalBasis<GridView>, BasisType>(),
BasisType,
DuneFunctionsBasis<BasisType> > basis(feBasis);
DuneFunctionsBasis<BasisType> > basis(assembler_.basis);
innerMultigridStep_ = std::make_unique<Dune::ParMG::Multigrid<VectorType> >();
innerMultigridStep_->mu_ = mu;
......@@ -85,6 +85,8 @@ setup(const typename BasisType::GridView::Grid& grid,
if (grid.comm().rank()==0)
std::cout << "Parallel multigrid setup took " << setupTimer.stop() << " seconds." << std::endl;
#else
DuneFunctionsBasis<BasisType> basis(assembler_->basis_);
std::cout << "NO PARMG: basis.size: " << basis.size() << std::endl;
std::conditional_t< // do we have a dune-functions basis?
Dune::models<Dune::Functions::Concept::GlobalBasis<GridView>, BasisType>(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment