From afb02405c248792966938e0eef65385cc89c1930 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 28 Feb 2015 18:04:29 +0100 Subject: [PATCH] fixes in do_function_xxx --- source/fe/fe_values.cc | 82 +++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 2f47694843..10a1e72fa2 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -40,7 +40,7 @@ DEAL_II_NAMESPACE_OPEN namespace { template - double + typename VectorType::value_type get_vector_element (const VectorType &vector, const types::global_dof_index cell_number) { @@ -48,7 +48,7 @@ namespace } - double + IndexSet::value_type get_vector_element (const IndexSet &is, const types::global_dof_index cell_number) { @@ -461,14 +461,14 @@ namespace FEValuesViews shape_values.n_cols() : values.size(); AssertDimension (values.size(), n_quadrature_points); - std::fill (values.begin(), values.end(), 0.); + std::fill (values.begin(), values.end(), Number()); for (unsigned int shape_function=0; shape_function()); + typename ProductType >::type()); for (unsigned int shape_function=0; shape_function *shape_derivative_ptr = @@ -527,14 +527,14 @@ namespace FEValuesViews shape_hessians[0].size() : laplacians.size(); AssertDimension (laplacians.size(), n_quadrature_points); - std::fill (laplacians.begin(), laplacians.end(), 0.); + std::fill (laplacians.begin(), laplacians.end(), typename ProductType::type()); for (unsigned int shape_function=0; shape_function *shape_hessian_ptr = @@ -559,7 +559,7 @@ namespace FEValuesViews shape_values.n_cols() : values.size(); AssertDimension (values.size(), n_quadrature_points); - std::fill (values.begin(), values.end(), dealii::Tensor<1,spacedim>()); + std::fill (values.begin(), values.end(), typename ProductType >::type()); for (unsigned int shape_function=0; shape_function()); + typename ProductType >::type()); for (unsigned int shape_function=0; shape_function()); + typename ProductType >::type()); for (unsigned int shape_function=0; shape_function grad; + dealii::Tensor<2,spacedim,Number> grad; for (unsigned int d=0; d::type()); for (unsigned int shape_function=0; shape_function::type()); + std::fill (curls.begin(), curls.end(), typename ProductType::type>::type()); switch (spacedim) { @@ -784,9 +784,9 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const double value = dof_values (shape_function); + const Number value = dof_values (shape_function); - if (value == 0.) + if (value == Number()) continue; if (snc != -1) @@ -844,9 +844,9 @@ namespace FEValuesViews // shape function is zero for the selected components continue; - const double value = dof_values (shape_function); + const Number value = dof_values (shape_function); - if (value == 0.) + if (value == Number()) continue; if (snc != -1) @@ -956,7 +956,7 @@ namespace FEValuesViews AssertDimension (laplacians.size(), n_quadrature_points); std::fill (laplacians.begin(), laplacians.end(), - dealii::Tensor<1,spacedim>()); + typename ProductType >::type()); for (unsigned int shape_function=0; shape_function()); + typename ProductType >::type()); for (unsigned int shape_function=0; shape_function()); + typename ProductType >::type()); for (unsigned int shape_function=0; shape_function()); + typename ProductType >::type()); for (unsigned int shape_function=0; shape_function