From 599081ed2bbdb884fa88fc9f50396a94e5f8fb00 Mon Sep 17 00:00:00 2001 From: young Date: Wed, 26 Mar 2014 13:40:34 +0000 Subject: [PATCH] Inst. interpolate function for REAL_SERIAL_VECTOR. Add TODO. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@32698 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/numerics/vector_tools.templates.h | 20 ++++++++----------- .../numerics/vector_tools_interpolate.inst.in | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) 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 e6c9e9ed3d..e41bd1be6e 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -280,17 +280,20 @@ 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 void interpolate (const DoFHandler &dof_1, const DoFHandler &dof_2, - const FullMatrix &transfer, + const FullMatrix &transfer, // <- FullMatrix 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 cell_data_2(dof_2.get_fe().dofs_per_cell); // <- Vector 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); @@ -301,13 +304,7 @@ namespace VectorTools for (; h != endh; ++h, ++l) { - // @whattodo Some of the problems in petsc_vector_base.h are - // instantiated here. Should look into DoFCellAccessor too. It - // looks like *maybe* vector_tools needs to be templated (run - // grep -R "double" on that file). Additionally, *this* file - // needs to be templated with "number". - /* h->get_dof_values(data_1, cell_data_1); */ - Assert ((false), ExcMessage ("This function is corrupt: @whattodo")); + h->get_dof_values(data_1, cell_data_1); transfer.vmult(cell_data_2, cell_data_1); @@ -318,8 +315,7 @@ namespace VectorTools { data_2(local_dof_indices[j]) += cell_data_2(j); - // count, how often we have - // added to this dof + // count, how often we have added to this dof Assert (touch_count[local_dof_indices[j]] < numbers::internal_face_boundary_id, ExcInternalError()); ++touch_count[local_dof_indices[j]]; diff --git a/deal.II/source/numerics/vector_tools_interpolate.inst.in b/deal.II/source/numerics/vector_tools_interpolate.inst.in index a21c69a76b..9b46645411 100644 --- a/deal.II/source/numerics/vector_tools_interpolate.inst.in +++ b/deal.II/source/numerics/vector_tools_interpolate.inst.in @@ -15,7 +15,7 @@ // --------------------------------------------------------------------- -for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) +for (VEC : REAL_SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { #if deal_II_dimension <= deal_II_space_dimension namespace VectorTools \{ -- 2.39.5