16 #ifndef dealii_integrators_l2_h 17 #define dealii_integrators_l2_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/lac/full_matrix.h> 30 #include <deal.II/meshworker/dof_info.h> 32 DEAL_II_NAMESPACE_OPEN
65 const double factor = 1.)
68 const unsigned int n_components = fe.
get_fe().n_components();
72 const double dx = fe.
JxW(k) * factor;
73 for (
unsigned int i = 0; i < n_dofs; ++i)
76 for (
unsigned int d = 0; d < n_components; ++d)
82 for (
unsigned int j = i + 1; j < n_dofs; ++j)
85 for (
unsigned int d = 0; d < n_components; ++d)
119 const std::vector<double> &weights)
122 const unsigned int n_components = fe.
get_fe().n_components();
129 const double dx = fe.
JxW(k) * weights[k];
130 for (
unsigned int i = 0; i < n_dofs; ++i)
133 for (
unsigned int d = 0; d < n_components; ++d)
139 for (
unsigned int j = i + 1; j < n_dofs; ++j)
142 for (
unsigned int d = 0; d < n_components; ++d)
169 template <
int dim,
typename number>
173 const std::vector<double> &input,
174 const double factor = 1.)
182 for (
unsigned int i = 0; i < n_dofs; ++i)
183 result(i) += fe.
JxW(k) * factor * input[k] * fe.
shape_value(i, k);
202 template <
int dim,
typename number>
206 const ArrayView<
const std::vector<double>> &input,
207 const double factor = 1.)
210 const unsigned int n_components = input.size();
216 for (
unsigned int i = 0; i < n_dofs; ++i)
217 for (
unsigned int d = 0; d < n_components; ++d)
218 result(i) += fe.
JxW(k) * factor *
261 const double factor1 = 1.,
262 const double factor2 = 1.)
266 const unsigned int n_components = fe1.
get_fe().n_components();
282 const double dx = fe1.
JxW(k);
284 for (
unsigned int i = 0; i < n1_dofs; ++i)
285 for (
unsigned int j = 0; j < n1_dofs; ++j)
286 for (
unsigned int d = 0; d < n_components; ++d)
297 M11(i, j) += dx * u1 * v1;
298 M12(i, j) += dx * u2 * v1;
299 M21(i, j) += dx * u1 * v2;
300 M22(i, j) += dx * u2 * v2;
307 DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
const unsigned int dofs_per_cell
const FiniteElement< dim, spacedim > & get_fe() const
void jump_matrix(FullMatrix< double > &M11, FullMatrix< double > &M12, FullMatrix< double > &M21, FullMatrix< double > &M22, const FEValuesBase< dim > &fe1, const FEValuesBase< dim > &fe2, const double factor1=1., const double factor2=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 weighted_mass_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const std::vector< double > &weights)
const double & shape_value(const unsigned int function_no, const unsigned int point_no) const
void mass_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.)
#define Assert(cond, exc)
const unsigned int n_quadrature_points
double JxW(const unsigned int quadrature_point) const
static ::ExceptionBase & ExcNotImplemented()
void L2(Vector< number > &result, const FEValuesBase< dim > &fe, const std::vector< double > &input, const double factor=1.)