← Back to team overview

dolfin team mailing list archive

Re: NewFunction fixes.

 

Is it necessary to give no_comp as an argument to the constructor of a
NewFunction? I think this information should be contained in the
element.

A finite element generated by FFC (originally from FIAT) contains the
following two methods that can be used:

    unsigned int rank() const; 
    unsigned int tensordim(unsigned int i) const;

rank() returns 0 for scalars, 1 for vectors and so on. tensordim(0)
returns the number of vector dimensions for a vector-valued element.

/Anders

On Wed, Feb 16, 2005 at 07:53:38AM +0100, dolfin@xxxxxxxxxx wrote:
> Commit from hoffman (2005-02-16 07:53 CET)
> 
> NewFunction fixes.
> 
>   dolfin  src/kernel/function/NewFunction.cpp       1.10
>   dolfin  src/kernel/function/dolfin/NewFunction.h  1.8
>   dolfin  src/modules/heat/HeatSolver.cpp           1.5
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 



Follow ups

References