From 8652e09abad00776b62f9e9bddf0b7ea81af6a3b Mon Sep 17 00:00:00 2001 From: "denis.davydov" Date: Wed, 5 Mar 2014 15:51:29 +0000 Subject: [PATCH] fixed some problems related to introduction of templated arguments git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@32620 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/distributed/solution_transfer.cc | 12 ++++++------ deal.II/source/numerics/data_out_dof_data.cc | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/deal.II/source/distributed/solution_transfer.cc b/deal.II/source/distributed/solution_transfer.cc index f5aced6a3e..f45a02b324 100644 --- a/deal.II/source/distributed/solution_transfer.cc +++ b/deal.II/source/distributed/solution_transfer.cc @@ -213,18 +213,18 @@ namespace parallel const typename Triangulation::CellStatus /*status*/, void *data) { - double *data_store = reinterpret_cast(data); + typename VECTOR::value_type *data_store = reinterpret_cast(data); typename DH::cell_iterator cell(*cell_, dof_handler); const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell; - ::dealii::Vector dofvalues(dofs_per_cell); + ::dealii::Vector dofvalues(dofs_per_cell); for (typename std::vector::iterator it=input_vectors.begin(); it !=input_vectors.end(); ++it) { cell->get_interpolated_dof_values(*(*it), dofvalues); - std::memcpy(data_store, &dofvalues(0), sizeof(double)*dofs_per_cell); + std::memcpy(data_store, &dofvalues(0), sizeof(typename VECTOR::value_type)*dofs_per_cell); data_store += dofs_per_cell; } } @@ -242,14 +242,14 @@ namespace parallel cell(*cell_, dof_handler); const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell; - ::dealii::Vector dofvalues(dofs_per_cell); - const double *data_store = reinterpret_cast(data); + ::dealii::Vector dofvalues(dofs_per_cell); + const typename VECTOR::value_type *data_store = reinterpret_cast(data); for (typename std::vector::iterator it = all_out.begin(); it != all_out.end(); ++it) { - std::memcpy(&dofvalues(0), data_store, sizeof(double)*dofs_per_cell); + std::memcpy(&dofvalues(0), data_store, sizeof(typename VECTOR::value_type)*dofs_per_cell); cell->set_dof_values_by_interpolation(dofvalues, *(*it)); data_store += dofs_per_cell; } diff --git a/deal.II/source/numerics/data_out_dof_data.cc b/deal.II/source/numerics/data_out_dof_data.cc index 1a660f0feb..f777544031 100644 --- a/deal.II/source/numerics/data_out_dof_data.cc +++ b/deal.II/source/numerics/data_out_dof_data.cc @@ -514,13 +514,11 @@ namespace internal namespace { template - double + typename VectorType::value_type get_vector_element (const VectorType &vector, const unsigned int cell_number) { - // @whattodo Note, there should be a way to get the value type from a VectorType! - // return vector[cell_number]; - Assert ((false), ExcMessage ("This function is corrupt: @whattodo")); + return vector[cell_number]; } -- 2.39.5