//
// ---------------------------------------------------------------------
+#include <deal.II/base/array_view.h>
#include <deal.II/base/memory_consumption.h>
#include <deal.II/base/multithread_info.h>
#include <deal.II/base/quadrature.h>
// ------------------------- scalar functions --------------------------
template <int dim, int spacedim, typename Number>
void
- do_function_values (const ::dealii::Vector<Number> &dof_values,
+ do_function_values (const ArrayView<const Number> &dof_values,
const Table<2,double> &shape_values,
const std::vector<typename Scalar<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,double>::type> &values)
shape_function<dofs_per_cell; ++shape_function)
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
{
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number() )
continue;
// the order of the derivative (= rank of gradient/Hessian tensor)
template <int order, int dim, int spacedim, typename Number>
void
- do_function_derivatives (const ::dealii::Vector<Number> &dof_values,
+ do_function_derivatives (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<order,spacedim> > &shape_derivatives,
const std::vector<typename Scalar<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::Tensor<order,spacedim> >::type> &derivatives)
shape_function<dofs_per_cell; ++shape_function)
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
{
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number() )
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_laplacians (const ::dealii::Vector<Number> &dof_values,
+ do_function_laplacians (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<2,spacedim> > &shape_hessians,
const std::vector<typename Scalar<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,double>::type> &laplacians)
shape_function<dofs_per_cell; ++shape_function)
if (shape_function_data[shape_function].is_nonzero_shape_function_component)
{
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
// ----------------------------- vector part ---------------------------
template <int dim, int spacedim, typename Number>
- void do_function_values (const ::dealii::Vector<Number> &dof_values,
+ void do_function_values (const ArrayView<const Number> &dof_values,
const Table<2,double> &shape_values,
const std::vector<typename Vector<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::Tensor<1,spacedim> >::type> &values)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int order, int dim, int spacedim, typename Number>
void
- do_function_derivatives (const ::dealii::Vector<Number> &dof_values,
+ do_function_derivatives (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<order,spacedim> > &shape_derivatives,
const std::vector<typename Vector<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::Tensor<order+1,spacedim> >::type> &derivatives)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_symmetric_gradients (const ::dealii::Vector<Number> &dof_values,
+ do_function_symmetric_gradients (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients,
const std::vector<typename Vector<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::SymmetricTensor<2,spacedim> >::type> &symmetric_gradients)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_divergences (const ::dealii::Vector<Number> &dof_values,
+ do_function_divergences (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients,
const std::vector<typename Vector<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,double>::type> &divergences)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_curls (const ::dealii::Vector<Number> &dof_values,
+ do_function_curls (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients,
const std::vector<typename Vector<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,typename dealii::internal::CurlType<spacedim>::type>::type> &curls)
// shape function is zero for the selected components
continue;
- const Number value = dof_values (shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
// shape function is zero for the selected components
continue;
- const Number value = dof_values (shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_laplacians (const ::dealii::Vector<Number> &dof_values,
+ do_function_laplacians (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<2,spacedim> > &shape_hessians,
const std::vector<typename Vector<dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::Tensor<1,spacedim> >::type> &laplacians)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_values (const ::dealii::Vector<Number> &dof_values,
+ do_function_values (const ArrayView<const Number> &dof_values,
const dealii::Table<2,double> &shape_values,
const std::vector<typename SymmetricTensor<2,dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::SymmetricTensor<2,spacedim> >::type> &values)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_divergences (const ::dealii::Vector<Number> &dof_values,
+ do_function_divergences (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients,
const std::vector<typename SymmetricTensor<2,dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::Tensor<1,spacedim> >::type> &divergences)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_values (const ::dealii::Vector<Number> &dof_values,
+ do_function_values (const ArrayView<const Number> &dof_values,
const dealii::Table<2,double> &shape_values,
const std::vector<typename Tensor<2,dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::Tensor<2,spacedim> >::type> &values)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
template <int dim, int spacedim, typename Number>
void
- do_function_divergences (const ::dealii::Vector<Number> &dof_values,
+ do_function_divergences (const ArrayView<const Number> &dof_values,
const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients,
const std::vector<typename Tensor<2,dim,spacedim>::ShapeFunctionData> &shape_function_data,
std::vector<typename ProductType<Number,dealii::Tensor<1,spacedim> >::type> &divergences)
// shape function is zero for the selected components
continue;
- const Number value = dof_values(shape_function);
+ const Number value = dof_values[shape_function];
if (value == Number())
continue;
dealii::Vector<typename InputVector::value_type> dof_values(fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_values, shape_function_data, values);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell),
+ fe_values->finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<1,dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_gradients, shape_function_data, gradients);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_gradients, shape_function_data, gradients);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<2,dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_hessians, shape_function_data, hessians);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_hessians, shape_function_data, hessians);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_laplacians<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_hessians, shape_function_data, laplacians);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_hessians, shape_function_data, laplacians);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<3,dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_3rd_derivatives, shape_function_data, third_derivatives);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_3rd_derivatives, shape_function_data, third_derivatives);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_values, shape_function_data, values);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<1,dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_gradients, shape_function_data, gradients);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_gradients, shape_function_data, gradients);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_symmetric_gradients<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_gradients, shape_function_data,
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_gradients, shape_function_data,
symmetric_gradients);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_divergences<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_gradients, shape_function_data, divergences);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_gradients, shape_function_data, divergences);
}
template <int dim, int spacedim>
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values (fe_function, dof_values);
internal::do_function_curls<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_gradients, shape_function_data, curls);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_gradients, shape_function_data, curls);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<2,dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_hessians, shape_function_data, hessians);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_hessians, shape_function_data, hessians);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_laplacians<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_hessians, shape_function_data, laplacians);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_hessians, shape_function_data, laplacians);
}
dealii::Vector<typename InputVector::value_type> dof_values (fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_derivatives<3,dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_3rd_derivatives, shape_function_data, third_derivatives);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_3rd_derivatives, shape_function_data, third_derivatives);
}
dealii::Vector<typename InputVector::value_type> dof_values(fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_values, shape_function_data, values);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values(fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_divergences<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_gradients, shape_function_data, divergences);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_gradients, shape_function_data, divergences);
}
template <int dim, int spacedim>
dealii::Vector<typename InputVector::value_type> dof_values(fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_values<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_values, shape_function_data, values);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_values, shape_function_data, values);
}
dealii::Vector<typename InputVector::value_type> dof_values(fe_values->dofs_per_cell);
fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values);
internal::do_function_divergences<dim,spacedim>
- (dof_values, fe_values->finite_element_output.shape_gradients, shape_function_data, divergences);
+ (ArrayView<const typename InputVector::value_type>(&dof_values[0], fe_values->dofs_per_cell), fe_values->finite_element_output.shape_gradients, shape_function_data, divergences);
}
}