[Dune] [Dune-Commit] dune-grid r7281 - trunk/dune/grid/genericgeometry
Jö Fahlke
jorrit at jorrit.de
Tue Dec 28 22:32:52 CET 2010
Am Mon, 27. Dec 2010, 23:35:59 +0100 schrieb Martin Nolte:
> I'm not sure this typedef is an improvement. The actual type of
> JacobianInverseTransposed is not a FieldMatrix, but a special purpose type that
> seamlessly converts into a FieldMatrix and provides a special implementation of
> the method det.
>
> So, if you want to export the type of the Jacobian, you might want to export a
> FieldMatrix. Maybe what you really want is to add the type
> JacobianInverseTransposed in dune-grid/common/geomtry.hh.
That would also be OK, as long as both Dune::Geometry and BasicGeometry
provide the same member type names. I chose to add it to BasicGeometry
because
* Compared to Dune::Geometry, BasicGeometry more of a utility class and less
of an interface class, so changes here are less intrusive.
* BasicGeometry is less likely to be used directly by user code.
* The name Jacobian is shorter than JacobianInverseTransposed.
I didn't expect the jacobian types not to be field matrices. While the proxy
type is convertible into a field matrix, this could still be problematic. In
fact, that would explain why things like FielMatrix::rightmultiplyany() didn't
work with the proxy type as argument.
I guess instead of using BasicGeometry directly, I'll better wrap it in a
MockGeometry or similar instead. This can be a utility class in dune-grid,
and can provide everything a Dune::Geometry has except for the grid-related
stuff.
> On the other hand I don't see why the BasicGeometry is ever used without being
> wrapped into a Dune::Geometry.
In this instance, I needed it to to have simple geometries so I could write
tests for global-valued finite elements. I didn't want to setup a
full-fledged grid for that.
Another example is the virtual-refinement stuff: back in the bad old days when
I wrote it and GenericGeometries were not yet around, I needed some simple
geometries. So to be able to have those geometries, I had to write a mock
grid class so I could use it as the template parameter for Dune::Geometry.
This would have been much easier with the BasicGeometries.
--
Gute Nacht Deutschland.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20101228/578247ba/attachment.sig>
More information about the Dune
mailing list