16 #ifndef dealii_integrators_divergence_h 17 #define dealii_integrators_divergence_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/quadrature.h> 25 #include <deal.II/fe/fe_values.h> 26 #include <deal.II/fe/mapping.h> 28 #include <deal.II/integrators/grad_div.h> 30 #include <deal.II/lac/full_matrix.h> 32 #include <deal.II/meshworker/dof_info.h> 34 DEAL_II_NAMESPACE_OPEN
73 const double dx = fe.
JxW(k) * factor;
74 for (
unsigned int i = 0; i < t_dofs; ++i)
77 for (
unsigned int d = 0; d < dim; ++d)
78 for (
unsigned int j = 0; j < n_dofs; ++j)
81 M(i, j) += dx * du * vv;
99 template <
int dim,
typename number>
104 const double factor = 1.)
114 const double dx = factor * fetest.
JxW(k);
116 for (
unsigned int i = 0; i < t_dofs; ++i)
117 for (
unsigned int d = 0; d < dim; ++d)
118 result(i) += dx * input[d][k][d] * fetest.
shape_value(i, k);
135 template <
int dim,
typename number>
139 const ArrayView<
const std::vector<double>> &input,
140 const double factor = 1.)
150 const double dx = factor * fetest.
JxW(k);
152 for (
unsigned int i = 0; i < t_dofs; ++i)
153 for (
unsigned int d = 0; d < dim; ++d)
154 result(i) -= dx * input[d][k] * fetest.
shape_grad(i, k)[d];
186 const double dx = fe.
JxW(k) * factor;
187 for (
unsigned int d = 0; d < dim; ++d)
188 for (
unsigned int i = 0; i < t_dofs; ++i)
191 for (
unsigned int j = 0; j < n_dofs; ++j)
194 M(i, j) += dx * vv * Du[d];
212 template <
int dim,
typename number>
217 const double factor = 1.)
227 const double dx = factor * fetest.
JxW(k);
229 for (
unsigned int i = 0; i < t_dofs; ++i)
230 for (
unsigned int d = 0; d < dim; ++d)
248 template <
int dim,
typename number>
252 const std::vector<double> &input,
253 const double factor = 1.)
263 const double dx = factor * fetest.
JxW(k);
265 for (
unsigned int i = 0; i < t_dofs; ++i)
266 for (
unsigned int d = 0; d < dim; ++d)
298 for (
unsigned int i = 0; i < t_dofs; ++i)
299 for (
unsigned int j = 0; j < n_dofs; ++j)
300 for (
unsigned int d = 0; d < dim; ++d)
316 template <
int dim,
typename number>
321 const ArrayView<
const std::vector<double>> &data,
335 for (
unsigned int i = 0; i < t_dofs; ++i)
336 for (
unsigned int d = 0; d < dim; ++d)
337 result(i) += ndx[d] * fetest.
shape_value(i, k) * data[d][k];
351 template <
int dim,
typename number>
355 const std::vector<double> &data,
369 for (
unsigned int i = 0; i < t_dofs; ++i)
370 for (
unsigned int d = 0; d < dim; ++d)
418 const double dx = factor * fe1.
JxW(k);
419 for (
unsigned int i = 0; i < t_dofs; ++i)
420 for (
unsigned int j = 0; j < n_dofs; ++j)
421 for (
unsigned int d = 0; d < dim; ++d)
430 M11(i, j) += .5 * dx * un1 * v1;
431 M12(i, j) += .5 * dx * un2 * v1;
432 M21(i, j) += .5 * dx * un1 * v2;
433 M22(i, j) += .5 * dx * un2 * v2;
442 DEAL_II_DEPRECATED
void 445 const double factor = 1.);
459 template <
int dim,
typename number>
460 DEAL_II_DEPRECATED
void 464 const double factor = 1.);
466 template <
int dim,
typename number>
513 const double dx = factor * fe1.
JxW(k);
514 for (
unsigned int i = 0; i < n_dofs; ++i)
515 for (
unsigned int j = 0; j < n_dofs; ++j)
516 for (
unsigned int d = 0; d < dim; ++d)
527 M11(i, j) += dx * un1 * vn1;
528 M12(i, j) += dx * un2 * vn1;
529 M21(i, j) += dx * un1 * vn2;
530 M22(i, j) += dx * un2 * vn2;
557 double div = Du[0][k][0];
558 for (
unsigned int d = 1; d < dim; ++d)
560 result += div * div * fe.
JxW(k);
569 DEAL_II_NAMESPACE_CLOSE
void cell_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< Tensor< 1, dim >>> &input, const double factor=1.)
#define AssertDimension(dim1, dim2)
const unsigned int dofs_per_cell
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, double factor=1.)
const FiniteElement< dim, spacedim > & get_fe() const
#define AssertVectorVectorDimension(VEC, DIM1, DIM2)
double norm(const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim >>> &Du)
double shape_value_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const
Library of integrals over cells and faces.
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 cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
void cell_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< Tensor< 1, dim >>> &input, const double factor=1.)
const double & shape_value(const unsigned int function_no, const unsigned int point_no) const
void gradient_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const std::vector< Tensor< 1, dim >> &input, const double factor=1.)
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void gradient_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
void u_dot_n_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, 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.)
const unsigned int n_quadrature_points
void u_times_n_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const std::vector< double > &data, double factor=1.)
Tensor< 1, spacedim > shape_grad_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const
void grad_div_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.)
double JxW(const unsigned int quadrature_point) const
void grad_div_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< Tensor< 1, dim >>> &input, const double factor=1.)
const Tensor< 1, spacedim > & shape_grad(const unsigned int function_no, const unsigned int quadrature_point) const
const Tensor< 1, spacedim > & normal_vector(const unsigned int i) const