if (update_flags & update_values)
{
values.resize (this->dofs_per_cell);
- data->shape_values.resize (this->dofs_per_cell);
- for (unsigned int i=0; i<this->dofs_per_cell; ++i)
- data->shape_values[i].resize (n_q_points);
+ data->shape_values.reinit (this->dofs_per_cell, n_q_points);
if (mapping_type != mapping_none)
data->transformed_shape_values.resize (n_q_points);
}
if (update_flags & update_gradients)
{
grads.resize (this->dofs_per_cell);
- data->shape_grads.resize (this->dofs_per_cell);
- for (unsigned int i=0; i<this->dofs_per_cell; ++i)
- data->shape_grads[i].resize (n_q_points);
+ data->shape_grads.reinit (this->dofs_per_cell, n_q_points);
data->transformed_shape_grads.resize (n_q_points);
if ( (mapping_type == mapping_raviart_thomas)
if (update_flags & update_hessians)
{
grad_grads.resize (this->dofs_per_cell);
- data->shape_grad_grads.resize (this->dofs_per_cell);
- for (unsigned int i=0; i<this->dofs_per_cell; ++i)
- data->shape_grad_grads[i].resize (n_q_points);
+ data->shape_grad_grads.reinit (this->dofs_per_cell, n_q_points);
data->transformed_shape_hessians.resize (n_q_points);
if ( mapping_type != mapping_none )
data->untransformed_shape_hessian_tensors.resize(n_q_points);
* Array with shape function values in quadrature points. There is one row
* for each shape function, containing values for each quadrature point.
*/
- std::vector<std::vector<Tensor<1,dim> > > shape_values;
+ Table<2,Tensor<1,dim> > shape_values;
/**
* Array with shape function gradients in quadrature points. There is one
* row for each shape function, containing values for each quadrature
* point.
*/
- std::vector< std::vector< DerivativeForm<1, dim, spacedim> > > shape_grads;
+ Table<2,DerivativeForm<1, dim, spacedim> > shape_grads;
/**
* Array with shape function hessians in quadrature points. There is one
* row for each shape function, containing values for each quadrature
* point.
*/
- std::vector< std::vector< DerivativeForm<2, dim, spacedim> > > shape_grad_grads;
+ Table<2,DerivativeForm<2, dim, spacedim> > shape_grad_grads;
/**
* Scratch arrays for intermediate computations
*/
- mutable std::vector<double> sign_change;
- mutable std::vector<Tensor<1, spacedim> > transformed_shape_values;
+ mutable std::vector<double> sign_change;
+ mutable std::vector<Tensor<1, spacedim> > transformed_shape_values;
// for shape_gradient computations
mutable std::vector<Tensor<2, spacedim > > transformed_shape_grads;
- mutable std::vector<Tensor<2, dim > > untransformed_shape_grads;
+ mutable std::vector<Tensor<2, dim > > untransformed_shape_grads;
// for shape_hessian computations
mutable std::vector<Tensor<3, spacedim > > transformed_shape_hessians;
- mutable std::vector<Tensor<3, dim > > untransformed_shape_hessian_tensors;
+ mutable std::vector<Tensor<3, dim > > untransformed_shape_hessian_tensors;
};
const unsigned int n_q_points = quadrature.size();
- Assert(!(fe_data.update_each & update_values) || fe_data.shape_values.size() == this->dofs_per_cell,
- ExcDimensionMismatch(fe_data.shape_values.size(), this->dofs_per_cell));
- Assert(!(fe_data.update_each & update_values) || fe_data.shape_values[0].size() == n_q_points,
- ExcDimensionMismatch(fe_data.shape_values[0].size(), n_q_points));
+ Assert(!(fe_data.update_each & update_values) || fe_data.shape_values.size()[0] == this->dofs_per_cell,
+ ExcDimensionMismatch(fe_data.shape_values.size()[0], this->dofs_per_cell));
+ Assert(!(fe_data.update_each & update_values) || fe_data.shape_values.size()[1] == n_q_points,
+ ExcDimensionMismatch(fe_data.shape_values.size()[1], n_q_points));
// Create table with sign changes, due to the special structure of the RT elements.
// TODO: Preliminary hack to demonstrate the overall prinicple!
case mapping_covariant:
case mapping_contravariant:
{
- mapping.transform (make_array_view(fe_data.shape_values[i]),
+ mapping.transform (make_array_view(fe_data.shape_values, i),
mapping_type,
mapping_internal,
make_array_view(fe_data.transformed_shape_values));
case mapping_raviart_thomas:
case mapping_piola:
{
- mapping.transform (make_array_view(fe_data.shape_values[i]),
+ mapping.transform (make_array_view(fe_data.shape_values, i),
mapping_piola,
mapping_internal,
make_array_view(fe_data.transformed_shape_values));
case mapping_nedelec:
{
- mapping.transform (make_array_view(fe_data.shape_values[i]),
+ mapping.transform (make_array_view(fe_data.shape_values, i),
mapping_covariant,
mapping_internal,
make_array_view(fe_data.transformed_shape_values));
{
case mapping_none:
{
- mapping.transform (make_array_view(fe_data.shape_grads[i]),
+ mapping.transform (make_array_view(fe_data.shape_grads, i),
mapping_covariant,
mapping_internal,
make_array_view(fe_data.transformed_shape_grads));
}
case mapping_covariant:
{
- mapping.transform (make_array_view(fe_data.shape_grads[i]),
+ mapping.transform (make_array_view(fe_data.shape_grads, i),
mapping_covariant_gradient,
mapping_internal,
make_array_view(fe_data.transformed_shape_grads));
case mapping_none:
{
- mapping.transform(make_array_view(fe_data.shape_grad_grads[i]),
+ mapping.transform(make_array_view(fe_data.shape_grad_grads, i),
mapping_covariant_gradient,
mapping_internal,
make_array_view(fe_data.transformed_shape_hessians));
{
const ArrayView<Tensor<1,spacedim> > transformed_shape_values
= make_array_view(fe_data.transformed_shape_values, offset, n_q_points);
- mapping.transform (make_array_view(fe_data.shape_values[i], offset, n_q_points),
+ mapping.transform (make_array_view(fe_data.shape_values, i, offset, n_q_points),
mapping_type,
mapping_internal,
transformed_shape_values);
{
const ArrayView<Tensor<1,spacedim> > transformed_shape_values
= make_array_view(fe_data.transformed_shape_values, offset, n_q_points);
- mapping.transform (make_array_view(fe_data.shape_values[i], offset, n_q_points),
+ mapping.transform (make_array_view(fe_data.shape_values, i, offset, n_q_points),
mapping_piola,
mapping_internal,
transformed_shape_values);
{
const ArrayView<Tensor<1,spacedim> > transformed_shape_values
= make_array_view(fe_data.transformed_shape_values, offset, n_q_points);
- mapping.transform (make_array_view (fe_data.shape_values[i], offset, n_q_points),
+ mapping.transform (make_array_view (fe_data.shape_values, i, offset, n_q_points),
mapping_covariant,
mapping_internal,
transformed_shape_values);
{
const ArrayView<Tensor<2,spacedim> > transformed_shape_grads
= make_array_view(fe_data.transformed_shape_grads, offset, n_q_points);
- mapping.transform (make_array_view(fe_data.shape_grads[i], offset, n_q_points),
+ mapping.transform (make_array_view(fe_data.shape_grads, i, offset, n_q_points),
mapping_covariant,
mapping_internal,
transformed_shape_grads);
{
const ArrayView<Tensor<2,spacedim> > transformed_shape_grads
= make_array_view(fe_data.transformed_shape_grads, offset, n_q_points);
- mapping.transform (make_array_view(fe_data.shape_grads[i], offset, n_q_points),
+ mapping.transform (make_array_view(fe_data.shape_grads, i, offset, n_q_points),
mapping_covariant_gradient,
mapping_internal,
transformed_shape_grads);
{
const ArrayView<Tensor<3,spacedim> > transformed_shape_hessians
= make_array_view(fe_data.transformed_shape_hessians, offset, n_q_points);
- mapping.transform(make_array_view (fe_data.shape_grad_grads[i], offset, n_q_points),
+ mapping.transform(make_array_view (fe_data.shape_grad_grads, i, offset, n_q_points),
mapping_covariant_gradient,
mapping_internal,
transformed_shape_hessians);
{
const ArrayView<Tensor<1,spacedim> > transformed_shape_values
= make_array_view(fe_data.transformed_shape_values, offset, n_q_points);
- mapping.transform (make_array_view(fe_data.shape_values[i], offset, n_q_points),
+ mapping.transform (make_array_view(fe_data.shape_values, i, offset, n_q_points),
mapping_type,
mapping_internal,
transformed_shape_values);
const ArrayView<Tensor<1,spacedim> > transformed_shape_values
= make_array_view(fe_data.transformed_shape_values, offset, n_q_points);
- mapping.transform(make_array_view(fe_data.shape_values[i], offset, n_q_points),
+ mapping.transform(make_array_view(fe_data.shape_values, i, offset, n_q_points),
mapping_piola,
mapping_internal,
transformed_shape_values);
const ArrayView<Tensor<1,spacedim> > transformed_shape_values
= make_array_view(fe_data.transformed_shape_values, offset, n_q_points);
- mapping.transform (make_array_view (fe_data.shape_values[i], offset, n_q_points),
+ mapping.transform (make_array_view (fe_data.shape_values, i, offset, n_q_points),
mapping_covariant,
mapping_internal,
transformed_shape_values);
{
case mapping_none:
{
- mapping.transform (make_array_view(fe_data.shape_grads[i], offset, n_q_points),
+ mapping.transform (make_array_view(fe_data.shape_grads, i, offset, n_q_points),
mapping_covariant,
mapping_internal,
transformed_shape_grads);
case mapping_covariant:
{
- mapping.transform (make_array_view(fe_data.shape_grads[i], offset, n_q_points),
+ mapping.transform (make_array_view(fe_data.shape_grads, i, offset, n_q_points),
mapping_covariant_gradient,
mapping_internal,
transformed_shape_grads);
{
const ArrayView<Tensor<3,spacedim> > transformed_shape_hessians
= make_array_view(fe_data.transformed_shape_hessians, offset, n_q_points);
- mapping.transform(make_array_view (fe_data.shape_grad_grads[i], offset, n_q_points),
+ mapping.transform(make_array_view (fe_data.shape_grad_grads, i, offset, n_q_points),
mapping_covariant_gradient, mapping_internal,
transformed_shape_hessians);