16#ifndef dealii_integrators_grad_div_h
17#define dealii_integrators_grad_div_h
56 const unsigned int n_dofs = fe.dofs_per_cell;
62 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
64 const double dx = factor * fe.JxW(
k);
65 for (
unsigned int i = 0; i < n_dofs; ++i)
66 for (
unsigned int j = 0;
j < n_dofs; ++
j)
84 template <
int dim,
typename number>
89 const double factor = 1.)
91 const unsigned int n_dofs =
fetest.dofs_per_cell;
96 for (
unsigned int k = 0;
k <
fetest.n_quadrature_points; ++
k)
98 const double dx = factor *
fetest.JxW(
k);
99 for (
unsigned int i = 0; i < n_dofs; ++i)
104 for (
unsigned int d = 0; d < dim; ++d)
105 du += input[d][
k][d];
127 const unsigned int n_dofs = fe.dofs_per_cell;
133 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
135 const double dx = factor * fe.JxW(
k);
137 for (
unsigned int i = 0; i < n_dofs; ++i)
138 for (
unsigned int j = 0;
j < n_dofs; ++
j)
144 double un = 0.,
vn = 0.;
145 for (
unsigned int d = 0; d < dim; ++d)
147 un += fe.shape_value_component(
j,
k, d) * n[d];
148 vn += fe.shape_value_component(i,
k, d) * n[d];
176 const ArrayView<
const std::vector<double>> & input,
178 const ArrayView<
const std::vector<double>> & data,
182 const unsigned int n_dofs = fe.dofs_per_cell;
188 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
190 const double dx = factor * fe.JxW(
k);
195 for (
unsigned int d = 0; d < dim; ++d)
197 umgn += (input[d][
k] - data[d][
k]) * n[d];
201 for (
unsigned int i = 0; i < n_dofs; ++i)
206 for (
unsigned int d = 0; d < dim; ++d)
207 vn += fe.shape_value_component(i,
k, d) * n[d];
232 const unsigned int n_dofs =
fe1.dofs_per_cell;
244 const double f = .5 * (
fi + fe);
246 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
248 const double dx =
fe1.JxW(
k);
250 for (
unsigned int i = 0; i < n_dofs; ++i)
251 for (
unsigned int j = 0;
j < n_dofs; ++
j)
266 for (
unsigned int d = 0; d < dim; ++d)
268 uni +=
fe1.shape_value_component(
j,
k, d) * n[d];
269 une +=
fe2.shape_value_component(
j,
k, d) * n[d];
270 vni +=
fe1.shape_value_component(i,
k, d) * n[d];
271 vne +=
fe2.shape_value_component(i,
k, d) * n[d];
314 const unsigned int n1 =
fe1.dofs_per_cell;
327 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
329 const double dx =
fe1.JxW(
k);
335 for (
unsigned int d = 0; d < dim; ++d)
343 for (
unsigned int i = 0; i <
n1; ++i)
351 for (
unsigned int d = 0; d < dim; ++d)
353 vni +=
fe1.shape_value_component(i,
k, d) * n[d];
354 vne +=
fe2.shape_value_component(i,
k, d) * n[d];
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertVectorVectorDimension(VEC, DIM1, DIM2)
#define AssertDimension(dim1, dim2)
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.