[dune-functions] New example for Taylor-Hood elements
Carsten Gräser
graeser at mi.fu-berlin.de
Fri Apr 3 22:58:58 CEST 2015
Hi Oliver,
Am 02.04.2015 um 14:28 schrieb Oliver Sander:
> Hi guys,
>
> I just added a second example file to our /examples directory. This one is intended
> to show how function space bases with non-trivial tree are used. The code discretizes
> the Stokes equation with a Taylor-Hood basis. The setting is the well-known driven-
> cavity problem: a unit square, no source term, homogeneneous Dirichlet boundary
> conditions on three sides of the square, constant (non-zero) Dirichlet bc on the forth side.
>
> Have a look at the example if you find the time. If you think that I did anything in
> a suboptimal way feel free to push patches.
in the local assembler you compute the local matrix indices manually.
I would say that one should use localIndex() here. Unfortunately this
will not work with the current implementation because the localIndex()
method of the PQk basis is hard wired assuming that leaf==root.
In principle one could solve this by storing the indices in the leaf
node. Then one could overwrite them if leaf!=root. Since we need this
in any basis, we should have something like setLocalIndex() in
GridFunctionSpaceBasisLeafNodeInterface.
But there's a problem: If we use the node as leaf in a nontrivial
tree, like Taylor-Hood does, this may lead to inconsistencies: We
manipulate the local indices manually but still expect the LocalIndexSet
to behave as it did before. I'm not sure if this is a good idea.
We could solve this problem by requiring that LocalIndexSet does not
use the localIndex() method of the nodes.
Best,
Carsten
>
> Unfortunately, when writing the example I found several situations where we are still
> lacking infrastructure:
>
> - Apparently there is no solver for such a problem in dune-istl. I'd volunteer to add
> such a solver, but I am unsure exactly what type of solver to implement. A preconditioned
> Uzawa? Please advice.
> - While the TaylorHoodBasis class is sufficient to assemble the algebraic problem,
> it is not sufficient for pre- and post-processing. How do you get the velocity
> part of a solution into a vtk file? Currently, the code instantiates a separate
> PQ2NodalBasis object for this, but what we really want is something like 'view objects'
> on given bases, that allow to extract subtrees and the corresponding coefficients.
> - Same for interpolation: To find the Dirichlet dofs I need to interpolate the identity
> function on the velocity basis. This is currently not possible.
>
> Finally, there are some issues regarding the linear algebra.
>
> - The matrix data structure is now Matrix<BCRSMatrix<FieldMatrix<double,1,1> > >.
> This still ignores quite a bit of structure of the occupation pattern. This is
> unfortunate, because we claim that dune-functions and in particular dune-istl
> is all about using this structure.
> - The type for coefficient vectors is FieldVector<BlockVector<FieldVector> >.
> Strictly speaking this is against the rules, as FieldVectors are supposed
> to end recursion.
>
> Cheers,
> Oliver
>
>
>
> _______________________________________________
> dune-functions mailing list
> dune-functions at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-functions
>
--
Prof. Dr. Carsten Gräser
Freie Universität Berlin
Institut für Mathematik
Arnimallee 6
14195 Berlin, Germany
phone: +49 30 838 75399
fax : +49 30 838 54977
email: graeser at mi.fu-berlin.de
URL : http://page.mi.fu-berlin.de/graeser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-functions/attachments/20150403/abecc4b0/attachment.sig>
More information about the dune-functions
mailing list