namespace
{
template <class VectorType>
- double
+ typename VectorType::value_type
get_vector_element (const VectorType &vector,
const types::global_dof_index cell_number)
{
}
- double
+ IndexSet::value_type
get_vector_element (const IndexSet &is,
const types::global_dof_index cell_number)
{
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<dofs_per_cell; ++shape_function)
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
{
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number() )
continue;
const double *shape_value_ptr =
AssertDimension (derivatives.size(), n_quadrature_points);
std::fill (derivatives.begin(), derivatives.end(),
- dealii::Tensor<order,spacedim>());
+ typename ProductType<Number,dealii::Tensor<order,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
{
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number() )
continue;
const dealii::Tensor<order,spacedim> *shape_derivative_ptr =
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<Number,double>::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
{
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
const dealii::Tensor<2,spacedim> *shape_hessian_ptr =
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<Number,dealii::Tensor<1,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
if (snc != -1)
AssertDimension (derivatives.size(), n_quadrature_points);
std::fill (derivatives.begin(), derivatives.end(),
- dealii::Tensor<order+1,spacedim>());
+ typename ProductType<Number,dealii::Tensor<order+1,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
if (snc != -1)
AssertDimension (symmetric_gradients.size(), n_quadrature_points);
std::fill (symmetric_gradients.begin(), symmetric_gradients.end(),
- dealii::SymmetricTensor<2,spacedim>());
+ typename ProductType<Number,dealii::SymmetricTensor<2,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number)
continue;
if (snc != -1)
else
for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
{
- dealii::Tensor<2,spacedim> grad;
+ dealii::Tensor<2,spacedim,Number> grad;
for (unsigned int d=0; d<spacedim; ++d)
if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
grad[d] = value *
shape_gradients[0].size() : divergences.size();
AssertDimension (divergences.size(), n_quadrature_points);
- std::fill (divergences.begin(), divergences.end(), 0.);
+ std::fill (divergences.begin(), divergences.end(), typename ProductType<Number,double>::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
if (snc != -1)
shape_gradients[0].size() : curls.size();
AssertDimension (curls.size(), n_quadrature_points);
- std::fill (curls.begin(), curls.end(), typename dealii::internal::CurlType<spacedim>::type());
+ std::fill (curls.begin(), curls.end(), typename ProductType<Number,typename dealii::internal::CurlType<spacedim>::type>::type());
switch (spacedim)
{
// 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)
// 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)
AssertDimension (laplacians.size(), n_quadrature_points);
std::fill (laplacians.begin(), laplacians.end(),
- dealii::Tensor<1,spacedim>());
+ typename ProductType<Number,dealii::Tensor<1,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
if (snc != -1)
AssertDimension (values.size(), n_quadrature_points);
std::fill (values.begin(), values.end(),
- dealii::SymmetricTensor<2,spacedim>());
+ typename ProductType<Number,dealii::SymmetricTensor<2,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
if (snc != -1)
AssertDimension (divergences.size(), n_quadrature_points);
std::fill (divergences.begin(), divergences.end(),
- dealii::Tensor<1,spacedim>());
+ typename ProductType<Number,dealii::Tensor<1,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
if (snc != -1)
AssertDimension (values.size(), n_quadrature_points);
std::fill (values.begin(), values.end(),
- dealii::Tensor<2,spacedim>());
+ typename ProductType<Number,dealii::Tensor<2,spacedim> >::type());
for (unsigned int shape_function=0;
shape_function<dofs_per_cell; ++shape_function)
// shape function is zero for the selected components
continue;
- const double value = dof_values(shape_function);
- if (value == 0.)
+ const Number value = dof_values(shape_function);
+ if (value == Number())
continue;
if (snc != -1)