← Back to team overview

dolfin team mailing list archive

bug in ConstantFunction

 

There appears to be a bug in

ConstantFunction::interpolate(real* coefficients,
                              const ufc::cell& cell,
                              const ufc::finite_element& finite_element)

as it always returns zeros. Should

 // Evaluate each dof to get coefficients for nodal basis expansion
  for (uint i = 0; i < finite_element.space_dimension(); i++)
    coefficients[i] = finite_element.evaluate_dof(i, *this, cell);

be

 // Evaluate each dof to get coefficients for nodal basis expansion
  for (uint i = 0; i < finite_element.space_dimension(); i++)
    coefficients[i] = value;

?

Garth


Follow ups