Commit a1ad2cb0 authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

[multidomain] Make it work for me, improve documentation.

Improve documentation on how to use the multidomain stuff.
Add patch to make it work without further touching the code.
(reviewed by fetzer, approved by martins)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12666 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent cf6f6a14
......@@ -5,13 +5,18 @@ Differences Between DuMuX 2.4 and DuMuX 2.5
* IMPROVEMENTS and ENHANCEMENTS:
- The three-dimensional implementation of the MPFA L-method is made
available for the decoupled compositional 2p2c models. It also allows
available for the decoupled compositional 2p2c models. It also allows
for simulation on an adaptive grid.
- The coupling of 2c2p with Stokes2c and 2c2pNI with Stokes2cNI was
added. Be aware of the harsh version restrictions mentioned in
dumux/test/modelcoupling/README .
* IMMEDIATE INTERFACE CHANGES not allowing/requiring a deprecation period:
- Dropped support for PDELab 1.0.1, PDELab 1.1 is required.
* Deprecated CLASSES/FILES, to be removed after 2.5:
- Stokes2cModel was replaced by StokesNCModel, similar for more
Stokes2c* classes.
* Deprecated PROPERTY NAMES, to be removed after 2.5: BEWARE: The compiler will
not print any warning if a deprecated property name is used.
......
Index: dumux/io/interfacemeshcreator.hh
===================================================================
--- dumux/io/interfacemeshcreator.hh (revision 12659)
+++ dumux/io/interfacemeshcreator.hh (working copy)
@@ -29,11 +29,8 @@
typedef typename HelperGridView::Traits::template Codim<0>::Entity HelperElement;
typedef typename HelperElement::Geometry HelperGeometry;
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
- HelperElementIterator helperElementIterator = helperGrid.leafGridView().template begin<0>();
-#else
HelperElementIterator helperElementIterator = helperGrid.leafView().template begin<0>();
-#endif
+
const HelperElement& helperElement = *helperElementIterator;
const HelperGeometry& helperGeometry = helperElement.geometry();
#!/bin/sh
# First create and enter a folder for the dune and dumux modules
# If desired, you can enter this folder and execute this script for a DUNE and DUMUX installation.
# For that purpose, you can comment/uncomment required lines below,
# currently only the DUNE modules are checked out.
# Following dune components should be available in the described versions:
# dune-multidomain (master branch):
git clone git://gitorious.org/dune-multidomain/dune-multidomain.git
cd dune-multidomain
git checkout deac3cecfc6697c1f5316d55c0fadd74f51d92bc
cd ..
# dune-multidomaingrid (master branch):
git clone git://gitorious.org/dune-multidomaingrid/dune-multidomaingrid.git
cd dune-multidomaingrid
git checkout 30ff14d6b49c8adabf9e5cec67f20fcb3270a77e
cd ..
# dune-pdelab (master branch):
git clone http://git.dune-project.org/repositories/dune-pdelab
cd dune-pdelab
git checkout 1de21a0859e10914ba5c3b70f67c5517573ac70e
cd ..
# tested DUNE modules:
svn checkout -r 7436 https://svn.dune-project.org/svn/dune-common/trunk dune-common
svn checkout -r 489 https://svn.dune-project.org/svn/dune-geometry/trunk dune-geometry
svn checkout -r 8930 https://svn.dune-project.org/svn/dune-grid/trunk dune-grid
svn checkout -r 1910 https://svn.dune-project.org/svn/dune-istl/trunk dune-istl
svn checkout -r 1206 https://svn.dune-project.org/svn/dune-localfunctions/trunk dune-localfunctions
# DUMUX
#ssh-add
# for an external installation, use
# svn co --username=anonymous --password=’ ’ svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk dumux
#svn checkout svn+ssh://luftig/home/svn/DUMUX/dumux/trunk dumux-stable
#svn checkout svn+ssh://luftig/home/svn/DUMUX/dune-mux/trunk dumux-devel
#svn checkout svn+ssh://luftig/home/svn/DUMUX/external/trunk external
# patch m4 folder in dumux-stable for compatibility with the DUNE modules above
#patch -p0 < patches/dumux-m4.patch
# install the external modules: UG and SuperLU or PARDISO are required
#cd external
#./installExternal.sh ug
#./installExternal.sh blas
#./installExternal.sh superlu
#cd ..
# dune-pdelab/dune/pdelab/backend/istlvectorbackend.hh has to be replaced by the one in the subfolder additionalfiles
cp dumux-stable/test/multidomain/2cnistokes2p2cni/additionalfiles/istlvectorbackend.hh dune-pdelab/dune/pdelab/backend/
# in dumux/freeflow/new_stokes/stokeslocalresidual:
# if the pressure is set on the entire right boundary, the interpolation at the lower right corner has to be switched off;
# therefore, comment in interpolateCornerPoints the local vertex 1 (lower right corner of Stokes domain);
# run dunecontrol
# ./dune-common/bin/dunecontrol PATH_TO_OPTS all
# the problem hardly converges with BiCGSTAB; use a direct solver like SuperLU or PARDISO
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ISTLVECTORBACKEND_HH
#define DUNE_ISTLVECTORBACKEND_HH
#include<vector>
#include<dune/common/fvector.hh>
#include<dune/istl/bvector.hh>
#include "backendselector.hh"
#include "istlmatrixbackend.hh"
namespace Dune {
namespace PDELab {
template<int> class ISTLVectorBackend;
template<typename T, typename E, int BLOCKSIZE>
class ISTLBlockVectorContainer
{
public:
typedef E ElementType;
typedef Dune::BlockVector< Dune::FieldVector<E,BLOCKSIZE> > ContainerType;
typedef ContainerType BaseT;
typedef typename ContainerType::field_type field_type;
typedef typename ContainerType::iterator iterator;
typedef typename ContainerType::const_iterator const_iterator;
typedef typename ContainerType::const_iterator ConstIterator;
typedef typename ContainerType::block_type block_type;
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)
{
container=e;
}
size_type N() const
{
return container.N();
}
ISTLBlockVectorContainer& operator= (const E& e)
{
container=e;
return *this;
}
ISTLBlockVectorContainer& operator*= (const E& e)
{
container*=e;
return *this;
}
ISTLBlockVectorContainer& operator+= (const E& e)
{
container+=e;
return *this;
}
ISTLBlockVectorContainer& operator+= (const ISTLBlockVectorContainer& e)
{
container+=e;
return *this;
}
ISTLBlockVectorContainer& operator-= (const ISTLBlockVectorContainer& e)
{
container-=e;
return *this;
}
block_type& operator[](std::size_t i)
{
return container[i];
}
const block_type& operator[](std::size_t i) const
{
return container[i];
}
E two_norm() const
{
return container.two_norm();
}
E two_norm2() const
{
return container.two_norm2();
}
E one_norm() const
{
return container.one_norm();
}
E infinity_norm() const
{
return container.infinity_norm();
}
E operator*(const ISTLBlockVectorContainer& y) const
{
return container*y.base();
}
E dot(const ISTLBlockVectorContainer& y) const
{
return container.dot(y.base());
}
ISTLBlockVectorContainer& axpy(const E& a, const ISTLBlockVectorContainer& y)
{
container.axpy(a, y);
return *this;
}
// for debugging and AMG access
ContainerType& base ()
{
return container;
}
const ContainerType& base () const
{
return container;
}
operator ContainerType&()
{
return container;
}
operator const ContainerType&() const
{
return container;
}
iterator begin()
{
return container.begin();
}
const_iterator begin() const
{
return container.begin();
}
iterator end()
{
return container.end();
}
const_iterator end() const
{
return container.end();
}
size_t flatsize() const
{
return container.size()*BLOCKSIZE;
}
size_t dim() const
{
return container.dim();
}
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
{
size_t n = flatsize();
x.resize(n);
for (size_t i=0; i<n; i++)
x[i] = container[i/BLOCKSIZE][i%BLOCKSIZE];
}
template<typename X>
void std_copy_from (const std::vector<X>& x)
{
//test if x has the same size as the container
assert (x.size() == flatsize());
for (size_t i=0; i<flatsize(); i++)
container[i/BLOCKSIZE][i%BLOCKSIZE] = x[i];
}
private:
Dune::BlockVector< Dune::FieldVector<E,BLOCKSIZE> > container;
};
//! ISTL backend for FunctionSpace
template<int BLOCKSIZE=1>
class ISTLVectorBackend
{
public:
enum{
//! \brief export the block size
BlockSize = BLOCKSIZE
};
//export Matrix Backend Type
typedef ISTLBCRSMatrixBackend<BLOCKSIZE,BLOCKSIZE> MatrixBackend;
//! container construction
// extract type of container element
template<class C>
struct Value
{
typedef typename C::field_type Type;
};
//! The size type
typedef typename Dune::BlockVector< Dune::FieldVector<float,BLOCKSIZE> >::size_type size_type;
// get const_reference to container element
// note: this method does not depend on T!
template<typename C>
static const typename C::field_type& access (const C& c, size_type i)
{
return c.base()[i/BLOCKSIZE][i%BLOCKSIZE];
}
// get non const_reference to container element
// note: this method does not depend on T!
template<typename C>
static typename C::field_type& access (C& c, size_type i)
{
return c.base()[i/BLOCKSIZE][i%BLOCKSIZE];
}
};
template<int BLOCKSIZE,typename T, typename E>
struct BackendVectorSelectorHelper<ISTLVectorBackend<BLOCKSIZE>, T, E>
{
typedef ISTLBlockVectorContainer<T,E,BLOCKSIZE> Type;
};
} // namespace PDELab
} // namespace Dune
#endif
#!/bin/sh
# First create and enter a folder for the dune and dumux modules
# If desired, you can enter this folder and execute this script for a DUNE and DUMUX installation.
# For that purpose, you can comment/uncomment required lines below,
# currently only the DUNE modules are checked out.
# Following dune components should be available in the described versions:
# dune-multidomain (master branch):
git clone git://gitorious.org/dune-multidomain/dune-multidomain.git
cd dune-multidomain
git checkout deac3cecfc6697c1f5316d55c0fadd74f51d92bc
cd ..
# dune-multidomaingrid (master branch):
git clone git://gitorious.org/dune-multidomaingrid/dune-multidomaingrid.git
cd dune-multidomaingrid
git checkout 30ff14d6b49c8adabf9e5cec67f20fcb3270a77e
cd ..
# dune-pdelab (master branch):
git clone http://git.dune-project.org/repositories/dune-pdelab
cd dune-pdelab
git checkout 1de21a0859e10914ba5c3b70f67c5517573ac70e
cd ..
# tested DUNE modules:
svn checkout -r 7436 https://svn.dune-project.org/svn/dune-common/trunk dune-common
svn checkout -r 489 https://svn.dune-project.org/svn/dune-geometry/trunk dune-geometry
svn checkout -r 8930 https://svn.dune-project.org/svn/dune-grid/trunk dune-grid
svn checkout -r 1910 https://svn.dune-project.org/svn/dune-istl/trunk dune-istl
svn checkout -r 1206 https://svn.dune-project.org/svn/dune-localfunctions/trunk dune-localfunctions
# DUMUX
#ssh-add
# for an external installation, use
# svn co --username=anonymous --password=’ ’ svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk dumux
#svn checkout svn+ssh://luftig/home/svn/DUMUX/dumux/trunk dumux-stable
#svn checkout svn+ssh://luftig/home/svn/DUMUX/dune-mux/trunk dumux-devel
#svn checkout svn+ssh://luftig/home/svn/DUMUX/external/trunk external
# patch m4 folder in dumux-stable for compatibility with the DUNE modules above
#patch -p0 < patches/dumux-m4.patch
# install the external modules: UG and SuperLU or PARDISO are required
#cd external
#./installExternal.sh ug
#./installExternal.sh blas
#./installExternal.sh superlu
#cd ..
# dune-pdelab/dune/pdelab/backend/istlvectorbackend.hh has to be replaced by the one in the subfolder additionalfiles
cp dumux-stable/test/multidomain/2cnistokes2p2cni/additionalfiles/istlvectorbackend.hh dune-pdelab/dune/pdelab/backend/
# in dumux/freeflow/new_stokes/stokeslocalresidual:
# if the pressure is set on the entire right boundary, the interpolation at the lower right corner has to be switched off;
# therefore, comment in interpolateCornerPoints the local vertex 1 (lower right corner of Stokes domain);
# run dunecontrol
# ./dune-common/bin/dunecontrol PATH_TO_OPTS all
# the problem hardly converges with BiCGSTAB; use a direct solver like SuperLU or PARDISO
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ISTLVECTORBACKEND_HH
#define DUNE_ISTLVECTORBACKEND_HH
#include<vector>
#include<dune/common/fvector.hh>
#include<dune/istl/bvector.hh>
#include "backendselector.hh"
#include "istlmatrixbackend.hh"
namespace Dune {
namespace PDELab {
template<int> class ISTLVectorBackend;
template<typename T, typename E, int BLOCKSIZE>
class ISTLBlockVectorContainer
{
public:
typedef E ElementType;
typedef Dune::BlockVector< Dune::FieldVector<E,BLOCKSIZE> > ContainerType;
typedef ContainerType BaseT;
typedef typename ContainerType::field_type field_type;
typedef typename ContainerType::iterator iterator;
typedef typename ContainerType::const_iterator const_iterator;
typedef typename ContainerType::const_iterator ConstIterator;
typedef typename ContainerType::block_type block_type;
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)
{
container=e;
}
size_type N() const
{
return container.N();
}
ISTLBlockVectorContainer& operator= (const E& e)
{
container=e;
return *this;
}
ISTLBlockVectorContainer& operator*= (const E& e)
{
container*=e;
return *this;
}
ISTLBlockVectorContainer& operator+= (const E& e)
{
container+=e;
return *this;
}
ISTLBlockVectorContainer& operator+= (const ISTLBlockVectorContainer& e)
{
container+=e;
return *this;
}
ISTLBlockVectorContainer& operator-= (const ISTLBlockVectorContainer& e)
{
container-=e;
return *this;
}
block_type& operator[](std::size_t i)
{
return container[i];
}
const block_type& operator[](std::size_t i) const
{
return container[i];
}
E two_norm() const
{
return container.two_norm();
}
E two_norm2() const
{
return container.two_norm2();
}
E one_norm() const
{
return container.one_norm();
}
E infinity_norm() const
{
return container.infinity_norm();
}
E operator*(const ISTLBlockVectorContainer& y) const
{
return container*y.base();
}
E dot(const ISTLBlockVectorContainer& y) const
{
return container.dot(y.base());
}
ISTLBlockVectorContainer& axpy(const E& a, const ISTLBlockVectorContainer& y)
{
container.axpy(a, y);
return *this;
}
// for debugging and AMG access
ContainerType& base ()
{
return container;
}
const ContainerType& base () const
{
return container;
}
operator ContainerType&()
{
return container;
}
operator const ContainerType&() const
{
return container;
}
iterator begin()
{
return container.begin();
}
const_iterator begin() const
{
return container.begin();
}
iterator end()
{
return container.end();
}
const_iterator end() const
{
return container.end();