Dear Daniel,

yes, I defined a class derived from deal::Function and it seems to work for
me.

Basically, my motivation to call VectorTools::interpolate is to compute the
nodal values (scalar field --> DOFs) in the triangulation based on the
formula implemented in the just derived class.
During the assembly routine, I access some interpolated values at
quadrature points,...

With this in mind, is this an appropriate way?


Best
Simon

Am Di., 5. Juli 2022 um 09:16 Uhr schrieb Daniel Arndt <
[email protected]>:

> Simon,
>
> defining a class derived from dealii::Function sounds sensible.
> Whether calling VectorTools::interpolate makes sense, depends on what you
> want to do with the interpolated function. In may cases, it's enough to
> just evaluate it locally during assembly using functionality like
> FEValues::get_function_values.
>
> Best,
> Daniel
>
> On Mon, Jul 4, 2022 at 10:26 AM Simon <[email protected]> wrote:
>
>> Dear all:
>>
>>
>> I am solving a nonlinear PDE on a Triangulation T_1.
>>
>> I know the analytical representation of a scalar function of two
>> variables (no space co-ordinates, but two invariants of a quantity)
>> and my goal is to find a discretized version of the analytical function
>> (on a second, two-dimensional triangulation T_2).
>> The nodal values of T_2 should be the exact values corresponding to the
>> analytical solution.
>> As for the values between the nodes, I want to start with a bilinear
>> interpolation.
>>
>> The coupling to my original PDE works as follows:
>> For each quadrature point defined on T_1, I compute the two input
>> variables of the above function based on my solution vector, find the
>> corresponding cell of T_2 and want to retrieve the interpolated nodal
>> values.
>>
>> My idea is to use the function
>> VectorTools::interpolate ,
>> but I do not know a suitable Function object to hand over.
>>
>> Is this an appropriate approach at all?
>>
>>
>> Thank you,
>> Simon
>>
>> --
>> The deal.II project is located at http://www.dealii.org/
>> For mailing list/forum options, see
>> https://groups.google.com/d/forum/dealii?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "deal.II User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/dealii/14b1d8f6-f902-4414-a5c6-348ae3f5003en%40googlegroups.com
>> <https://groups.google.com/d/msgid/dealii/14b1d8f6-f902-4414-a5c6-348ae3f5003en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/CAOYDWbKNTV%3D8Bipyq_gzbMoLvxdvv-%2BmHLipn27DbOcK-eWL_A%40mail.gmail.com
> <https://groups.google.com/d/msgid/dealii/CAOYDWbKNTV%3D8Bipyq_gzbMoLvxdvv-%2BmHLipn27DbOcK-eWL_A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAM50jEsXcMsvZzq0-EFgQwWn%3Dr%3D6yBw8yVrMnQ5met_LK0zHew%40mail.gmail.com.

Reply via email to