const typename Triangulation<dim,dim>::CellStatus /*status*/,
void *data)
{
- double *data_store = reinterpret_cast<double *>(data);
+ typename VECTOR::value_type *data_store = reinterpret_cast<typename VECTOR::value_type *>(data);
typename DH::cell_iterator cell(*cell_, dof_handler);
const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell;
- ::dealii::Vector<double> dofvalues(dofs_per_cell);
+ ::dealii::Vector<typename VECTOR::value_type> dofvalues(dofs_per_cell);
for (typename std::vector<const 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;
}
}
cell(*cell_, dof_handler);
const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell;
- ::dealii::Vector<double> dofvalues(dofs_per_cell);
- const double *data_store = reinterpret_cast<const double *>(data);
+ ::dealii::Vector<typename VECTOR::value_type> dofvalues(dofs_per_cell);
+ const typename VECTOR::value_type *data_store = reinterpret_cast<const typename VECTOR::value_type *>(data);
for (typename std::vector<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;
}
namespace
{
template <class VectorType>
- 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];
}