[Dune] Jacobian type in dune-localfunctions

Carsten Graeser graeser at math.fu-berlin.de
Tue Mar 10 11:12:58 CET 2009


Dear Dune,
in the new dune-localfunctions module the type for the Jacobian
of the basis functions is FieldVector<FieldVector<K,m> >.
To my knowledge the benefit of FieldVector over Dune::array
is that it provides algebra. But FieldVector<K,m> is not compatible
with double as assumed by the outer FieldVector. So only part of
the algebra will work. If these methods are there they should be usable.

In my opinion there are three possible solution:
1) Stay with the current state and accept that some things don't work.
2) Use a FieldMatrix.
3) Use array<FieldVector<K,m> > instead.

While 1) is a dirty hack, 2) has the drawback that one would perhaps expect
vectors in the most common case of scalar functions. 3) does not provide any algebra.

4) A further solution would be to
*Introduce a class encapsulating the pure scalar types (e.g. Scalar<double>).
 This provides the closure for the nested istl hierarchy.
*Change FieldVector such that it can be used with other static vectors as
 field type and is not the closure itself.

If extended to matrices this would for example also allows static size block
diagonal matrices by nesting FieldMatrix, DiagonalMatrix, ScaledIdentityMatrix.
The drawback is that this is a truly major change which will result in type
changes in a large amount of Dune classe (e.g. the grids). This could be
smoothed by introducing new types (e.g, FullVector<> for FullMatrix<>).

In order to have a clean interface I suggest to use 2) or 3). 4) would perhaps
be a nice long term solution. But is basically solves other problems.

Best Regards
Carsten

-- 
----------------------------------------------------------------------
Carsten Gräser           | phone: +49-30 / 838-75349
Freie Universität Berlin | fax  : +49-30 / 838-54977
Institut für Mathematik  | email: graeser at math.fu-berlin.de
Arnimallee 6             |
14195 Berlin, Germany    | URL  : http://page.mi.fu-berlin.de/graeser
----------------------------------------------------------------------




More information about the Dune mailing list