50 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
52 typedef dealii::VectorizedArray<Number> scalar;
54 typedef FaceIntegrator<dim, n_components, Number> IntegratorFace;
57 LaplaceKernel() : degree(1), tau(dealii::make_vectorized_array<Number>(0.0))
62 reinit(dealii::MatrixFree<dim, Number>
const & matrix_free,
64 unsigned int const dof_index)
68 dealii::FiniteElement<dim>
const & fe = matrix_free.get_dof_handler(dof_index).get_fe();
71 calculate_penalty_parameter(matrix_free, dof_index);
75 calculate_penalty_parameter(dealii::MatrixFree<dim, Number>
const & matrix_free,
76 unsigned int const dof_index)
78 IP::calculate_penalty_parameter<dim, Number>(array_penalty_parameter, matrix_free, dof_index);
82 get_integrator_flags(
bool const is_dg)
const
86 flags.cell_evaluate = dealii::EvaluationFlags::gradients;
87 flags.cell_integrate = dealii::EvaluationFlags::gradients;
91 flags.face_evaluate = dealii::EvaluationFlags::values | dealii::EvaluationFlags::gradients;
92 flags.face_integrate = dealii::EvaluationFlags::values | dealii::EvaluationFlags::gradients;
97 flags.face_evaluate = dealii::EvaluationFlags::nothing;
98 flags.face_integrate = dealii::EvaluationFlags::values;
105 get_mapping_flags(
bool const compute_interior_face_integrals,
106 bool const compute_boundary_face_integrals)
110 flags.cells = dealii::update_gradients | dealii::update_JxW_values;
112 if(compute_interior_face_integrals)
115 dealii::update_gradients | dealii::update_JxW_values | dealii::update_normal_vectors;
118 if(compute_boundary_face_integrals)
120 flags.boundary_faces = dealii::update_gradients | dealii::update_JxW_values |
121 dealii::update_normal_vectors | dealii::update_quadrature_points;
128 reinit_face(IntegratorFace & integrator_m,
129 IntegratorFace & integrator_p,
130 unsigned int const dof_index)
const
132 tau = std::max(integrator_m.read_cell_data(array_penalty_parameter),
133 integrator_p.read_cell_data(array_penalty_parameter)) *
134 IP::get_penalty_factor<dim, Number>(
137 integrator_m.get_matrix_free().get_dof_handler(dof_index).get_triangulation()),
142 reinit_boundary_face(IntegratorFace & integrator_m,
unsigned int const dof_index)
const
144 tau = integrator_m.read_cell_data(array_penalty_parameter) *
145 IP::get_penalty_factor<dim, Number>(
148 integrator_m.get_matrix_free().get_dof_handler(dof_index).get_triangulation()),
153 reinit_face_cell_based(dealii::types::boundary_id
const boundary_id,
154 IntegratorFace & integrator_m,
155 IntegratorFace & integrator_p,
156 unsigned int const dof_index)
const
158 if(boundary_id == dealii::numbers::internal_face_boundary_id)
160 tau = std::max(integrator_m.read_cell_data(array_penalty_parameter),
161 integrator_p.read_cell_data(array_penalty_parameter)) *
162 IP::get_penalty_factor<dim, Number>(
165 integrator_m.get_matrix_free().get_dof_handler(dof_index).get_triangulation()),
170 tau = integrator_m.read_cell_data(array_penalty_parameter) *
171 IP::get_penalty_factor<dim, Number>(
174 integrator_m.get_matrix_free().get_dof_handler(dof_index).get_triangulation()),
180 inline DEAL_II_ALWAYS_INLINE
182 calculate_gradient_flux(T
const & value_m, T
const & value_p)
const
184 return -0.5 * (value_m - value_p);
188 inline DEAL_II_ALWAYS_INLINE
190 calculate_value_flux(T
const & normal_gradient_m,
191 T
const & normal_gradient_p,
193 T
const & value_p)
const
195 return 0.5 * (normal_gradient_m + normal_gradient_p) - tau * (value_m - value_p);
203 dealii::AlignedVector<scalar> array_penalty_parameter;
231 static unsigned int const rank =
232 (n_components == 1) ? 0 : ((n_components == dim) ? 1 : dealii::numbers::invalid_unsigned_int);
234 typedef OperatorBase<dim, Number, n_components> Base;
237 typedef typename Base::IntegratorCell IntegratorCell;
238 typedef typename Base::IntegratorFace IntegratorFace;
240 typedef typename Base::Range Range;
242 typedef dealii::Tensor<rank, dim, dealii::VectorizedArray<Number>> value;
244 typedef typename Base::VectorType VectorType;
247 typedef Number value_type;
250 initialize(dealii::MatrixFree<dim, Number>
const & matrix_free,
251 dealii::AffineConstraints<Number>
const & affine_constraints,
257 return operator_data;
261 calculate_penalty_parameter(dealii::MatrixFree<dim, Number>
const & matrix_free,
262 unsigned int const dof_index);
265 update_penalty_parameter();
270 set_inhomogeneous_boundary_values(VectorType & solution)
const final;
277 rhs_add_dirichlet_bc_from_dof_vector(VectorType & dst, VectorType
const & src)
const;
281 reinit_face_derived(IntegratorFace & integrator_m,
282 IntegratorFace & integrator_p,
283 unsigned int const face)
const final;
286 reinit_boundary_face_derived(IntegratorFace & integrator_m,
unsigned int const face)
const final;
289 reinit_face_cell_based_derived(IntegratorFace & integrator_m,
290 IntegratorFace & integrator_p,
291 unsigned int const cell,
292 unsigned int const face,
293 dealii::types::boundary_id
const boundary_id)
const final;
296 do_cell_integral(IntegratorCell & integrator)
const final;
299 do_face_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const final;
302 do_face_int_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const final;
305 do_face_ext_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const final;
308 do_boundary_integral(IntegratorFace & integrator_m,
309 OperatorType
const & operator_type,
310 dealii::types::boundary_id
const & boundary_id)
const final;
313 cell_loop_empty(dealii::MatrixFree<dim, Number>
const & matrix_free,
315 VectorType
const & src,
316 Range
const & range)
const;
319 face_loop_empty(dealii::MatrixFree<dim, Number>
const & matrix_free,
321 VectorType
const & src,
322 Range
const & range)
const;
326 boundary_face_loop_inhom_operator_dirichlet_bc_from_dof_vector(
327 dealii::MatrixFree<dim, Number>
const & matrix_free,
329 VectorType
const & src,
330 Range
const & range)
const;
334 do_boundary_integral_dirichlet_bc_from_dof_vector(
335 IntegratorFace & integrator_m,
336 OperatorType
const & operator_type,
337 dealii::types::boundary_id
const & boundary_id)
const;
341 do_boundary_integral_continuous(IntegratorFace & integrator_m,
342 dealii::types::boundary_id
const & boundary_id)
const final;