16#ifndef dealii_integrators_l2_h
17#define dealii_integrators_l2_h
60 const double factor = 1.)
62 const unsigned int n_dofs = fe.dofs_per_cell;
63 const unsigned int n_components = fe.get_fe().n_components();
65 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
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)
72 Mii += dx * fe.shape_value_component(i,
k, d) *
73 fe.shape_value_component(i,
k, d);
77 for (
unsigned int j = i + 1;
j < n_dofs; ++
j)
80 for (
unsigned int d = 0; d < n_components; ++d)
81 Mij += dx * fe.shape_value_component(
j,
k, d) *
82 fe.shape_value_component(i,
k, d);
111 const std::vector<double> &weights)
113 const unsigned int n_dofs = fe.dofs_per_cell;
114 const unsigned int n_components = fe.get_fe().n_components();
119 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
121 const double dx = fe.JxW(
k) * weights[
k];
122 for (
unsigned int i = 0; i < n_dofs; ++i)
125 for (
unsigned int d = 0; d < n_components; ++d)
126 Mii += dx * fe.shape_value_component(i,
k, d) *
127 fe.shape_value_component(i,
k, d);
131 for (
unsigned int j = i + 1;
j < n_dofs; ++
j)
134 for (
unsigned int d = 0; d < n_components; ++d)
135 Mij += dx * fe.shape_value_component(
j,
k, d) *
136 fe.shape_value_component(i,
k, d);
158 template <
int dim,
typename number>
162 const std::vector<double> &input,
163 const double factor = 1.)
165 const unsigned int n_dofs = fe.dofs_per_cell;
170 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
171 for (
unsigned int i = 0; i < n_dofs; ++i)
172 result(i) += fe.JxW(
k) * factor * input[
k] * fe.shape_value(i,
k);
188 template <
int dim,
typename number>
192 const ArrayView<
const std::vector<double>> &input,
193 const double factor = 1.)
195 const unsigned int n_dofs = fe.dofs_per_cell;
196 const unsigned int n_components = input.
size();
201 for (
unsigned int k = 0;
k < fe.n_quadrature_points; ++
k)
202 for (
unsigned int i = 0; i < n_dofs; ++i)
203 for (
unsigned int d = 0; d < n_components; ++d)
204 result(i) += fe.JxW(
k) * factor *
205 fe.shape_value_component(i,
k, d) * input[d][
k];
247 const unsigned int n1_dofs =
fe1.n_dofs_per_cell();
248 const unsigned int n2_dofs =
fe2.n_dofs_per_cell();
249 const unsigned int n_components =
fe1.get_fe().n_components();
263 for (
unsigned int k = 0;
k <
fe1.n_quadrature_points; ++
k)
265 const double dx =
fe1.JxW(
k);
267 for (
unsigned int i = 0; i <
n1_dofs; ++i)
269 for (
unsigned int d = 0; d < n_components; ++d)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
void L2(Vector< number > &result, const FEValuesBase< dim > &fe, const std::vector< double > &input, const double factor=1.)
void mass_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.)
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.)
void weighted_mass_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const std::vector< double > &weights)
Library of integrals over cells and faces.