FS#240 Geometries and Jacobians
Metadata
Property | Value |
---|---|
Project | dumux |
Category | General |
Reported by | Bernd Flemisch (bernd@iws.uni-stuttgart.de) |
Reported at | Oct 16, 2014 14:48 |
Type | Bug Report |
Version | Git |
Last edited by | Bernd Flemisch (bernd@iws.uni-stuttgart.de) |
Last edited at | Aug 24, 2015 07:33 |
Closed by | Bernd Flemisch (bernd@iws.uni-stuttgart.de) |
Closed at | Aug 24, 2015 07:33 |
Closed in version | 2.8 |
Resolution | Fixed |
Description
The issue emerged when compiling test/decoupled/1p/test_1p with optimization options >=O1. In this case the call const JacobianTransposed& jacobianT = eIt->geometry().jacobianTransposed(localPos); in fvvelocity1p.hh resulted in an all-zero matrix. We can find a partial explanation by J in Dune's FS#1174:
"If geometry() returns a copy and jacobianInverseTransposed() returns a reference, then saying
const Jacobian &jac = (*it).geometry().jacobianInverseTransposed(quad(i));
will actually most likely be wrong. Your either have to do
const Geometry &geo = (*it).geometry(); const Jacobian &jac = geo.jacobianInverseTransposed(quad(i));
or
Jacobian jac = (*it).geometry().jacobianInverseTransposed(quad(i));"
The discussion resulted in returning the Jacobians by copy. Unfortunately, this did not find its way into Dune 2.3.
We should look for other occurrences and fix them as soon as possible.