13#ifndef dealii_integrators_divergence_h
14#define dealii_integrators_divergence_h
65 const double dx = fe.
JxW(k) * factor;
66 for (
unsigned int i = 0; i < t_dofs; ++i)
69 for (
unsigned int d = 0; d < dim; ++d)
70 for (
unsigned int j = 0; j < n_dofs; ++j)
73 M(i, j) += dx * du * vv;
88 template <
int dim,
typename number>
93 const double factor = 1.)
103 const double dx = factor * fetest.
JxW(k);
105 for (
unsigned int i = 0; i < t_dofs; ++i)
106 for (
unsigned int d = 0; d < dim; ++d)
107 result(i) += dx * input[d][k][d] * fetest.
shape_value(i, k);
121 template <
int dim,
typename number>
125 const ArrayView<
const std::vector<double>> &input,
126 const double factor = 1.)
136 const double dx = factor * fetest.
JxW(k);
138 for (
unsigned int i = 0; i < t_dofs; ++i)
139 for (
unsigned int d = 0; d < dim; ++d)
140 result(i) -= dx * input[d][k] * fetest.
shape_grad(i, k)[d];
169 const double dx = fe.
JxW(k) * factor;
170 for (
unsigned int d = 0; d < dim; ++d)
171 for (
unsigned int i = 0; i < t_dofs; ++i)
174 for (
unsigned int j = 0; j < n_dofs; ++j)
177 M(i, j) += dx * vv * Du[d];
192 template <
int dim,
typename number>
197 const double factor = 1.)
207 const double dx = factor * fetest.
JxW(k);
209 for (
unsigned int i = 0; i < t_dofs; ++i)
210 for (
unsigned int d = 0; d < dim; ++d)
225 template <
int dim,
typename number>
229 const std::vector<double> &input,
230 const double factor = 1.)
240 const double dx = factor * fetest.
JxW(k);
242 for (
unsigned int i = 0; i < t_dofs; ++i)
243 for (
unsigned int d = 0; d < dim; ++d)
272 for (
unsigned int i = 0; i < t_dofs; ++i)
273 for (
unsigned int j = 0; j < n_dofs; ++j)
274 for (
unsigned int d = 0; d < dim; ++d)
287 template <
int dim,
typename number>
306 for (
unsigned int i = 0; i < t_dofs; ++i)
307 for (
unsigned int d = 0; d < dim; ++d)
319 template <
int dim,
typename number>
323 const std::vector<double> &
data,
337 for (
unsigned int i = 0; i < t_dofs; ++i)
338 for (
unsigned int d = 0; d < dim; ++d)
383 const double dx = factor * fe1.
JxW(k);
384 for (
unsigned int i = 0; i < t_dofs; ++i)
385 for (
unsigned int j = 0; j < n_dofs; ++j)
386 for (
unsigned int d = 0; d < dim; ++d)
395 M11(i, j) += .5 * dx * un1 *
v1;
396 M12(i, j) += .5 * dx * un2 *
v1;
397 M21(i, j) += .5 * dx * un1 * v2;
398 M22(i, j) += .5 * dx * un2 * v2;
437 const double dx = factor * fe1.
JxW(k);
438 for (
unsigned int i = 0; i < n_dofs; ++i)
439 for (
unsigned int j = 0; j < n_dofs; ++j)
440 for (
unsigned int d = 0; d < dim; ++d)
451 M11(i, j) += dx * un1 * vn1;
452 M12(i, j) += dx * un2 * vn1;
453 M21(i, j) += dx * un1 * vn2;
454 M22(i, j) += dx * un2 * vn2;
478 double div = Du[0][k][0];
479 for (
unsigned int d = 1; d < dim; ++d)
481 result += div * div * fe.
JxW(k);
const unsigned int dofs_per_cell
const Tensor< 1, spacedim > & normal_vector(const unsigned int q_point) const
double shape_value_component(const unsigned int i, const unsigned int q_point, const unsigned int component) const
const unsigned int n_quadrature_points
Tensor< 1, spacedim > shape_grad_component(const unsigned int i, const unsigned int q_point, const unsigned int component) const
const Tensor< 1, spacedim > & shape_grad(const unsigned int i, const unsigned int q_point) const
const FiniteElement< dim, spacedim > & get_fe() const
double JxW(const unsigned int q_point) const
const double & shape_value(const unsigned int i, const unsigned int q_point) const
unsigned int n_components() const
virtual size_type size() const override
#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.