On 4/15/22 07:58, Giang Huynh wrote:
---------------------------------------
error: no matching function for call to ‘interpolate_to_different_mesh(const
dealii::DoFHandler<2>&, const dealii::Vector<double>&, const
dealii::DoFHandler<2>&, const dealii::Vector<double>&)’
VectorTools::interpolate_to_different_mesh(dof_handler, solution,
reg_dof_handler,reg_sol);
deal.II-v9.2.0/include/deal.II/numerics/vector_tools_interpolate.h:252:3:
note: template argument deduction/substitution failed:
/deal.II-v9.2.0/examples/step-3/step-3.cc:591:93: note: ‘const
dealii::DoFHandler<2>’ is not derived from ‘const
dealii::InterGridMap<DoFHandlerType<dim, spacedim> >’
VectorTools::interpolate_to_different_mesh(dof_handler, solution,
reg_dof_handler,reg_sol);
----------------------------------------
DoFHandler<2> dof_handler, reg_dof_handler;
Vector<double> solution;
Vector<double> reg_sol;
VectorTools::interpolate_to_different_mesh(dof_handler, solution,
reg_dof_handler,reg_sol);
----------------------------------------
Giang -- you need to take a look at the arguments in the function call. The
compiler actually tells you what arguments it wants to see and that you are
not providing: The last argument you pass is a 'const Vector', but the
function you are trying to call requires a non-const vector. You can also see
this from the documentation of the function you are trying to call.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
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/21ac71b9-25b6-10f9-208b-85f3c475ecab%40colostate.edu.