← Back to team overview

dolfin team mailing list archive

Re: [Question #158276]: Nodal positions and FE-function coefficients

 

Question #158276 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/158276

    Status: Open => Answered

Kristian B. Ølgaard proposed the following answer:
On 20 May 2011 04:41, James Avery <question158276@xxxxxxxxxxxxxxxxxxxxx> wrote:
> New question #158276 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/158276
>
> Dear all,
>
> I'm having a bit of difficulty finding out how, given a finite element
> function
>
>  f(x) = \sum_{i=1}^{Ndof} a_i \phi_i(x)
>
> defined on a particular finite element space, one may obtain:
>
>  1. The coefficients a_i, and
>  2. The nodal positions x_j s.t. \phi_i(x_j) = \delta_{ij}.
>
> where the \phi_i are the nodal basis functions / shape
> functions.  Given an FE-function, the coefficients and nodal positions
> should be readily available without any additional computation, but
> for some reason I can't figure out where to find them.

The nodal positions are not precomputed and stored anywhere, but
the dofmap of a function has a function called tabulate_coordinates which
should do what you want.

Kristian

> Any help would be appreciated.
>
> With many kind regards,
>
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.