[Dune-devel] [Dune-Commit] [Commit] dune-common - 64df627: Implement read-only IdentityMatrix
Christoph_Gersbacher
gersbach at mathematik.uni-freiburg.de
Tue Dec 3 12:55:20 CET 2013
Hi Oliver,
> I am using
>
> FieldMatrix< double, 2, 2 > Id = ScaledIdentityMatrix< double, 2 >(1);
>
> for that. That works just as well.
That is indeed true. The ScaledIdentityMatrix correctly implements the
method istl_to_fmatrix(), something other users have struggled with.
IdentityMatrix only provides the standard C++ cast operator, which is
more convenient and which was part of our discussion concerning the
"const dense matrix" interface. You are right, I did add IdentityMatrix
for documenting this new behavior.
>> Then, IdentityMatrix may be used as the return type of the methods jacobianTransposed() and jacobianInverseTransposed(); for some grids, the LocalGeometry's jacobians reduce to an identity matrix.
> When would that happen? If LocalGeometry's jacobian is the identity that means that codim<0> entities are copies
> of their fathers. And since the JacobianType is static _all_ entities would be copies of their fathers.
> What would I need such a grid for?
My bad, it is indeed somewhat more special. In PrismGrid, the upper and
lower intersections of a grid element are images of the
lower-dimensional host element after a translation. Lateral and
horizontal intersections have individual geometry implementations, and I
use dynamic polymorphism for choosing the correct local geometry
implementation in the methods geometryInInside(), geometryInOutside().
Only for horizontal intersections the jacobians are the identity. I
understand this is a very obscure example...
Cheers,
Christoph
--
Christoph Gersbacher<christoph.gersbacher at mathematik.uni-freiburg.de>
<mailto:christoph.gersbacher at mathematik.uni-freiburg.de>
Abteilung für Angewandte Mathematik
Albert-Ludwigs-Universität Freiburg
Hermann-Herder-Str. 10
D-79104 Freiburg im Breisgau
Tel.: +49 (0)761 / 203 5645
Fax: +49 (0)761 / 203 5632
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20131203/56d52d95/attachment.htm>
More information about the Dune-devel
mailing list