13#ifndef dealii_integrators_grad_div_h
14#define dealii_integrators_grad_div_h
61 const double dx = factor * fe.
JxW(k);
62 for (
unsigned int i = 0; i < n_dofs; ++i)
63 for (
unsigned int j = 0; j < n_dofs; ++j)
70 M(i, j) += dx * divu * divv;
81 template <
int dim,
typename number>
86 const double factor = 1.)
95 const double dx = factor * fetest.
JxW(k);
96 for (
unsigned int i = 0; i < n_dofs; ++i)
101 for (
unsigned int d = 0; d < dim; ++d)
102 du += input[d][k][d];
104 result(i) += dx * du * divv;
132 const double dx = factor * fe.
JxW(k);
134 for (
unsigned int i = 0; i < n_dofs; ++i)
135 for (
unsigned int j = 0; j < n_dofs; ++j)
141 double un = 0., vn = 0.;
142 for (
unsigned int d = 0; d < dim; ++d)
148 M(i, j) += dx * 2. * penalty * un * vn;
149 M(i, j) -= dx * (divu * vn + divv * un);
173 const ArrayView<
const std::vector<double>> &input,
187 const double dx = factor * fe.
JxW(k);
192 for (
unsigned int d = 0; d < dim; ++d)
194 umgn += (input[d][k] -
data[d][k]) * n[d];
195 divu += Dinput[d][k][d];
198 for (
unsigned int i = 0; i < n_dofs; ++i)
203 for (
unsigned int d = 0; d < dim; ++d)
207 dx * (2. * penalty * umgn * vn - divv * umgn - divu * vn);
226 double factor2 = -1.)
238 const double fi = factor1;
239 const double fe = (factor2 < 0) ? factor1 : factor2;
240 const double f = .5 * (fi + fe);
244 const double dx = fe1.
JxW(k);
246 for (
unsigned int i = 0; i < n_dofs; ++i)
247 for (
unsigned int j = 0; j < n_dofs; ++j)
262 for (
unsigned int d = 0; d < dim; ++d)
270 dx * (-.5 * fi * divvi * uni - .5 * fi * divui * vni +
271 f * penalty * uni * vni);
273 dx * (.5 * fi * divvi * une - .5 * fe * divue * vni -
274 f * penalty * vni * une);
276 dx * (-.5 * fe * divve * uni + .5 * fi * divui * vne -
277 f * penalty * uni * vne);
279 dx * (.5 * fe * divve * une + .5 * fe * divue * vne +
280 f * penalty * une * vne);
302 const ArrayView<
const std::vector<double>> &input1,
304 const ArrayView<
const std::vector<double>> &input2,
307 double int_factor = 1.,
308 double ext_factor = -1.)
318 const double fi = int_factor;
319 const double fe = (ext_factor < 0) ? int_factor : ext_factor;
320 const double penalty = .5 * pen * (fi + fe);
325 const double dx = fe1.
JxW(k);
331 for (
unsigned int d = 0; d < dim; ++d)
333 uni += input1[d][k] * n[d];
334 une += input2[d][k] * n[d];
335 divui += Dinput1[d][k][d];
336 divue += Dinput2[d][k][d];
339 for (
unsigned int i = 0; i < n1; ++i)
347 for (
unsigned int d = 0; d < dim; ++d)
353 result1(i) += dx * (-.5 * fi * divvi * uni -
354 .5 * fi * divui * vni + penalty * uni * vni);
355 result1(i) += dx * (.5 * fi * divvi * une -
356 .5 * fe * divue * vni - penalty * vni * une);
357 result2(i) += dx * (-.5 * fe * divve * uni +
358 .5 * fi * divui * vne - penalty * uni * vne);
359 result2(i) += dx * (.5 * fe * divve * une +
360 .5 * fe * divue * vne + penalty * une * vne);
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
const FiniteElement< dim, spacedim > & get_fe() const
double JxW(const unsigned int q_point) const
unsigned int n_components() const
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertVectorVectorDimension(VEC, DIM1, DIM2)
#define AssertDimension(dim1, dim2)
std::vector< index_type > data
void nitsche_residual(Vector< double > &result, const FEValuesBase< dim > &fe, const ArrayView< const std::vector< double > > &input, const ArrayView< const std::vector< Tensor< 1, dim > > > &Dinput, const ArrayView< const std::vector< double > > &data, double penalty, double factor=1.)
void nitsche_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, double penalty, double factor=1.)
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, double factor=1.)
void ip_residual(Vector< double > &result1, Vector< double > &result2, const FEValuesBase< dim > &fe1, const FEValuesBase< dim > &fe2, const ArrayView< const std::vector< double > > &input1, const ArrayView< const std::vector< Tensor< 1, dim > > > &Dinput1, const ArrayView< const std::vector< double > > &input2, const ArrayView< const std::vector< Tensor< 1, dim > > > &Dinput2, double pen, double int_factor=1., double ext_factor=-1.)
void ip_matrix(FullMatrix< double > &M11, FullMatrix< double > &M12, FullMatrix< double > &M21, FullMatrix< double > &M22, const FEValuesBase< dim > &fe1, const FEValuesBase< dim > &fe2, double penalty, double factor1=1., double factor2=-1.)
void cell_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< Tensor< 1, dim > > > &input, const double factor=1.)
Library of integrals over cells and faces.