36 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
38 typedef CellIntegrator<dim, dim, Number> IntegratorCell;
40 typedef std::pair<unsigned int, unsigned int> Range;
47 apply(dealii::MatrixFree<dim, Number>
const & matrix_free,
49 std::shared_ptr<dealii::Function<dim>>
const function,
53 this->dof_index = inverse_mass_operator_data.dof_index;
54 this->quad_index = inverse_mass_operator_data.quad_index;
55 this->function = function;
60 matrix_free.cell_loop(&VelocityProjection<dim, Number>::cell_loop,
this, vector, src);
64 inverse_mass.initialize(matrix_free, inverse_mass_operator_data);
65 inverse_mass.apply(vector, vector);
70 cell_loop(dealii::MatrixFree<dim, Number>
const & matrix_free,
72 VectorType
const & src,
73 Range
const & cell_range)
const
77 IntegratorCell integrator(matrix_free, dof_index, quad_index);
79 for(
unsigned int cell = cell_range.first; cell < cell_range.second; ++cell)
81 integrator.reinit(cell);
83 for(
unsigned int q = 0; q < integrator.n_q_points; ++q)
85 integrator.submit_value(
86 FunctionEvaluator<1, dim, Number>::value(*function, integrator.quadrature_point(q), time),
90 integrator.integrate(dealii::EvaluationFlags::values);
92 integrator.distribute_local_to_global(dst);
96 unsigned int dof_index;
97 unsigned int quad_index;
98 std::shared_ptr<dealii::Function<dim>> function;