35 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
37 typedef CellIntegrator<dim, dim, Number> IntegratorCell;
39 typedef std::pair<unsigned int, unsigned int> Range;
46 apply(dealii::MatrixFree<dim, Number>
const & matrix_free,
48 std::shared_ptr<dealii::Function<dim>>
const function,
52 this->dof_index = inverse_mass_operator_data.dof_index;
53 this->quad_index = inverse_mass_operator_data.quad_index;
54 this->function = function;
59 matrix_free.cell_loop(&VelocityProjection<dim, Number>::cell_loop,
this, vector, src);
63 inverse_mass.initialize(matrix_free, inverse_mass_operator_data);
64 inverse_mass.apply(vector, vector);
69 cell_loop(dealii::MatrixFree<dim, Number>
const & matrix_free,
71 VectorType
const & src,
72 Range
const & cell_range)
const
76 IntegratorCell integrator(matrix_free, dof_index, quad_index);
78 for(
unsigned int cell = cell_range.first; cell < cell_range.second; ++cell)
80 integrator.reinit(cell);
82 for(
unsigned int q = 0; q < integrator.n_q_points; ++q)
84 integrator.submit_value(
85 FunctionEvaluator<1, dim, Number>::value(*function, integrator.quadrature_point(q), time),
89 integrator.integrate(dealii::EvaluationFlags::values);
91 integrator.distribute_local_to_global(dst);
95 unsigned int dof_index;
96 unsigned int quad_index;
97 std::shared_ptr<dealii::Function<dim>> function;