dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #23923
Re: How does dolfin.DirichletBC calculate dofs?
On Thu, Jun 23, 2011 at 03:00:45PM +0200, Neilen Marais wrote:
> Hi,
>
> I'm calculating a surface interpolation in a 3D space by using
> DirichletBC. I'm using Nedelec tet elements. The mechanics are exactly
> the same as for specifying a non-homogenous Dirichlet BC, except that
> I am calling it over and over inside a loop to post-process electric
> near-fields into far-field quantities. Hence, it is somewhat
> performance critical.
>
> IOW, I do:
>
> V = dolfin.FunctionSpace(...)
> u = dolfin.Function(V)
> bc = dolfin.DirichletBC(V, BC_expr)
> bc.apply(u.vector())
>
> 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.
--
Anders
Follow ups
References