From f9963d25142221a5ad3615d48f0c519cbfaeea40 Mon Sep 17 00:00:00 2001 From: young Date: Thu, 27 Mar 2014 09:29:39 +0000 Subject: [PATCH] Cowardly instantiate some specialised functions in FETools for REAL_SERIAL_VECTORS only. Leave another TODO. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@32700 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/fe_tools_interpolate.cc | 11 ++++------- deal.II/source/fe/fe_tools_interpolate.inst.in | 5 ++--- .../source/numerics/vector_tools_interpolate.inst.in | 2 ++ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/deal.II/source/fe/fe_tools_interpolate.cc b/deal.II/source/fe/fe_tools_interpolate.cc index ba2b9ed384..1171212f0d 100644 --- a/deal.II/source/fe/fe_tools_interpolate.cc +++ b/deal.II/source/fe/fe_tools_interpolate.cc @@ -715,20 +715,17 @@ namespace FETools const unsigned int n1 = dof1.get_fe().dofs_per_cell; const unsigned int n2 = dof2.get_fe().dofs_per_cell; - Vector u1_local(n1); // <- Vector - Vector u2_local(n2); // <- Vector + Vector u1_local(n1); + Vector u2_local(n2); std::vector dofs(n2); - FullMatrix matrix(n2,n1); // ? + FullMatrix matrix(n2,n1); get_projection_matrix(dof1.get_fe(), dof2.get_fe(), matrix); while (cell2 != end) { - - // @whattodo Some of the problems in petsc_vector_base.h are instantiated here. - // cell1->get_dof_values(u1, u1_local); // <- complaint line 655 - Assert ((false), ExcMessage ("This function is corrupt: @whattodo")); + cell1->get_dof_values(u1, u1_local); matrix.vmult(u2_local, u1_local); cell2->get_dof_indices(dofs); diff --git a/deal.II/source/fe/fe_tools_interpolate.inst.in b/deal.II/source/fe/fe_tools_interpolate.inst.in index d71b9d340a..aa2a0d5cca 100644 --- a/deal.II/source/fe/fe_tools_interpolate.inst.in +++ b/deal.II/source/fe/fe_tools_interpolate.inst.in @@ -64,12 +64,12 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS -for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; VEC : SERIAL_VECTORS) +// TODO[TY]: allow these for COMPLEX_SERIAL_VECTORS where applicable +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; VEC : REAL_SERIAL_VECTORS) { namespace FETools \{ #if deal_II_dimension == deal_II_space_dimension -#ifndef PETSC_USE_COMPLEX template void back_interpolate (const DoFHandler &, const VEC &, @@ -90,7 +90,6 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS const VEC &, const DoFHandler &, const ConstraintMatrix &, VEC &); -#endif template void project_dg (const DoFHandler &, const VEC &, diff --git a/deal.II/source/numerics/vector_tools_interpolate.inst.in b/deal.II/source/numerics/vector_tools_interpolate.inst.in index 00bb3370ee..afda91acf3 100644 --- a/deal.II/source/numerics/vector_tools_interpolate.inst.in +++ b/deal.II/source/numerics/vector_tools_interpolate.inst.in @@ -38,6 +38,8 @@ for (VEC : REAL_SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_d } + +// TODO[TY]: allow instantiation for COMPLEX_SERIAL_VECTORS and std::complex 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 -- 2.39.5