← Back to team overview

dolfin team mailing list archive

Re: How does dolfin.DirichletBC calculate dofs?

 

On 06/23/11 15:38, Neilen Marais wrote:
Hi Anders.

On Thu, Jun 23, 2011 at 3:10 PM, Anders Logg<logg@xxxxxxxxx>  wrote:
I would just like to know how bc.apply() goes about approximating
BC_expr. Does it take the estimated degree of BC_expr into account, or
does it only take the degree of V into account? And is there any way
to control this?
It only depends on the dofs of V. For each degree of freedom of V, it
evaluates that degree of freedom on your expression.
OK, but how are those DOFs defined? For interpolatory elements that
should just be a point-wise evaluation of the function you're
interpolating. But the theoretical DOFs can also be defined as
integrals over edges, faces, volumes depending on how the basis is
constructed. Do higher degree Nedelec elements still result only in
point-wise evaluation (one point per DOF), or are integrals evalued?


The degrees of freedom are the degrees of freedom defined by FIAT on the reference elements, mapped in a sensible manner onto the physical elements. Hence, If FIAT defines a degree of freedom using a (numerical) integration rule, so does DOLFIN.

Specifically, you can examine how the degrees of freedom are evaluated by looking at the function evaluate_dof(...) in the FFC-generated code (or browsing the FIAT source ;-) )

And in particular, for higher order Nedelecs (H(curl), of the first kind), the interior degrees of freedom involve integral moments. These should not be evaluated if you only do stuff on boundary edges though.

--
Marie


I ask this since I changed the interpolant from a python class
subclassed from dolfin.Expression to actual JIT-able Expressions, and
two things happened.

Firstly, the numerical results change by a maginitude larger than can
be explained by machine precision effects, but not enough (I think) to
indicate incorrect expressions; it looks more like what I'd expect
from a different quadrature degree.

Secondly, using the expressions with no form compiler optimisations
lead to execution several times slower than using the python class.
Even without optimisation enabled, I'd expect the JIT expressions to
be much faster than the pure python expressions. When I enable form
optimisation it is indeed faster than python expression equivalent.
This seems to indicate to me that extra expression evaluations are
happening? How could I check?

Thanks
Neilen

--
Anders

_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp



References