16#ifndef dealii_integrators_divergence_h
17#define dealii_integrators_divergence_h
59 const unsigned int n_dofs = fe.dofs_per_cell;
66 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
68 const double dx = fe.JxW(
k) * factor;
69 for (
unsigned int i = 0; i <
t_dofs; ++i)
71 const double vv =
fetest.shape_value(i,
k);
72 for (
unsigned int d = 0; d < dim; ++d)
73 for (
unsigned int j = 0;
j < n_dofs; ++
j)
75 const double du = fe.shape_grad_component(
j,
k, d)[d];
91 template <
int dim,
typename number>
96 const double factor = 1.)
104 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
106 const double dx = factor *
fetest.JxW(
k);
108 for (
unsigned int i = 0; i <
t_dofs; ++i)
109 for (
unsigned int d = 0; d < dim; ++d)
124 template <
int dim,
typename number>
128 const ArrayView<
const std::vector<double>> &input,
129 const double factor = 1.)
137 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
139 const double dx = factor *
fetest.JxW(
k);
141 for (
unsigned int i = 0; i <
t_dofs; ++i)
142 for (
unsigned int d = 0; d < dim; ++d)
163 const unsigned int n_dofs = fe.dofs_per_cell;
170 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
172 const double dx = fe.JxW(
k) * factor;
173 for (
unsigned int d = 0; d < dim; ++d)
174 for (
unsigned int i = 0; i <
t_dofs; ++i)
176 const double vv =
fetest.shape_value_component(i,
k, d);
177 for (
unsigned int j = 0;
j < n_dofs; ++
j)
180 M(i,
j) += dx *
vv *
Du[d];
195 template <
int dim,
typename number>
200 const double factor = 1.)
208 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
210 const double dx = factor *
fetest.JxW(
k);
212 for (
unsigned int i = 0; i <
t_dofs; ++i)
213 for (
unsigned int d = 0; d < dim; ++d)
215 dx * input[
k][d] *
fetest.shape_value_component(i,
k, d);
228 template <
int dim,
typename number>
232 const std::vector<double> &input,
233 const double factor = 1.)
241 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
243 const double dx = factor *
fetest.JxW(
k);
245 for (
unsigned int i = 0; i <
t_dofs; ++i)
246 for (
unsigned int d = 0; d < dim; ++d)
248 dx * input[
k] *
fetest.shape_grad_component(i,
k, d)[d];
264 const unsigned int n_dofs = fe.dofs_per_cell;
272 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
275 for (
unsigned int i = 0; i <
t_dofs; ++i)
276 for (
unsigned int j = 0;
j < n_dofs; ++
j)
277 for (
unsigned int d = 0; d < dim; ++d)
278 M(i,
j) +=
ndx[d] * fe.shape_value_component(
j,
k, d) *
290 template <
int dim,
typename number>
295 const ArrayView<
const std::vector<double>> &data,
305 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
309 for (
unsigned int i = 0; i <
t_dofs; ++i)
310 for (
unsigned int d = 0; d < dim; ++d)
322 template <
int dim,
typename number>
326 const std::vector<double> &data,
335 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
340 for (
unsigned int i = 0; i <
t_dofs; ++i)
341 for (
unsigned int d = 0; d < dim; ++d)
343 ndx[d] *
fetest.shape_value_component(i,
k, d) * data[
k];
368 const unsigned int n_dofs =
fe1.dofs_per_cell;
384 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
386 const double dx = factor *
fe1.JxW(
k);
387 for (
unsigned int i = 0; i <
t_dofs; ++i)
388 for (
unsigned int j = 0;
j < n_dofs; ++
j)
389 for (
unsigned int d = 0; d < dim; ++d)
391 const double un1 =
fe1.shape_value_component(
j,
k, d) *
392 fe1.normal_vector(
k)[d];
393 const double un2 = -
fe2.shape_value_component(
j,
k, d) *
394 fe1.normal_vector(
k)[d];
425 const unsigned int n_dofs =
fe1.dofs_per_cell;
438 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
440 const double dx = factor *
fe1.JxW(
k);
441 for (
unsigned int i = 0; i < n_dofs; ++i)
442 for (
unsigned int j = 0;
j < n_dofs; ++
j)
443 for (
unsigned int d = 0; d < dim; ++d)
445 const double un1 =
fe1.shape_value_component(
j,
k, d) *
446 fe1.normal_vector(
k)[d];
447 const double un2 = -
fe2.shape_value_component(
j,
k, d) *
448 fe1.normal_vector(
k)[d];
449 const double vn1 =
fe1.shape_value_component(i,
k, d) *
450 fe1.normal_vector(
k)[d];
451 const double vn2 = -
fe2.shape_value_component(i,
k, d) *
452 fe1.normal_vector(
k)[d];
479 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
482 for (
unsigned int d = 1; d < dim; ++d)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertVectorVectorDimension(VEC, DIM1, DIM2)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void u_times_n_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const std::vector< double > &data, double factor=1.)
double norm(const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim > > > &Du)
void cell_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< Tensor< 1, dim > > > &input, const double factor=1.)
void u_dot_n_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
void gradient_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const std::vector< Tensor< 1, dim > > &input, const double factor=1.)
void u_dot_n_residual(Vector< number > &result, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< double > > &data, double factor=1.)
void u_dot_n_jump_matrix(FullMatrix< double > &M11, FullMatrix< double > &M12, FullMatrix< double > &M21, FullMatrix< double > &M22, const FEValuesBase< dim > &fe1, const FEValuesBase< dim > &fe2, double factor=1.)
void gradient_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
Library of integrals over cells and faces.