From: young Date: Thu, 27 Mar 2014 09:19:37 +0000 (+0000) Subject: Clean up function interpolate and instantiate correctly. Leave a TODO. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=947cf9d300570cdfbe785c7627d1ebd5cdb9787a;p=dealii-svn.git Clean up function interpolate and instantiate correctly. Leave a TODO. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@32699 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/numerics/vector_tools.templates.h b/deal.II/include/deal.II/numerics/vector_tools.templates.h index e41bd1be6e..7216a3c813 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -280,20 +280,17 @@ namespace VectorTools - // @whattodo TODO: To return functionality for complex numbers, this - // needs to be templated with Number and instantiated for - // REAL_SERIAL_VECTORS+double and - // COMPLEX_SERIAL_VECTORS+complex - template + // @TODO[TY] also enable instantiation for COMPLEX_SERIAL_VECTORS and std::complex + template void interpolate (const DoFHandler &dof_1, const DoFHandler &dof_2, - const FullMatrix &transfer, // <- FullMatrix + const FullMatrix &transfer, const InVector &data_1, OutVector &data_2) { - Vector cell_data_1(dof_1.get_fe().dofs_per_cell); // <- Vector - Vector cell_data_2(dof_2.get_fe().dofs_per_cell); // <- Vector + Vector cell_data_1(dof_1.get_fe().dofs_per_cell); + Vector cell_data_2(dof_2.get_fe().dofs_per_cell); std::vector touch_count (dof_2.n_dofs(), 0); //TODO: check on datatype... kinda strange (UK) std::vector local_dof_indices (dof_2.get_fe().dofs_per_cell); diff --git a/deal.II/source/numerics/vector_tools_interpolate.inst.in b/deal.II/source/numerics/vector_tools_interpolate.inst.in index 9b46645411..00bb3370ee 100644 --- a/deal.II/source/numerics/vector_tools_interpolate.inst.in +++ b/deal.II/source/numerics/vector_tools_interpolate.inst.in @@ -33,11 +33,21 @@ for (VEC : REAL_SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_d const Function&, VEC&); + \} +#endif + } + + +for (VEC : REAL_SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; NUMBER : double) + { +#if deal_II_dimension <= deal_II_space_dimension + namespace VectorTools \{ + template void interpolate (const DoFHandler&, const DoFHandler&, - const FullMatrix&, + const FullMatrix&, const VEC&, VEC&);