Re: [deal.II] Solution transfer for BlockVector

39 views
Skip to first unread message

Wolfgang Bangerth

unread,
Jan 23, 2024, 4:23:15 PM1/23/24
to dea...@googlegroups.com
On 1/23/24 13:03, Tao Jin wrote:
>
> I am trying to use the SolutionTransfer capability of dealii to interpolate a
> solution from an old mesh to a new mesh. The solution is stored in a
> BlockVector. My understanding is that current solution transfer functions can
> only interpolate Vector, not BlockVector. Am I right?

No, this is not true. Have you tried? It should work just fine.
Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Tao Jin

unread,
Jan 23, 2024, 5:17:07 PM1/23/24
to deal.II User Group
Sorry, my bad. It works for BlockVector. However, there is a discrepancy on deal.ii manual. 

Below is from the deal.ii manual about SolutionTransfer module: 

"""
Although the refine_interpolate functions are allowed to be called multiple times, e.g. for interpolating several solution vectors, there is the following possibility of interpolating several functions simultaneously.
std::vector<Vector<double> > solutions_old(n_vectors, Vector<double> (n));
...
std::vector<Vector<double> > solutions(n_vectors, Vector<double> (n));
soltrans.refine_interpolate(solutions_old, solutions);
 """
However, refine_interpolate() cannot take std::vector<VectorType>. Only interpolate() has an interface for std::vector<VectorType>.

Best,

Tao


Reply all
Reply to author
Forward
0 new messages