[dune-fem] Two questions about the normal to a triangle and the CG operator

Dedner, Andreas A.S.Dedner at warwick.ac.uk
Thu May 24 19:43:22 CEST 2012


1) suppose that our mesh is made of triangles (in R^3, not in R^2, so each vertex has 3 coordinates); given an arbitrary triangle of such a mesh, I need to extract the unit normal to that triangle.
Is there a method that computes it directly? Like the quantities "center", "volume", "integrationElement", etc?

-------------------------------------

I am assuming you do not mean the conormal (e.g. tangent to the "surface") but the "surface normal"? That is not part of the Geometry
interface at the moment. So you need to use the cross product (as far
as I am aware that product does not exist in the DenseVector interface - perhaps you could make a suggestion...)

------------------------------------------------------------------------------------------

2)

Dune::ISTLCGOp< DiscreteFunction, Dune::ISTLMatrixOperator< DiscreteFunction, DiscreteFunction, MatrixTraits > >
Dune::CGInverseOperator < DiscreteFunction >
Dune::ConjugateGradientSolver < Operator >

By the way, I'm going to solve an operator represented by semi-positive-definite matrix; do all of these satisfy the property that if you feed the CG with a compatible initial guess all the iterates belong to the right space?

------------------------------------------------

The first one uses the ISTL backend to solve the system and thus requires setting up the matrix (using the ISTL BlockMatrix classes).
Also the DiscreteFunction has to be the BlockVectorDiscreteFuncrtion
because for that the DOFs are stored in the as ISTL blockvector.

The second is an implementation directly in dune-fem which only requires do implement the application of the operator on the vector.
We use that for on-the-fly inversion - but as a consequence there is no fancy preconditioning available...

Both should be fine for not quite positive definite or not quite symmetric matrixes - as long as it holds on a subspace and the initial
guess is in that space.

Best
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-fem/attachments/20120524/823f573f/attachment.htm>


More information about the dune-fem mailing list