};
template <bool is_long>
- struct EvaluatorSelector<MatrixFreeFunctions::tensor_gausslobatto,is_long>
+ struct EvaluatorSelector<MatrixFreeFunctions::tensor_symmetric_collocation,is_long>
{
static const EvaluatorVariant variant = evaluate_evenodd;
};
* the template classes EvaluatorTensorProduct which in turn are selected
* from the MatrixFreeFunctions::ElementType template argument.
*
- * There are two specialized implementation classes FEEvaluationImplSpectral
- * (for Gauss-Lobatto elements where the 'values' operation is identity) and
- * FEEvaluationImplTransformSpectral (which can be transformed to a spectral
- * evaluation and uses the identity in these contexts), which both allow for
- * shorter code.
+ * There are two specialized implementation classes
+ * FEEvaluationImplCollocation (for Gauss-Lobatto elements where the nodal
+ * points and the quadrature points coincide and the 'values' operation is
+ * identity) and FEEvaluationImplTransformToCollocation (which can be
+ * transformed to a collocation space and can then use the identity in these
+ * spaces), which both allow for shorter code.
*
* @author Katharina Kormann, Martin Kronbichler, 2012, 2014, 2017
*/
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *hessians_quad[][(dim*(dim+1))/2],
VectorizedArray<Number> *scratch_data,
- const bool evaluate_val,
- const bool evaluate_grad,
- const bool evaluate_lapl);
+ const bool evaluate_values,
+ const bool evaluate_gradients,
+ const bool evaluate_hessians);
static
void integrate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *scratch_data,
- const bool evaluate_val,
- const bool evaluate_grad);
+ const bool evaluate_values,
+ const bool evaluate_gradients);
};
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *hessians_quad[][(dim*(dim+1))/2],
VectorizedArray<Number> *scratch_data,
- const bool evaluate_val,
- const bool evaluate_grad,
- const bool evaluate_lapl)
+ const bool evaluate_values,
+ const bool evaluate_gradients,
+ const bool evaluate_hessians)
{
- if (evaluate_val == false && evaluate_grad == false && evaluate_lapl == false)
+ if (evaluate_values == false && evaluate_gradients == false && evaluate_hessians == false)
return;
const EvaluatorVariant variant =
EvaluatorSelector<type,(fe_degree+n_q_points_1d>4)>::variant;
typedef EvaluatorTensorProduct<variant, dim, fe_degree, n_q_points_1d,
VectorizedArray<Number> > Eval;
- Eval eval (variant == evaluate_evenodd ? shape_info.shape_val_evenodd :
+ Eval eval (variant == evaluate_evenodd ? shape_info.shape_values_eo :
shape_info.shape_values,
- variant == evaluate_evenodd ? shape_info.shape_gra_evenodd :
+ variant == evaluate_evenodd ? shape_info.shape_gradients_eo :
shape_info.shape_gradients,
- variant == evaluate_evenodd ? shape_info.shape_hes_evenodd :
+ variant == evaluate_evenodd ? shape_info.shape_hessians_eo :
shape_info.shape_hessians,
shape_info.fe_degree,
shape_info.n_q_points_1d);
case 1:
for (unsigned int c=0; c<n_components; c++)
{
- if (evaluate_val == true)
+ if (evaluate_values == true)
eval.template values<0,true,false> (values_dofs[c], values_quad[c]);
- if (evaluate_grad == true)
+ if (evaluate_gradients == true)
eval.template gradients<0,true,false>(values_dofs[c], gradients_quad[c][0]);
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
eval.template hessians<0,true,false> (values_dofs[c], hessians_quad[c][0]);
}
break;
for (unsigned int c=0; c<n_components; c++)
{
// grad x
- if (evaluate_grad == true)
+ if (evaluate_gradients == true)
{
eval.template gradients<0,true,false> (values_dofs[c], temp1);
eval.template values<1,true,false> (temp1, gradients_quad[c][0]);
}
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
{
// grad xy
- if (evaluate_grad == false)
+ if (evaluate_gradients == false)
eval.template gradients<0,true,false>(values_dofs[c], temp1);
eval.template gradients<1,true,false> (temp1, hessians_quad[c][d1+d1]);
// grad y
eval.template values<0,true,false> (values_dofs[c], temp1);
- if (evaluate_grad == true)
+ if (evaluate_gradients == true)
eval.template gradients<1,true,false> (temp1, gradients_quad[c][d1]);
// grad yy
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
eval.template hessians<1,true,false> (temp1, hessians_quad[c][d1]);
// val: can use values applied in x
- if (evaluate_val == true)
+ if (evaluate_values == true)
eval.template values<1,true,false> (temp1, values_quad[c]);
}
break;
case 3:
for (unsigned int c=0; c<n_components; c++)
{
- if (evaluate_grad == true)
+ if (evaluate_gradients == true)
{
// grad x
eval.template gradients<0,true,false> (values_dofs[c], temp1);
eval.template values<2,true,false> (temp2, gradients_quad[c][0]);
}
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
{
// grad xz
- if (evaluate_grad == false)
+ if (evaluate_gradients == false)
{
eval.template gradients<0,true,false> (values_dofs[c], temp1);
eval.template values<1,true,false> (temp1, temp2);
// grad y
eval.template values<0,true,false> (values_dofs[c], temp1);
- if (evaluate_grad == true)
+ if (evaluate_gradients == true)
{
eval.template gradients<1,true,false>(temp1, temp2);
eval.template values<2,true,false> (temp2, gradients_quad[c][d1]);
}
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
{
// grad yz
- if (evaluate_grad == false)
+ if (evaluate_gradients == false)
eval.template gradients<1,true,false>(temp1, temp2);
eval.template gradients<2,true,false> (temp2, hessians_quad[c][d5]);
// grad z: can use the values applied in x direction stored in temp1
eval.template values<1,true,false> (temp1, temp2);
- if (evaluate_grad == true)
+ if (evaluate_gradients == true)
eval.template gradients<2,true,false> (temp2, gradients_quad[c][d2]);
// grad zz: can use the values applied in x and y direction stored
// in temp2
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
eval.template hessians<2,true,false>(temp2, hessians_quad[c][d2]);
// val: can use the values applied in x & y direction stored in temp2
- if (evaluate_val == true)
+ if (evaluate_values == true)
eval.template values<2,true,false> (temp2, values_quad[c]);
}
break;
// case additional dof for FE_Q_DG0: add values; gradients and second
// derivatives evaluate to zero
- if (type == MatrixFreeFunctions::tensor_symmetric_plus_dg0 && evaluate_val)
+ if (type == MatrixFreeFunctions::tensor_symmetric_plus_dg0 && evaluate_values)
for (unsigned int c=0; c<n_components; ++c)
for (unsigned int q=0; q<shape_info.n_q_points; ++q)
values_quad[c][q] += values_dofs[c][shape_info.dofs_per_cell-1];
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *scratch_data,
- const bool integrate_val,
- const bool integrate_grad)
+ const bool integrate_values,
+ const bool integrate_gradients)
{
const EvaluatorVariant variant =
EvaluatorSelector<type,(fe_degree+n_q_points_1d>4)>::variant;
typedef EvaluatorTensorProduct<variant, dim, fe_degree, n_q_points_1d,
VectorizedArray<Number> > Eval;
- Eval eval (variant == evaluate_evenodd ? shape_info.shape_val_evenodd :
+ Eval eval (variant == evaluate_evenodd ? shape_info.shape_values_eo :
shape_info.shape_values,
- variant == evaluate_evenodd ? shape_info.shape_gra_evenodd :
+ variant == evaluate_evenodd ? shape_info.shape_gradients_eo :
shape_info.shape_gradients,
- variant == evaluate_evenodd ? shape_info.shape_hes_evenodd :
+ variant == evaluate_evenodd ? shape_info.shape_hessians_eo :
shape_info.shape_hessians,
shape_info.fe_degree,
shape_info.n_q_points_1d);
case 1:
for (unsigned int c=0; c<n_components; c++)
{
- if (integrate_val == true)
+ if (integrate_values == true)
eval.template values<0,false,false> (values_quad[c], values_dofs[c]);
- if (integrate_grad == true)
+ if (integrate_gradients == true)
{
- if (integrate_val == true)
+ if (integrate_values == true)
eval.template gradients<0,false,true> (gradients_quad[c][0], values_dofs[c]);
else
eval.template gradients<0,false,false> (gradients_quad[c][0], values_dofs[c]);
case 2:
for (unsigned int c=0; c<n_components; c++)
{
- if (integrate_val == true)
+ if (integrate_values == true)
{
// val
eval.template values<0,false,false> (values_quad[c], temp1);
//grad x
- if (integrate_grad == true)
+ if (integrate_gradients == true)
eval.template gradients<0,false,true> (gradients_quad[c][0], temp1);
eval.template values<1,false,false>(temp1, values_dofs[c]);
}
- if (integrate_grad == true)
+ if (integrate_gradients == true)
{
// grad y
eval.template values<0,false,false> (gradients_quad[c][d1], temp1);
- if (integrate_val == false)
+ if (integrate_values == false)
{
eval.template gradients<1,false,false>(temp1, values_dofs[c]);
//grad x
case 3:
for (unsigned int c=0; c<n_components; c++)
{
- if (integrate_val == true)
+ if (integrate_values == true)
{
// val
eval.template values<0,false,false> (values_quad[c], temp1);
//grad x: can sum to temporary value in temp1
- if (integrate_grad == true)
+ if (integrate_gradients == true)
eval.template gradients<0,false,true> (gradients_quad[c][0], temp1);
eval.template values<1,false,false>(temp1, temp2);
- if (integrate_grad == true)
+ if (integrate_gradients == true)
{
eval.template values<0,false,false> (gradients_quad[c][d1], temp1);
eval.template gradients<1,false,true>(temp1, temp2);
}
eval.template values<2,false,false> (temp2, values_dofs[c]);
}
- else if (integrate_grad == true)
+ else if (integrate_gradients == true)
{
eval.template gradients<0,false,false>(gradients_quad[c][0], temp1);
eval.template values<1,false,false> (temp1, temp2);
eval.template gradients<1,false,true>(temp1, temp2);
eval.template values<2,false,false> (temp2, values_dofs[c]);
}
- if (integrate_grad == true)
+ if (integrate_gradients == true)
{
// grad z: can sum to temporary x and y value in output
eval.template values<0,false,false> (gradients_quad[c][d2], temp1);
// case FE_Q_DG0: add values, gradients and second derivatives are zero
if (type == MatrixFreeFunctions::tensor_symmetric_plus_dg0)
{
- if (integrate_val)
+ if (integrate_values)
for (unsigned int c=0; c<n_components; ++c)
{
values_dofs[c][shape_info.dofs_per_cell-1] = values_quad[c][0];
/**
* This struct performs the evaluation of function values, gradients and
- * Hessians for tensor-product finite elements. This a specialization for
- * symmetric basis functions with the same number of quadrature points as
- * degrees of freedom. In that case, we can first transform to a spectral
- * basis and then perform the evaluation of the first and second derivatives
- * in spectral space, using the identity operation for the shape values.
+ * Hessians for tensor-product finite elements. This a specialization for
+ * symmetric basis functions about the mid point 0.5 of the unit interval
+ * with the same number of quadrature points as degrees of freedom. In that
+ * case, we can first transform the basis to one that has the nodal points
+ * in the quadrature points (i.e., the collocation space) and then perform
+ * the evaluation of the first and second derivatives in this transformed
+ * space, using the identity operation for the shape values.
*
* @author Katharina Kormann, Martin Kronbichler, 2017
*/
template <int dim, int fe_degree, int n_components, typename Number>
- struct FEEvaluationImplTransformSpectral
+ struct FEEvaluationImplTransformToCollocation
{
static
void evaluate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *hessians_quad[][(dim*(dim+1))/2],
VectorizedArray<Number> *scratch_data,
- const bool evaluate_val,
- const bool evaluate_grad,
- const bool evaluate_lapl);
+ const bool evaluate_values,
+ const bool evaluate_gradients,
+ const bool evaluate_hessians);
static
void integrate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *scratch_data,
- const bool integrate_val,
- const bool integrate_grad);
+ const bool integrate_values,
+ const bool integrate_gradients);
};
template <int dim, int fe_degree, int n_components, typename Number>
inline
void
- FEEvaluationImplTransformSpectral<dim, fe_degree, n_components, Number>
+ FEEvaluationImplTransformToCollocation<dim, fe_degree, n_components, Number>
::evaluate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *values_dofs[],
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *hessians_quad[][(dim*(dim+1))/2],
VectorizedArray<Number> *,
const bool ,
- const bool evaluate_grad,
- const bool evaluate_lapl)
+ const bool evaluate_gradients,
+ const bool evaluate_hessians)
{
typedef EvaluatorTensorProduct<evaluate_evenodd, dim, fe_degree, fe_degree+1,
VectorizedArray<Number> > Eval;
- Eval eval_val (shape_info.shape_val_evenodd,
- shape_info.shape_gra_evenodd,
- shape_info.shape_hes_evenodd,
+ Eval eval_val (shape_info.shape_values_eo,
+ AlignedVector<VectorizedArray<Number> >(),
+ AlignedVector<VectorizedArray<Number> >(),
shape_info.fe_degree,
shape_info.n_q_points_1d);
- Eval eval(shape_info.shape_values,
- shape_info.shape_grad_spectral_eo,
- shape_info.shape_hessian_spectral_eo,
+ Eval eval(AlignedVector<VectorizedArray<Number> >(),
+ shape_info.shape_gradients_collocation_eo,
+ shape_info.shape_hessians_collocation_eo,
shape_info.fe_degree,
shape_info.n_q_points_1d);
for (unsigned int c=0; c<n_components; c++)
{
- // transform to spectral coordinates
+ // transform to the basis functions of the collocation space. use
+ // gradients_quad[c][0] as a temporary array (it gets overwritten by
+ // the gradient contributions later)
if (dim == 1)
eval_val.template values<0,true,false>(values_dofs[c], values_quad[c]);
else if (dim == 2)
eval_val.template values<2,true,false>(gradients_quad[c][0], values_quad[c]);
}
- // apply derivatives in spectral space
- if (evaluate_grad == true)
+ // apply derivatives in the collocation space
+ if (evaluate_gradients == true || evaluate_hessians == true)
{
eval.template gradients<0,true,false>(values_quad[c], gradients_quad[c][0]);
- if (dim >= 2)
+ if (dim > 1)
eval.template gradients<1,true,false>(values_quad[c], gradients_quad[c][d1]);
- if (dim >= 3)
+ if (dim > 2)
eval.template gradients<2,true,false>(values_quad[c], gradients_quad[c][d2]);
}
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
{
eval.template hessians<0,true,false> (values_quad[c], hessians_quad[c][0]);
if (dim > 1)
{
- eval.template gradients<0,true,false> (values_quad[c], hessians_quad[c][d2]);
- eval.template gradients<1,true,false> (hessians_quad[c][d2], hessians_quad[c][d3]);
+ // re-use grad_x already in gradients
+ eval.template gradients<1,true,false> (gradients_quad[c][0], hessians_quad[c][d3]);
eval.template hessians<1,true,false> (values_quad[c], hessians_quad[c][d1]);
}
if (dim > 2)
{
- // note that grad x is already in hessians_quad[c][d2]
- eval.template gradients<2,true,false> (hessians_quad[c][d2], hessians_quad[c][d4]);
-
- eval.template gradients<1,true,false> (values_quad[c], hessians_quad[c][d2]);
- eval.template gradients<2,true,false> (hessians_quad[c][d2], hessians_quad[c][d5]);
+ // re-use grad_x and grad_y already in gradients
+ eval.template gradients<2,true,false> (gradients_quad[c][0], hessians_quad[c][d4]);
+ eval.template gradients<2,true,false> (gradients_quad[c][d1], hessians_quad[c][d5]);
eval.template hessians<2,true,false> (values_quad[c], hessians_quad[c][d2]);
}
}
template <int dim, int fe_degree, int n_components, typename Number>
inline
void
- FEEvaluationImplTransformSpectral<dim, fe_degree, n_components, Number>
+ FEEvaluationImplTransformToCollocation<dim, fe_degree, n_components, Number>
::integrate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *values_dofs[],
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *,
- const bool integrate_val,
- const bool integrate_grad)
+ const bool integrate_values,
+ const bool integrate_gradients)
{
typedef EvaluatorTensorProduct<evaluate_evenodd, dim, fe_degree, fe_degree+1,
VectorizedArray<Number> > Eval;
- Eval eval_val (shape_info.shape_val_evenodd,
- shape_info.shape_gra_evenodd,
- shape_info.shape_hes_evenodd,
+ Eval eval_val (shape_info.shape_values_eo,
+ AlignedVector<VectorizedArray<Number> >(),
+ AlignedVector<VectorizedArray<Number> >(),
shape_info.fe_degree,
shape_info.n_q_points_1d);
- Eval eval(shape_info.shape_values,
- shape_info.shape_grad_spectral_eo,
- shape_info.shape_hessian_spectral_eo,
+ Eval eval(AlignedVector<VectorizedArray<Number> >(),
+ shape_info.shape_gradients_collocation_eo,
+ shape_info.shape_hessians_collocation_eo,
shape_info.fe_degree,
shape_info.n_q_points_1d);
for (unsigned int c=0; c<n_components; c++)
{
- // apply derivatives in spectral space
- if (integrate_grad == true)
+ // apply derivatives in collocation space
+ if (integrate_gradients == true)
{
- if (integrate_val)
+ if (integrate_values)
eval.template gradients<0,false,true>(gradients_quad[c][0], values_quad[c]);
else
eval.template gradients<0,false,false>(gradients_quad[c][0], values_quad[c]);
- if (dim >= 2)
+ if (dim > 1)
eval.template gradients<1,false,true>(gradients_quad[c][d1], values_quad[c]);
- if (dim >= 3)
+ if (dim > 2)
eval.template gradients<2,false,true>(gradients_quad[c][d2], values_quad[c]);
}
- // transform back to the usual space
+ // transform back to the original space
if (dim == 1)
eval_val.template values<0,false,false>(values_quad[c], values_dofs[c]);
else if (dim == 2)
/**
* This struct performs the evaluation of function values, gradients and
- * Hessians for tensor-product finite elements. This a specialization for
- * "spectral" elements like Gauss-Lobatto elements where the 'values'
- * operation is identity, which allows us to write shorter code.
+ * Hessians for tensor-product finite elements. This a specialization for
+ * elements where the nodal points coincide with the quadrature points like
+ * FE_Q shape functions on Gauss-Lobatto elements integrated with
+ * Gauss-Lobatto quadrature. The assumption of this class is that the shape
+ * 'values' operation is identity, which allows us to write shorter code.
+ *
+ * In literature, this form of evaluation is often called spectral
+ * evaluation, spectral collocation or simply collocation, meaning the same
+ * location for shape functions and evaluation space (quadrature points).
*
* @author Katharina Kormann, 2012
*/
template <int dim, int fe_degree, int n_components, typename Number>
- struct FEEvaluationImplSpectral
+ struct FEEvaluationImplCollocation
{
static
void evaluate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *hessians_quad[][(dim*(dim+1))/2],
VectorizedArray<Number> *scratch_data,
- const bool evaluate_val,
- const bool evaluate_grad,
- const bool evaluate_lapl);
+ const bool evaluate_values,
+ const bool evaluate_gradients,
+ const bool evaluate_hessians);
static
void integrate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *scratch_data,
- const bool integrate_val,
- const bool integrate_grad);
+ const bool integrate_values,
+ const bool integrate_gradients);
};
template <int dim, int fe_degree, int n_components, typename Number>
inline
void
- FEEvaluationImplSpectral<dim, fe_degree, n_components, Number>
+ FEEvaluationImplCollocation<dim, fe_degree, n_components, Number>
::evaluate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *values_dofs[],
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *hessians_quad[][(dim*(dim+1))/2],
VectorizedArray<Number> *,
- const bool evaluate_val,
- const bool evaluate_grad,
- const bool evaluate_lapl)
+ const bool evaluate_values,
+ const bool evaluate_gradients,
+ const bool evaluate_hessians)
{
typedef EvaluatorTensorProduct<evaluate_evenodd, dim, fe_degree, fe_degree+1,
VectorizedArray<Number> > Eval;
- Eval eval (shape_info.shape_val_evenodd,
- shape_info.shape_gra_evenodd,
- shape_info.shape_hes_evenodd,
- shape_info.fe_degree,
- shape_info.n_q_points_1d);
+ Eval eval(AlignedVector<VectorizedArray<Number> >(),
+ shape_info.shape_gradients_eo,
+ shape_info.shape_hessians_eo,
+ shape_info.fe_degree,
+ shape_info.n_q_points_1d);
// These avoid compiler warnings; they are only used in sensible context
// but compilers typically cannot detect when we access something like
for (unsigned int c=0; c<n_components; c++)
{
- if (evaluate_val == true)
+ if (evaluate_values == true)
for (unsigned int i=0; i<Eval::dofs_per_cell; ++i)
values_quad[c][i] = values_dofs[c][i];
- if (evaluate_grad == true)
+ if (evaluate_gradients == true || evaluate_hessians == true)
{
eval.template gradients<0,true,false>(values_dofs[c], gradients_quad[c][0]);
- if (dim >= 2)
+ if (dim > 1)
eval.template gradients<1,true,false>(values_dofs[c], gradients_quad[c][d1]);
- if (dim >= 3)
+ if (dim > 2)
eval.template gradients<2,true,false>(values_dofs[c], gradients_quad[c][d2]);
}
- if (evaluate_lapl == true)
+ if (evaluate_hessians == true)
{
eval.template hessians<0,true,false> (values_quad[c], hessians_quad[c][0]);
if (dim > 1)
{
- eval.template gradients<0,true,false> (values_dofs[c], hessians_quad[c][d2]);
- eval.template gradients<1,true,false> (hessians_quad[c][d2], hessians_quad[c][d3]);
+ // re-use grad_x already in gradients
+ eval.template gradients<1,true,false> (gradients_quad[c][0], hessians_quad[c][d3]);
eval.template hessians<1,true,false> (values_dofs[c], hessians_quad[c][d1]);
}
if (dim > 2)
{
- // note that grad x is already in hessians_quad[c][d2]
- eval.template gradients<2,true,false> (hessians_quad[c][d2], hessians_quad[c][d4]);
-
- eval.template gradients<1,true,false> (values_dofs[c], hessians_quad[c][d2]);
- eval.template gradients<2,true,false> (hessians_quad[c][d2], hessians_quad[c][d5]);
+ // re-use grad_x already in gradients
+ eval.template gradients<2,true,false> (gradients_quad[c][0], hessians_quad[c][d4]);
+ eval.template gradients<2,true,false> (gradients_quad[c][d1], hessians_quad[c][d5]);
eval.template hessians<2,true,false> (values_dofs[c], hessians_quad[c][d2]);
}
}
template <int dim, int fe_degree, int n_components, typename Number>
inline
void
- FEEvaluationImplSpectral<dim, fe_degree, n_components, Number>
+ FEEvaluationImplCollocation<dim, fe_degree, n_components, Number>
::integrate (const MatrixFreeFunctions::ShapeInfo<Number> &shape_info,
VectorizedArray<Number> *values_dofs[],
VectorizedArray<Number> *values_quad[],
VectorizedArray<Number> *gradients_quad[][dim],
VectorizedArray<Number> *,
- const bool integrate_val,
- const bool integrate_grad)
+ const bool integrate_values,
+ const bool integrate_gradients)
{
typedef EvaluatorTensorProduct<evaluate_evenodd, dim, fe_degree, fe_degree+1,
VectorizedArray<Number> > Eval;
- Eval eval (shape_info.shape_val_evenodd,
- shape_info.shape_gra_evenodd,
- shape_info.shape_hes_evenodd,
- shape_info.fe_degree,
- shape_info.n_q_points_1d);
+ Eval eval(AlignedVector<VectorizedArray<Number> >(),
+ shape_info.shape_gradients_eo,
+ shape_info.shape_hessians_eo,
+ shape_info.fe_degree,
+ shape_info.n_q_points_1d);
// These avoid compiler warnings; they are only used in sensible context
// but compilers typically cannot detect when we access something like
for (unsigned int c=0; c<n_components; c++)
{
- if (integrate_val == true)
+ if (integrate_values == true)
for (unsigned int i=0; i<Eval::dofs_per_cell; ++i)
values_dofs[c][i] = values_quad[c][i];
- if (integrate_grad == true)
+ if (integrate_gradients == true)
{
- if (integrate_val == true)
+ if (integrate_values == true)
eval.template gradients<0,false,true>(gradients_quad[c][0], values_dofs[c]);
else
eval.template gradients<0,false,false>(gradients_quad[c][0], values_dofs[c]);
- if (dim >= 2)
+ if (dim > 1)
eval.template gradients<1,false,true>(gradients_quad[c][d1], values_dofs[c]);
- if (dim >= 3)
+ if (dim > 2)
eval.template gradients<2,false,true>(gradients_quad[c][d2], values_dofs[c]);
}
}