← Back to team overview

ffc team mailing list archive

Re: Element area

 

On Fri, Jul 08, 2005 at 11:02:04PM +0200, Garth N. Wells wrote:
> Hi Anders,
> 
> I'm trying to stabilise a problem and for this I need a measure of the element
> area. Do you have any plans to make this sort of information available through
> ffc? I have seen that Johan H. hasn't yet defined the element length in the
> Navier-Stokes module yet. Johan, do you have a plan how to do this? It could be
> done easily by defining a constant in the .form file and then adding a line c4 =
> sqrt(det), but this would destroy the beauty of the ffc generated file. 

I will probably add a default Function h(x) that gives you the size of
the element. Do you need the side length (diameter) or the area?

This will probably not be until after the summer though, so what you
can do now is to define a piecewise constant function that is defined
as the mesh size or area or whatever, like so:

   P0 = FiniteElement("Discontinuous Lagrange", "triangle", 0)
   h  = Function(P0)

and then define a corresponding Function in DOLFIN from a Vector and
set the values of the Vector to the local mesh size (x(i) area of
triangle i).

> A more general question - do you have a plan on how more complicated nonlinear
> problems, such as plasticity, will fit in with ffc + DOLFIN? I mean here solving
> equations in which the coefficients of an equation themselves come from the
> solution of a non-trivial nonlinear problem, such a plasticity return mapping
> algorithm.
> 
> Garth  

This is already implemented. When you define a Function in FFC, then
this corresponds to a Function in DOLFIN, and the DOLFIN Function
could be either defined by an expression or it can be the solution of
another problem.

The Function concept is really central to both FFC and DOLFIN, and it
is the key to working with FFC and DOLFIN. Each Function in FFC
corresponds to a Function in DOLFIN, and it should not matter how the
Function is defined in DOLFIN. There are a couple of things missing,
like reading Functions from file, projection between different
function spaces, but the basic stuff is implemented. (Take a look at
Function.cpp, it's pretty short.)

Ask again if something is unclear.

/Anders



Follow ups

References