Nodal positions and FE-function coefficients

Asked by James Avery

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.

Any help would be appreciated.

With many kind regards,

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Kristian B. Ølgaard
Solved:
Last query:
Last reply:
Revision history for this message
James Avery (avery-diku) said :
#1

I forgot to add that I am using Dolfin from C++.

Revision history for this message
Best Kristian B. Ølgaard (k.b.oelgaard) said :
#2

On 20 May 2011 04:41, James Avery <email address hidden> 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     : <email address hidden>
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>

Revision history for this message
James Avery (avery-diku) said :
#3

Thanks Kristian B. Ølgaard, that solved my question.