restrict on GenericFunction or Constant

Asked by Chaffra Affouda on 2013-01-28

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

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
2013-01-28
Last reply:
2013-02-05
Jan Blechta (blechta) said : #1

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);
}

Jan

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.