15#ifndef dealii_integrators_grad_div_h
16#define dealii_integrators_grad_div_h
55 const unsigned int n_dofs = fe.dofs_per_cell;
61 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
63 const double dx = factor * fe.JxW(
k);
64 for (
unsigned int i = 0; i < n_dofs; ++i)
65 for (
unsigned int j = 0;
j < n_dofs; ++
j)
83 template <
int dim,
typename number>
88 const double factor = 1.)
90 const unsigned int n_dofs =
fetest.dofs_per_cell;
95 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
97 const double dx = factor *
fetest.JxW(
k);
98 for (
unsigned int i = 0; i < n_dofs; ++i)
103 for (
unsigned int d = 0; d < dim; ++d)
104 du += input[d][
k][d];
126 const unsigned int n_dofs = fe.dofs_per_cell;
132 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
134 const double dx = factor * fe.JxW(
k);
136 for (
unsigned int i = 0; i < n_dofs; ++i)
137 for (
unsigned int j = 0;
j < n_dofs; ++
j)
143 double un = 0.,
vn = 0.;
144 for (
unsigned int d = 0; d < dim; ++d)
146 un += fe.shape_value_component(
j,
k, d) * n[d];
147 vn += fe.shape_value_component(i,
k, d) * n[d];
175 const ArrayView<
const std::vector<double>> &input,
181 const unsigned int n_dofs = fe.dofs_per_cell;
187 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
189 const double dx = factor * fe.JxW(
k);
194 for (
unsigned int d = 0; d < dim; ++d)
200 for (
unsigned int i = 0; i < n_dofs; ++i)
205 for (
unsigned int d = 0; d < dim; ++d)
206 vn += fe.shape_value_component(i,
k, d) * n[d];
230 const unsigned int n_dofs =
fe1.dofs_per_cell;
242 const double f = .5 * (
fi + fe);
244 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
246 const double dx =
fe1.JxW(
k);
248 for (
unsigned int i = 0; i < n_dofs; ++i)
249 for (
unsigned int j = 0;
j < n_dofs; ++
j)
264 for (
unsigned int d = 0; d < dim; ++d)
266 uni +=
fe1.shape_value_component(
j,
k, d) * n[d];
267 une +=
fe2.shape_value_component(
j,
k, d) * n[d];
268 vni +=
fe1.shape_value_component(i,
k, d) * n[d];
269 vne +=
fe2.shape_value_component(i,
k, d) * n[d];
312 const unsigned int n1 =
fe1.dofs_per_cell;
325 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
327 const double dx =
fe1.JxW(
k);
333 for (
unsigned int d = 0; d < dim; ++d)
341 for (
unsigned int i = 0; i <
n1; ++i)
349 for (
unsigned int d = 0; d < dim; ++d)
351 vni +=
fe1.shape_value_component(i,
k, d) * n[d];
352 vne +=
fe2.shape_value_component(i,
k, d) * n[d];
#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.