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
60 const double factor = 1.)
63 const unsigned int n_components = fe.
get_fe().n_components();
67 const double dx = fe.
JxW(k) * factor;
68 for (
unsigned int i = 0; i < n_dofs; ++i)
71 for (
unsigned int d = 0; d < n_components; ++d)
77 for (
unsigned int j = i + 1; j < n_dofs; ++j)
80 for (
unsigned int d = 0; d < n_components; ++d)
110 const std::vector<double> &weights)
113 const unsigned int n_components = fe.
get_fe().n_components();
120 const double dx = fe.
JxW(k) * weights[k];
121 for (
unsigned int i = 0; i < n_dofs; ++i)
124 for (
unsigned int d = 0; d < n_components; ++d)
130 for (
unsigned int j = i + 1; j < n_dofs; ++j)
133 for (
unsigned int d = 0; d < n_components; ++d)
152 template <
int dim,
typename number>
156 const std::vector<double> &input,
157 const double factor = 1.)
165 for (
unsigned int i = 0; i < n_dofs; ++i)
166 result(i) += fe.
JxW(k) * factor * input[k] * fe.
shape_value(i, k);
177 template <
int dim,
typename number>
181 const VectorSlice<
const std::vector<std::vector<double>>> &input,
182 const double factor = 1.)
185 const unsigned int n_components = input.size();
191 for (
unsigned int i = 0; i < n_dofs; ++i)
192 for (
unsigned int d = 0; d < n_components; ++d)
193 result(i) += fe.
JxW(k) * factor *
217 const double factor1 = 1.,
218 const double factor2 = 1.)
222 const unsigned int n_components = fe1.
get_fe().n_components();
238 const double dx = fe1.
JxW(k);
240 for (
unsigned int i = 0; i < n1_dofs; ++i)
241 for (
unsigned int j = 0; j < n1_dofs; ++j)
242 for (
unsigned int d = 0; d < n_components; ++d)
253 M11(i, j) += dx * u1 * v1;
254 M12(i, j) += dx * u2 * v1;
255 M21(i, j) += dx * u1 * v2;
256 M22(i, j) += dx * u2 * v2;
263 DEAL_II_NAMESPACE_CLOSE
double shape_value_component(const unsigned int function_no, const unsigned int point_no, const unsigned int component) const
#define AssertDimension(dim1, dim2)
const unsigned int dofs_per_cell
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.)
Library of integrals over cells and faces.
void weighted_mass_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const std::vector< double > &weights)
void mass_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.)
#define Assert(cond, exc)
const FiniteElement< dim, spacedim > & get_fe() const
const unsigned int n_quadrature_points
const double & shape_value(const unsigned int function_no, const unsigned int point_no) const
static::ExceptionBase & ExcNotImplemented()
void L2(Vector< number > &result, const FEValuesBase< dim > &fe, const std::vector< double > &input, const double factor=1.)
double JxW(const unsigned int quadrature_point) const