Garth N. Wells wrote:
>
>
> Marie Rognes wrote:
>> Garth N. Wells wrote:
>>>
>>>
>>> Marie Rognes wrote:
>>>> I have a slightly interesting issue, possibly with interpolate:
>>>>
>>>> Say I have a RT_0 function u. I want to interpolate this function
>>>> onto a DG_1 function Pi_u.
>>>> Since RT_0 \subset DG_1, I would expect to get the same function.
>>>> This does not seem
>>>> to be the case at the moment.
>>>>
>>>
>>> Need to be careful interpolating in discontinuous spaces because you
>>> will pick up the 'last' evaluated term, i.e. you can't be sure which
>>> on side the function will be evaluated on. This could be the issue.
>>> Have a look inside the interpolate functions in Function.cpp.
>>>
>>>
>>
>>
>> Ah. This makes the use of interpolate in errornorm pretty
>> unpredictable ...
>>
>
> Should be OK if u and uh are continuous.
>
> I would be inclined to remove errornorm - too much can go wrong, for
> example, it defaults to k =3 for interpolating the exact solution and
> what happens if uh is discontinuous.
>
I happen to be using errornorm a lot ;)
The main problem is with the interpolation of discontinuous functions.
As far as I can understand, this should be mathematically possible....
Interpolate seems to interate over each cell, so the current cell is
known. However, this information seems
to be thrown away in UFCFunction::evaluate at the call to
void Function::eval(double* values, const Data& data) const
Wouldn't it be possible to use
void Function::eval(double* values, const double* x, const
ufc::cell& ufc_cell, uint cell_index) const
instead?
--
Marie
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev