16#ifndef dealii_integrators_elasticity_h
17#define dealii_integrators_elasticity_h
53 const double factor = 1.)
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)
66 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
67 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
69 (fe.shape_grad_component(
j,
k,
d1)[
d2] +
70 fe.shape_grad_component(
j,
k,
d2)[
d1]) *
71 (fe.shape_grad_component(i,
k,
d1)[
d2] +
72 fe.shape_grad_component(i,
k,
d2)[
d1]);
82 template <
int dim,
typename number>
89 const unsigned int nq = fe.n_quadrature_points;
90 const unsigned int n_dofs = fe.dofs_per_cell;
97 for (
unsigned int k = 0;
k <
nq; ++
k)
99 const double dx = factor * fe.JxW(
k);
100 for (
unsigned int i = 0; i < n_dofs; ++i)
101 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
102 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
106 (fe.shape_grad_component(i,
k,
d1)[
d2] +
107 fe.shape_grad_component(i,
k,
d2)[
d1]);
128 const unsigned int n_dofs = fe.dofs_per_cell;
134 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
136 const double dx = factor * fe.JxW(
k);
138 for (
unsigned int i = 0; i < n_dofs; ++i)
139 for (
unsigned int j = 0;
j < n_dofs; ++
j)
140 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
142 const double u = fe.shape_value_component(
j,
k,
d1);
143 const double v = fe.shape_value_component(i,
k,
d1);
145 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
149 fe.shape_grad_component(
j,
k,
d1)[
d2] * n[
d2] *
153 fe.shape_grad_component(
j,
k,
d2)[
d1] * n[
d2] *
157 fe.shape_grad_component(i,
k,
d1)[
d2] * n[
d2] *
161 fe.shape_grad_component(i,
k,
d2)[
d1] * n[
d2] *
183 const unsigned int n_dofs = fe.dofs_per_cell;
189 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
191 const double dx = factor * fe.JxW(
k);
193 for (
unsigned int i = 0; i < n_dofs; ++i)
194 for (
unsigned int j = 0;
j < n_dofs; ++
j)
201 for (
unsigned int d = 0; d < dim; ++d)
203 udotn += n[d] * fe.shape_value_component(
j,
k, d);
204 vdotn += n[d] * fe.shape_value_component(i,
k, d);
205 ngradun += n * fe.shape_grad_component(
j,
k, d) * n[d];
206 ngradvn += n * fe.shape_grad_component(i,
k, d) * n[d];
208 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
211 fe.shape_value_component(
j,
k,
d1) -
udotn * n[
d1];
213 fe.shape_value_component(i,
k,
d1) -
vdotn * n[
d1];
217 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
221 fe.shape_grad_component(
j,
k,
d1)[
d2] *
225 fe.shape_grad_component(
j,
k,
d2)[
d1] *
229 fe.shape_grad_component(i,
k,
d1)[
d2] *
233 fe.shape_grad_component(i,
k,
d2)[
d1] *
255 template <
int dim,
typename number>
259 const ArrayView<
const std::vector<double>> & input,
261 const ArrayView<
const std::vector<double>> & data,
265 const unsigned int n_dofs = fe.dofs_per_cell;
270 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
272 const double dx = factor * fe.JxW(
k);
274 for (
unsigned int i = 0; i < n_dofs; ++i)
275 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
277 const double u = input[
d1][
k];
278 const double v = fe.shape_value_component(i,
k,
d1);
279 const double g = data[
d1][
k];
282 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
290 fe.shape_grad_component(i,
k,
d1)[
d2] * n[
d2];
293 fe.shape_grad_component(i,
k,
d2)[
d1] * n[
d2];
307 template <
int dim,
typename number>
312 const ArrayView<
const std::vector<double>> & input,
314 const ArrayView<
const std::vector<double>> & data,
318 const unsigned int n_dofs = fe.dofs_per_cell;
323 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
325 const double dx = factor * fe.JxW(
k);
327 for (
unsigned int i = 0; i < n_dofs; ++i)
335 for (
unsigned int d = 0; d < dim; ++d)
337 udotn += n[d] * input[d][
k];
338 gdotn += n[d] * data[d][
k];
339 vdotn += n[d] * fe.shape_value_component(i,
k, d);
341 ngradvn += n * fe.shape_grad_component(i,
k, d) * n[d];
343 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
347 fe.shape_value_component(i,
k,
d1) -
vdotn * n[
d1];
352 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
360 fe.shape_grad_component(i,
k,
d1)[
d2] *
364 fe.shape_grad_component(i,
k,
d2)[
d1] *
385 template <
int dim,
typename number>
390 const ArrayView<
const std::vector<double>> & input,
395 const unsigned int n_dofs = fe.dofs_per_cell;
399 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
401 const double dx = factor * fe.JxW(
k);
403 for (
unsigned int i = 0; i < n_dofs; ++i)
404 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
406 const double u = input[
d1][
k];
407 const double v = fe.shape_value_component(i,
k,
d1);
410 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
418 fe.shape_grad_component(i,
k,
d1)[
d2] * n[
d2];
421 fe.shape_grad_component(i,
k,
d2)[
d1] * n[
d2];
442 const unsigned int n_dofs =
fe1.dofs_per_cell;
459 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
461 const double dx =
fe1.JxW(
k);
463 for (
unsigned int i = 0; i < n_dofs; ++i)
464 for (
unsigned int j = 0;
j < n_dofs; ++
j)
465 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
467 const double u1 =
fe1.shape_value_component(
j,
k,
d1);
468 const double u2 =
fe2.shape_value_component(
j,
k,
d1);
469 const double v1 =
fe1.shape_value_component(i,
k,
d1);
470 const double v2 =
fe2.shape_value_component(i,
k,
d1);
477 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
507 fe1.shape_grad_component(i,
k,
d1)[
d2] *
510 fe1.shape_grad_component(i,
k,
d1)[
d2] *
513 fe2.shape_grad_component(i,
k,
d1)[
d2] *
516 fe2.shape_grad_component(i,
k,
d1)[
d2] *
520 fe1.shape_grad_component(i,
k,
d2)[
d1] *
523 fe1.shape_grad_component(i,
k,
d2)[
d1] *
526 fe2.shape_grad_component(i,
k,
d2)[
d1] *
529 fe2.shape_grad_component(i,
k,
d2)[
d1] *
538 template <
int dim,
typename number>
552 const unsigned int n1 =
fe1.dofs_per_cell;
566 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
568 const double dx =
fe1.JxW(
k);
571 for (
unsigned int i = 0; i <
n1; ++i)
572 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
574 const double v1 =
fe1.shape_value_component(i,
k,
d1);
575 const double v2 =
fe2.shape_value_component(i,
k,
d1);
584 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
606 fe1.shape_grad_component(i,
k,
d1)[
d2] *
609 fe2.shape_grad_component(i,
k,
d1)[
d2] *
613 fe1.shape_grad_component(i,
k,
d2)[
d1] *
616 fe2.shape_grad_component(i,
k,
d2)[
d1] *
#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)
void nitsche_tangential_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, double penalty, double 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, const double pen, const double int_factor=1., const double ext_factor=-1.)
void nitsche_residual(Vector< number > &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_residual_homogeneous(Vector< number > &result, const FEValuesBase< dim > &fe, const ArrayView< const std::vector< double > > &input, const ArrayView< const std::vector< Tensor< 1, dim > > > &Dinput, double penalty, double factor=1.)
void ip_residual(Vector< number > &result1, Vector< number > &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 nitsche_tangential_residual(Vector< number > &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_residual(Vector< number > &result, const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim > > > &input, double factor=1.)
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.)
Library of integrals over cells and faces.