Skip to content

#522 Jacobian type is FieldVector< FieldVector< K,m> >

Metadata

Property Value
Reported by Carsten Gräser (graeser@math.fu-berlin.de)
Reported at Mar 18, 2009 14:40
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Carsten Gräser (graeser@math.fu-berlin.de)
Last edited at Jan 16, 2010 20:38
Closed by Carsten Gräser (graeser@math.fu-berlin.de)
Closed at Jan 16, 2010 20:38
Closed in version 2.0
Resolution Implemented
Comment Please test with your app !

Description

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.

  1. A further solution would be to *Introduce a class encapsulating the pure scalar types (e.g. Scalar). 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.