Skip to content
Snippets Groups Projects
Commit 45c36722 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

added patches for dune-istl 2.2.1 and dune-pdelab 1.1.0, adapted the README and the CHANGELOG

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10364 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4c7ae342
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,7 @@ Differences Between DuMuX 2.2 and DuMuX 2.3
implicit and the decoupled models, see test_*1pwithamg in
test/implicit/1p and test_impeswithamg in test/decoupled/2p.
DUNE-PDELab and possibly DUNE-ISTL have to be patched, see the file
README in the patches directory. Furthermore, the preprocessor
variable USE_AMGBACKEND has to be defined, see the corresponding
Makefile.ams.
README in the patches directory.
- The decoupled models have been parallelized, see test_impeswithamg in
test/decoupled/2p. They work in parallel only if the AMGBackend is used
......@@ -103,11 +101,6 @@ Differences Between DuMuX 2.2 and DuMuX 2.3
not print any warning if a deprecated property name is used.
- CompositionFromFugacitiesSolver has been renamed to Constraintsolver.
* Deprecated CONSTANTS/ENUMS, to be removed after 2.3: BEWARE: The compiler will
not print any warning if a deprecated constant/enum is used.
* Deprecated MEMBER FUNCTIONS, to be removed after 2.3:
* Deprecated public MEMBER VARIABLES, to be removed after 2.3: BEWARE: The
compiler will not print any warning if a deprecated public member variable
is used.
......
- In order to use the AMGBackend, you have to apply the patch
pdelab-1.0.1.patch in your directory containing DUNE-PDELab 1.0.1, e.g.:
pdelab-1.0.1.patch / pdelab-1.1.0.patch in your directory containing
DUNE-PDELab 1.0.1 / 1.1.0, e.g.:
patch -p0 <../dumux/patches/pdelab-1.0.1.patch
- If the AMGBackend should be used without SuperLU as coarse grid solver, it can
be benefitial to decrease the corresponding tolerance. To do so, apply the
patch istl-2.2.0.patch in your directory containing DUNE-ISTL 2.2, e.g.:
patch istl-2.2.0.patch / istl-2.2.1.patch in your directory containing
DUNE-ISTL 2.2.0 / 2.2.1, e.g.:
patch -p0 <../dumux/patches/istl-2.2.0.patch
Index: dune/istl/paamg/amg.hh
===================================================================
--- dune/istl/paamg/amg.hh (revision 1705)
+++ dune/istl/paamg/amg.hh (working copy)
@@ -504,13 +504,13 @@
// We are still participating on this level
solver_ = new BiCGSTABSolver<X>(const_cast<M&>(matrices_->matrices().coarsest().getRedistributed()),
*scalarProduct_,
- *coarseSmoother_, 1E-2, 10000, 0);
+ *coarseSmoother_, 1E-12, 10000, 0);
else
solver_ = 0;
}else
solver_ = new BiCGSTABSolver<X>(const_cast<M&>(*matrices_->matrices().coarsest()),
*scalarProduct_,
- *coarseSmoother_, 1E-2, 1000, 0);
+ *coarseSmoother_, 1E-12, 1000, 0);
}
}
}
Index: dune/pdelab/backend/istlvectorbackend.hh
===================================================================
--- dune/pdelab/backend/istlvectorbackend.hh (revision 2292)
+++ dune/pdelab/backend/istlvectorbackend.hh (working copy)
@@ -3,6 +3,10 @@
#ifndef DUNE_ISTLVECTORBACKEND_HH
#define DUNE_ISTLVECTORBACKEND_HH
+// Needed to detect in Dumux whether PDELab is patched.
+// TODO: this should be replaced by a proper configure test.
+#define DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
+
#include<vector>
#include<dune/common/fvector.hh>
@@ -30,6 +34,8 @@
typedef typename ContainerType::size_type size_type;
typedef ISTLVectorBackend<BLOCKSIZE> Backend;
+ ISTLBlockVectorContainer ()
+ {}
ISTLBlockVectorContainer (const T& t_) : container(t_.globalSize()/BLOCKSIZE)
{}
ISTLBlockVectorContainer (const T& t_, const E& e) : container(t_.globalSize()/BLOCKSIZE)
@@ -89,6 +95,11 @@
return container.two_norm();
}
+ typename Dune::template FieldTraits<E>::real_type two_norm2() const
+ {
+ return container.two_norm2();
+ }
+
typename Dune::template FieldTraits<E>::real_type one_norm() const
{
return container.one_norm();
@@ -163,6 +174,16 @@
return container.size()*BLOCKSIZE;
}
+ size_t size() const
+ {
+ return container.size();
+ }
+
+ void resize(size_t n)
+ {
+ container.resize(n);
+ }
+
template<typename X>
void std_copy_to (std::vector<X>& x) const
{
Index: dune/pdelab/backend/novlpistlsolverbackend.hh
===================================================================
--- dune/pdelab/backend/novlpistlsolverbackend.hh (revision 2292)
+++ dune/pdelab/backend/novlpistlsolverbackend.hh (working copy)
@@ -1251,7 +1251,7 @@
int verbose_=1, bool reuse_=false,
bool usesuperlu_=true)
: gfs(gfs_), phelper(gfs,verbose_), maxiter(maxiter_),
- params(15,2000,1.2,1.6,Dune::Amg::atOnceAccu),
+ params(15,2000,1.2,1.6,Dune::Amg::noAccu/*Dune::Amg::atOnceAccu*/),
verbose(verbose_), reuse(reuse_), firstapply(true),
usesuperlu(usesuperlu_)
{
@@ -1314,10 +1314,10 @@
\param[in] r right hand side
\param[in] reduction to be achieved
*/
- void apply(M& A, V& z, V& r, typename V::ElementType reduction)
+ void apply(MatrixType& A, V& z, V& r, typename V::ElementType reduction)
{
Timer watch;
- MatrixType& mat=A.base();
+ MatrixType& mat=A;
typedef Dune::Amg::CoarsenCriterion<Dune::Amg::SymmetricCriterion<MatrixType,
Dune::Amg::FirstDiagonal> > Criterion;
#if HAVE_MPI
Index: dune/pdelab/backend/ovlpistlsolverbackend.hh
===================================================================
--- dune/pdelab/backend/ovlpistlsolverbackend.hh (revision 2292)
+++ dune/pdelab/backend/ovlpistlsolverbackend.hh (working copy)
@@ -803,7 +803,7 @@
ISTLBackend_AMG(const GFS& gfs_, unsigned maxiter_=5000,
int verbose_=1, bool reuse_=false,
bool usesuperlu_=true)
- : gfs(gfs_), phelper(gfs,verbose_), maxiter(maxiter_), params(15,2000),
+ : gfs(gfs_), phelper(gfs,verbose_), maxiter(maxiter_), params(15,2000,1.2,1.6,Dune::Amg::atOnceAccu),
verbose(verbose_), reuse(reuse_), firstapply(true),
usesuperlu(usesuperlu_)
{
@@ -864,11 +864,12 @@
\param[in] r right hand side
\param[in] reduction to be achieved
*/
- void apply(M& A, V& z, V& r, typename V::ElementType reduction)
+ template <class Vector>
+ void apply(MatrixType& A, Vector& z, Vector& r, typename V::ElementType reduction)
{
Timer watch;
Comm oocc(gfs.gridView().comm());
- MatrixType& mat=A.base();
+ MatrixType& mat=A;
typedef Dune::Amg::CoarsenCriterion<Dune::Amg::SymmetricCriterion<MatrixType,
Dune::Amg::FirstDiagonal> > Criterion;
#if HAVE_MPI
@@ -900,8 +901,7 @@
Solver<VectorType> solver(oop,sp,*amg,reduction,maxiter,verb);
Dune::InverseOperatorResult stat;
- solver.apply(BlockProcessor<GFS,skipBlocksizeCheck>::getVector(z),
- BlockProcessor<GFS,skipBlocksizeCheck>::getVector(r),stat);
+ solver.apply(z,r,stat);
stats.tsolve= watch.elapsed();
res.converged = stat.converged;
res.iterations = stat.iterations;
Index: dune/pdelab/backend/seqistlsolverbackend.hh
===================================================================
--- dune/pdelab/backend/seqistlsolverbackend.hh (revision 2292)
+++ dune/pdelab/backend/seqistlsolverbackend.hh (working copy)
@@ -543,10 +543,10 @@
\param[in] r right hand side
\param[in] reduction to be achieved
*/
- void apply(M& A, V& z, V& r, typename V::ElementType reduction)
+ void apply(MatrixType& A, V& z, V& r, typename V::ElementType reduction)
{
Timer watch;
- MatrixType& mat=A.base();
+ MatrixType& mat=A;
typedef Dune::Amg::CoarsenCriterion<Dune::Amg::SymmetricCriterion<MatrixType,
Dune::Amg::FirstDiagonal> > Criterion;
SmootherArgs smootherArgs;
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