Skip to content
Snippets Groups Projects
Commit ff42b7bf authored by graeser's avatar graeser
Browse files

Update

parent ecaab53c
Branches
No related tags found
No related merge requests found
......@@ -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
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment