/**
* Helper class containing the cell-wise prolongation operation.
*/
- template <int dim, typename Number>
+ template <int dim, typename Number, typename Number2>
class CellProlongator
{
public:
CellProlongator(const AlignedVector<Number> &prolongation_matrix,
const AlignedVector<Number> &prolongation_matrix_1d,
- const Number *evaluation_data_coarse,
- Number *evaluation_data_fine)
+ const Number2 *evaluation_data_coarse,
+ Number2 *evaluation_data_fine)
: prolongation_matrix(prolongation_matrix)
, prolongation_matrix_1d(prolongation_matrix_1d)
, evaluation_data_coarse(evaluation_data_coarse)
private:
const AlignedVector<Number> &prolongation_matrix;
const AlignedVector<Number> &prolongation_matrix_1d;
- const Number *evaluation_data_coarse;
- Number *evaluation_data_fine;
+ const Number2 *evaluation_data_coarse;
+ Number2 *evaluation_data_fine;
};
/**
* Helper class containing the cell-wise restriction operation.
*/
- template <int dim, typename Number>
+ template <int dim, typename Number, typename Number2>
class CellRestrictor
{
public:
CellRestrictor(const AlignedVector<Number> &prolongation_matrix,
const AlignedVector<Number> &prolongation_matrix_1d,
- Number *evaluation_data_fine,
- Number *evaluation_data_coarse)
+ Number2 *evaluation_data_fine,
+ Number2 *evaluation_data_coarse)
: prolongation_matrix(prolongation_matrix)
, prolongation_matrix_1d(prolongation_matrix_1d)
, evaluation_data_fine(evaluation_data_fine)
private:
const AlignedVector<Number> &prolongation_matrix;
const AlignedVector<Number> &prolongation_matrix_1d;
- Number *evaluation_data_fine;
- Number *evaluation_data_coarse;
+ Number2 *evaluation_data_fine;
+ Number2 *evaluation_data_coarse;
};
class CellProlongatorTest
if (needs_interpolation)
for (int c = n_components - 1; c >= 0; --c)
{
- CellProlongator<dim, VectorizedArrayType> cell_prolongator(
- scheme.prolongation_matrix,
- scheme.prolongation_matrix_1d,
- evaluation_data_coarse.begin() + c * n_scalar_dofs_coarse,
- evaluation_data_fine.begin() + c * n_scalar_dofs_fine);
+ CellProlongator<dim, double, VectorizedArrayType>
+ cell_prolongator(scheme.prolongation_matrix,
+ scheme.prolongation_matrix_1d,
+ evaluation_data_coarse.begin() +
+ c * n_scalar_dofs_coarse,
+ evaluation_data_fine.begin() +
+ c * n_scalar_dofs_fine);
if (scheme.prolongation_matrix_1d.size() > 0)
cell_transfer.run(cell_prolongator);
if (needs_interpolation)
for (int c = n_components - 1; c >= 0; --c)
{
- CellRestrictor<dim, VectorizedArrayType> cell_restrictor(
- scheme.prolongation_matrix,
- scheme.prolongation_matrix_1d,
- evaluation_data_fine.begin() + c * n_scalar_dofs_fine,
- evaluation_data_coarse.begin() + c * n_scalar_dofs_coarse);
+ CellRestrictor<dim, double, VectorizedArrayType>
+ cell_restrictor(scheme.prolongation_matrix,
+ scheme.prolongation_matrix_1d,
+ evaluation_data_fine.begin() +
+ c * n_scalar_dofs_fine,
+ evaluation_data_coarse.begin() +
+ c * n_scalar_dofs_coarse);
if (scheme.prolongation_matrix_1d.size() > 0)
cell_transfer.run(cell_restrictor);
if (needs_interpolation)
for (int c = n_components - 1; c >= 0; --c)
{
- CellRestrictor<dim, VectorizedArrayType> cell_restrictor(
- scheme.restriction_matrix,
- scheme.restriction_matrix_1d,
- evaluation_data_fine.begin() + c * n_scalar_dofs_fine,
- evaluation_data_coarse.begin() + c * n_scalar_dofs_coarse);
+ CellRestrictor<dim, double, VectorizedArrayType>
+ cell_restrictor(scheme.restriction_matrix,
+ scheme.restriction_matrix_1d,
+ evaluation_data_fine.begin() +
+ c * n_scalar_dofs_fine,
+ evaluation_data_coarse.begin() +
+ c * n_scalar_dofs_coarse);
if (scheme.restriction_matrix_1d.size() > 0)
cell_transfer.run(cell_restrictor);