restrict on GenericFunction or Constant

Asked by Chaffra Affouda

if g = Function(Q)
I can call g.restrict(cell_coefs, element, cell, ufc_cell)

but if g = Constant(0.0) it gives me Segmentation fault (core dumped). What's missing to make it work?

Question information

English Edit question
DOLFIN Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Blechta (blechta) said :

Try restrict_as_ufc_function(). This is implemented in GenericFunction.cpp

It seems that implementation of restrict (same as in Expression.cpp) is missing in Constant.cpp:

void Expression::restrict(double* w,
                          const FiniteElement& element,
                          const Cell& dolfin_cell,
                          const ufc::cell& ufc_cell) const
  // Restrict as UFC function (by calling eval)
  restrict_as_ufc_function(w, element, dolfin_cell, ufc_cell);


Can you help with this problem?

Provide an answer of your own, or ask Chaffra Affouda for more information if necessary.

To post a message you must log in.