Hello everybody,

having created a grid (let's call it coarse grid), copied and refined it 
globally two times (let's call this one fine grid), I struggle with 
transferring an interpolated function from the coarse to the fine grid. I 
am using deal.ii 8.5.1.

First I interpolated the function on the coarse grid using 
VectorTools::interpolate, I will refer to it as coarse solution vector. 
Then I followed two ideas:

1. Applying VectorTools::interpolate_to_different_mesh. This works well for 
simple functions like f(x,y)=x or f(x,y)=x*y but unfortunately not for the 
CurvedRidges function from step-13 (see attachment). I don't get why it 
does not work. Looking into the code of interpolate_to_different_mesh, I 
saw that it essentially calls DoFCellAccessor::get_interpolated_dof_values 
and set_dof_values_by_interpolation. 

2. Create an InterGridMap from the coarse to the fine grid, use it to call 
DoFTools::compute_intergrid_transfer_representation. Unfortunately, the 
documentation of this function does not fit the actual code (any more). The 
output data type seems to be changed from a matrix to a 
std::vector<std::map<.,.>> (I also think that in the comments of the code 
"row" and "column" are mixed up). Since it is not a matrix any more, a 
vector can not simply be applied using multiplication. By looping over the 
coarse and fine solution vector, identifying the contribution weights using 
the transfer representation and writing the respective entry to the fine 
solution vector, the coarse dof entries can be identified with the 
corresponding fine grid entries. Now the values still need to be 
interpolated. According to the documentation the output of 
commpute_intergrid_transfer_representation can be used to construct a 
corresponding sparse transfer matrix. Unfortunately, I did not find such a 
function that accepts a std::vector<std::map<.,.>> in the documentation. 
Did I just miss it or doesn't it exist?

Do you know why my approach 1 does not work? Do you have any further ideas 
on how to transfer an interpolated function between meshes?

I would greatly appreciate your help.
Ina

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to