diff --git a/dune.module b/dune.module index 2d6a4c28d8401260e3d68a6e774783ffb04c4a78..638b842736df835560ef9cbf8f61708109b337d6 100644 --- a/dune.module +++ b/dune.module @@ -4,7 +4,7 @@ #Name of the module Module: dune-fu-tutorial -Version: 0.1 +Version: 1.0 Maintainer: graeser@mi.fu-berlin.de #depending on Depends: dune-common dune-geometry dune-grid dune-localfunctions dune-istl dune-typetree dune-functions dune-uggrid diff --git a/src/05-poisson-problem.cc b/src/05-poisson-problem.cc index 519f95a6041e4812695c65017bf8326c29d70295..f15f3260c3bc4642d2c7584adce37c7a5da18c99 100644 --- a/src/05-poisson-problem.cc +++ b/src/05-poisson-problem.cc @@ -100,7 +100,8 @@ int main(int argc, char** argv) }; assemblePoissonProblemPQ1(gridView, A, rhs, rhsFunction); - x.resize(rhs.size(), 0); + x.resize(rhs.size()); + x = 0; std::vector<bool> isBoundary; isBoundary.resize(rhs.size(), false); @@ -118,8 +119,7 @@ int main(int argc, char** argv) } Dune::MatrixAdapter<Matrix,Vector,Vector> op(A); - Dune::SeqILU0<Matrix,Vector,Vector> ilu0(A,1.0); - Dune::SeqSSOR<Matrix,Vector,Vector> preconditioner(A,1,1.0); + Dune::SeqILDL<Matrix,Vector,Vector> preconditioner(A,1.0); Dune::CGSolver<Vector> cg(op, preconditioner, // preconditione 1e-4, // desired residual reduction factor diff --git a/src/06-interpolation.cc b/src/06-interpolation.cc index 6cd7cce14122e0c28d4953cfd5cdc29373b0c05e..86f9dc9584869396ef5ab5cdd5357d8b5723d348 100644 --- a/src/06-interpolation.cc +++ b/src/06-interpolation.cc @@ -38,9 +38,6 @@ // included dune-localfunctions headers #include <dune/localfunctions/lagrange/pqkfactory.hh> -// included dune-functions headers -#include <dune/functions/common/functionfromcallable.hh> - // included dune-fu-tutorial headers #include <dune/fu-tutorial/referenceelementutility.hh> @@ -79,11 +76,7 @@ void interpolateFunction(const GridView& gridView, Vector& v, const F& f) std::vector<Range> localV; -// localFiniteElement.localInterpolation().interpolate(localF, localV); - - using FunctionFromCallable = typename Dune::Functions::FunctionFromCallable<Range(LocalDomain), decltype(localF)>; - auto localFWithEvaluate = FunctionFromCallable(localF); - localFiniteElement.localInterpolation().interpolate(localFWithEvaluate, localV); + localFiniteElement.localInterpolation().interpolate(localF, localV); for(std::size_t i=0; i<localSize; ++i) { @@ -148,7 +141,8 @@ int main(int argc, char** argv) }; assemblePoissonProblemPQ1(gridView, A, rhs, rhsFunction); - x.resize(rhs.size(), 0); + x.resize(rhs.size()); + x = 0; auto dirichletFunction = [](auto x) { return sin(x[0] * 2.0*M_PI)*.1; @@ -171,8 +165,7 @@ int main(int argc, char** argv) } Dune::MatrixAdapter<Matrix,Vector,Vector> op(A); - Dune::SeqILU0<Matrix,Vector,Vector> ilu0(A,1.0); - Dune::SeqSSOR<Matrix,Vector,Vector> preconditioner(A,1,1.0); + Dune::SeqILDL<Matrix,Vector,Vector> preconditioner(A,1.0); Dune::CGSolver<Vector> cg(op, preconditioner, // preconditione 1e-4, // desired residual reduction factor