15#ifndef dealii_integrators_divergence_h
16#define dealii_integrators_divergence_h
58 const unsigned int n_dofs = fe.dofs_per_cell;
65 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
67 const double dx = fe.JxW(
k) * factor;
68 for (
unsigned int i = 0; i <
t_dofs; ++i)
70 const double vv =
fetest.shape_value(i,
k);
71 for (
unsigned int d = 0; d < dim; ++d)
72 for (
unsigned int j = 0;
j < n_dofs; ++
j)
74 const double du = fe.shape_grad_component(
j,
k, d)[d];
90 template <
int dim,
typename number>
95 const double factor = 1.)
103 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
105 const double dx = factor *
fetest.JxW(
k);
107 for (
unsigned int i = 0; i <
t_dofs; ++i)
108 for (
unsigned int d = 0; d < dim; ++d)
123 template <
int dim,
typename number>
127 const ArrayView<
const std::vector<double>> &input,
128 const double factor = 1.)
136 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
138 const double dx = factor *
fetest.JxW(
k);
140 for (
unsigned int i = 0; i <
t_dofs; ++i)
141 for (
unsigned int d = 0; d < dim; ++d)
162 const unsigned int n_dofs = fe.dofs_per_cell;
169 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
171 const double dx = fe.JxW(
k) * factor;
172 for (
unsigned int d = 0; d < dim; ++d)
173 for (
unsigned int i = 0; i <
t_dofs; ++i)
175 const double vv =
fetest.shape_value_component(i,
k, d);
176 for (
unsigned int j = 0;
j < n_dofs; ++
j)
179 M(i,
j) += dx *
vv *
Du[d];
194 template <
int dim,
typename number>
199 const double factor = 1.)
207 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
209 const double dx = factor *
fetest.JxW(
k);
211 for (
unsigned int i = 0; i <
t_dofs; ++i)
212 for (
unsigned int d = 0; d < dim; ++d)
214 dx * input[
k][d] *
fetest.shape_value_component(i,
k, d);
227 template <
int dim,
typename number>
231 const std::vector<double> &input,
232 const double factor = 1.)
240 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
242 const double dx = factor *
fetest.JxW(
k);
244 for (
unsigned int i = 0; i <
t_dofs; ++i)
245 for (
unsigned int d = 0; d < dim; ++d)
247 dx * input[
k] *
fetest.shape_grad_component(i,
k, d)[d];
263 const unsigned int n_dofs = fe.dofs_per_cell;
271 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
274 for (
unsigned int i = 0; i <
t_dofs; ++i)
275 for (
unsigned int j = 0;
j < n_dofs; ++
j)
276 for (
unsigned int d = 0; d < dim; ++d)
277 M(i,
j) +=
ndx[d] * fe.shape_value_component(
j,
k, d) *
289 template <
int dim,
typename number>
304 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
308 for (
unsigned int i = 0; i <
t_dofs; ++i)
309 for (
unsigned int d = 0; d < dim; ++d)
321 template <
int dim,
typename number>
325 const std::vector<double> &
data,
334 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
339 for (
unsigned int i = 0; i <
t_dofs; ++i)
340 for (
unsigned int d = 0; d < dim; ++d)
367 const unsigned int n_dofs =
fe1.dofs_per_cell;
383 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
385 const double dx = factor *
fe1.JxW(
k);
386 for (
unsigned int i = 0; i <
t_dofs; ++i)
387 for (
unsigned int j = 0;
j < n_dofs; ++
j)
388 for (
unsigned int d = 0; d < dim; ++d)
390 const double un1 =
fe1.shape_value_component(
j,
k, d) *
391 fe1.normal_vector(
k)[d];
392 const double un2 = -
fe2.shape_value_component(
j,
k, d) *
393 fe1.normal_vector(
k)[d];
424 const unsigned int n_dofs =
fe1.dofs_per_cell;
437 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
439 const double dx = factor *
fe1.JxW(
k);
440 for (
unsigned int i = 0; i < n_dofs; ++i)
441 for (
unsigned int j = 0;
j < n_dofs; ++
j)
442 for (
unsigned int d = 0; d < dim; ++d)
444 const double un1 =
fe1.shape_value_component(
j,
k, d) *
445 fe1.normal_vector(
k)[d];
446 const double un2 = -
fe2.shape_value_component(
j,
k, d) *
447 fe1.normal_vector(
k)[d];
448 const double vn1 =
fe1.shape_value_component(i,
k, d) *
449 fe1.normal_vector(
k)[d];
450 const double vn2 = -
fe2.shape_value_component(i,
k, d) *
451 fe1.normal_vector(
k)[d];
478 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
481 for (
unsigned int d = 1; d < dim; ++d)
#define DEAL_II_DEPRECATED
#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)
std::vector< index_type > data
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.