16 #ifndef dealii__integrators_divergence_h 17 #define dealii__integrators_divergence_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/quadrature.h> 23 #include <deal.II/lac/full_matrix.h> 24 #include <deal.II/fe/mapping.h> 25 #include <deal.II/fe/fe_values.h> 26 #include <deal.II/meshworker/dof_info.h> 27 #include <deal.II/integrators/grad_div.h> 29 DEAL_II_NAMESPACE_OPEN
68 const double dx = fe.
JxW(k) * factor;
69 for (
unsigned int i=0; i<t_dofs; ++i)
72 for (
unsigned int d=0; d<dim; ++d)
73 for (
unsigned int j=0; j<n_dofs; ++j)
76 M(i,j) += dx * du * vv;
94 template <
int dim,
typename number>
99 const double factor = 1.)
108 const double dx = factor * fetest.
JxW(k);
110 for (
unsigned int i=0; i<t_dofs; ++i)
111 for (
unsigned int d=0; d<dim; ++d)
112 result(i) += dx * input[d][k][d] * fetest.
shape_value(i,k);
129 template <
int dim,
typename number>
133 const VectorSlice<
const std::vector<std::vector<double> > > &input,
134 const double factor = 1.)
143 const double dx = factor * fetest.
JxW(k);
145 for (
unsigned int i=0; i<t_dofs; ++i)
146 for (
unsigned int d=0; d<dim; ++d)
147 result(i) -= dx * input[d][k] * fetest.
shape_grad(i,k)[d];
179 const double dx = fe.
JxW(k) * factor;
180 for (
unsigned int d=0; d<dim; ++d)
181 for (
unsigned int i=0; i<t_dofs; ++i)
184 for (
unsigned int j=0; j<n_dofs; ++j)
187 M(i,j) += dx * vv * Du[d];
205 template <
int dim,
typename number>
210 const double factor = 1.)
219 const double dx = factor * fetest.
JxW(k);
221 for (
unsigned int i=0; i<t_dofs; ++i)
222 for (
unsigned int d=0; d<dim; ++d)
239 template <
int dim,
typename number>
243 const std::vector<double> &input,
244 const double factor = 1.)
253 const double dx = factor * fetest.
JxW(k);
255 for (
unsigned int i=0; i<t_dofs; ++i)
256 for (
unsigned int d=0; d<dim; ++d)
288 for (
unsigned int i=0; i<t_dofs; ++i)
289 for (
unsigned int j=0; j<n_dofs; ++j)
290 for (
unsigned int d=0; d<dim; ++d)
306 template<
int dim,
typename number>
312 const VectorSlice<
const std::vector<std::vector<double> > > &data,
326 for (
unsigned int i=0; i<t_dofs; ++i)
327 for (
unsigned int d=0; d<dim; ++d)
328 result(i) += ndx[d] * fetest.
shape_value(i,k) * data[d][k];
342 template<
int dim,
typename number>
347 const std::vector<double> &data,
360 for (
unsigned int i=0; i<t_dofs; ++i)
361 for (
unsigned int d=0; d<dim; ++d)
408 const double dx = factor * fe1.
JxW(k);
409 for (
unsigned int i=0; i<t_dofs; ++i)
410 for (
unsigned int j=0; j<n_dofs; ++j)
411 for (
unsigned int d=0; d<dim; ++d)
418 M11(i,j) += .5 * dx * un1 * v1;
419 M12(i,j) += .5 * dx * un2 * v1;
420 M21(i,j) += .5 * dx * un1 * v2;
421 M22(i,j) += .5 * dx * un2 * v2;
433 const double factor = 1.) DEAL_II_DEPRECATED;
447 template <
int dim,
typename number>
452 const double factor = 1.) DEAL_II_DEPRECATED;
454 template <
int dim, typename number>
502 const double dx = factor * fe1.
JxW(k);
503 for (
unsigned int i=0; i<n_dofs; ++i)
504 for (
unsigned int j=0; j<n_dofs; ++j)
505 for (
unsigned int d=0; d<dim; ++d)
512 M11(i,j) += dx * un1 * vn1;
513 M12(i,j) += dx * un2 * vn1;
514 M21(i,j) += dx * un1 * vn2;
515 M22(i,j) += dx * un2 * vn2;
541 double div = Du[0][k][0];
542 for (
unsigned int d=1; d<dim; ++d)
544 result += div*div*fe.
JxW(k);
553 DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
const unsigned int dofs_per_cell
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, double factor=1.)
#define AssertVectorVectorDimension(vec, dim1, dim2)
const FiniteElement< dim, spacedim > & get_fe() const
void cell_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &input, const double factor=1.)
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 grad_div_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &input, const double factor=1.) 1
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
const double & shape_value(const unsigned int function_no, const unsigned int point_no) const
#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 grad_div_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.) 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.)
double norm(const FEValuesBase< dim > &fe, const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &Du)
void u_dot_n_residual(Vector< number > &result, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, const VectorSlice< const std::vector< std::vector< double > > > &data, double factor=1.)
void gradient_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const std::vector< Tensor< 1, dim > > &input, const double factor=1.)
double JxW(const unsigned int quadrature_point) const
void cell_residual(Vector< number > &result, const FEValuesBase< dim > &fetest, const VectorSlice< const std::vector< 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
Tensor< 1, spacedim > shape_grad_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const