15#ifndef dealii_integrators_divergence_h
16#define dealii_integrators_divergence_h
67 const double dx = fe.
JxW(k) * factor;
68 for (
unsigned int i = 0; i < t_dofs; ++i)
71 for (
unsigned int d = 0; d < dim; ++d)
72 for (
unsigned int j = 0; j < n_dofs; ++j)
75 M(i, j) += dx * du * vv;
90 template <
int dim,
typename number>
95 const double factor = 1.)
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)
109 result(i) += dx * input[d][k][d] * fetest.
shape_value(i, k);
123 template <
int dim,
typename number>
127 const ArrayView<
const std::vector<double>> &input,
128 const double factor = 1.)
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)
142 result(i) -= dx * input[d][k] * fetest.
shape_grad(i, k)[d];
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)
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.)
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)
227 template <
int dim,
typename number>
231 const std::vector<double> &input,
232 const double factor = 1.)
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)
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)
289 template <
int dim,
typename number>
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,
339 for (
unsigned int i = 0; i < t_dofs; ++i)
340 for (
unsigned int d = 0; d < dim; ++d)
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)
397 M11(i, j) += .5 * dx * un1 *
v1;
398 M12(i, j) += .5 * dx * un2 *
v1;
399 M21(i, j) += .5 * dx * un1 * v2;
400 M22(i, j) += .5 * dx * un2 * v2;
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)
453 M11(i, j) += dx * un1 * vn1;
454 M12(i, j) += dx * un2 * vn1;
455 M21(i, j) += dx * un1 * vn2;
456 M22(i, j) += dx * un2 * vn2;
480 double div = Du[0][k][0];
481 for (
unsigned int d = 1; d < dim; ++d)
483 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.