48 const unsigned int start_index2d[6] = {0, 1, 4, 10, 20, 35};
49 const double points2d[35][2] = {
50 {0, 0}, {0, 0}, {1, 0}, {0, 1}, {0, 0},
51 {1, 0}, {0, 1}, {1, 1}, {0.5, 0}, {0, 0.5},
52 {0, 0}, {1, 0}, {0, 1}, {1, 1}, {1. / 3., 0},
53 {2. / 3., 0}, {0, 1. / 3.}, {0, 2. / 3.}, {0.5, 1}, {1, 0.5},
54 {0, 0}, {1, 0}, {0, 1}, {1, 1}, {0.25, 0},
55 {0.5, 0}, {0.75, 0}, {0, 0.25}, {0, 0.5}, {0, 0.75},
56 {1. / 3., 1}, {2. / 3., 1}, {1, 1. / 3.}, {1, 2. / 3.}, {0.5, 0.5}};
64 const unsigned int start_index3d[6] = {0, 1, 5, 15 };
65 const double points3d[35][3] = {{0, 0, 0},
84 generate_unit_points(
const unsigned int, std::vector<
Point<dim>> &);
88 generate_unit_points(
const unsigned int k, std::vector<
Point<1>> &p)
91 const double h = 1. / k;
92 for (
unsigned int i = 0; i < p.size(); ++i)
98 generate_unit_points(
const unsigned int k, std::vector<
Point<2>> &p)
101 Assert(p.size() == start_index2d[k + 1] - start_index2d[k],
103 for (
unsigned int i = 0; i < p.size(); ++i)
105 p[i][0] = points2d[start_index2d[k] + i][0];
106 p[i][1] = points2d[start_index2d[k] + i][1];
112 generate_unit_points(
const unsigned int k, std::vector<
Point<3>> &p)
115 Assert(p.size() == start_index3d[k + 1] - start_index3d[k],
117 for (
unsigned int i = 0; i < p.size(); ++i)
119 p[i][0] = points3d[start_index3d[k] + i][0];
120 p[i][1] = points3d[start_index3d[k] + i][1];
121 p[i][2] = points3d[start_index3d[k] + i][2];
202 if (source_dgp_monomial)
207 const unsigned int m = interpolation_matrix.
m();
208 const unsigned int n = interpolation_matrix.
n();
211 Assert(m == this->n_dofs_per_cell(),
216 const unsigned int min_mn =
217 interpolation_matrix.
m() < interpolation_matrix.
n() ?
218 interpolation_matrix.
m() :
219 interpolation_matrix.
n();
221 for (
unsigned int i = 0; i < min_mn; ++i)
222 interpolation_matrix(i, i) = 1.;
226 std::vector<Point<dim>> unit_points(this->n_dofs_per_cell());
227 internal::FE_DGPMonomial::generate_unit_points(this->degree, unit_points);
232 for (
unsigned int k = 0; k < unit_points.size(); ++k)
233 source_fe_matrix(k, j) = source_fe.
shape_value(j, unit_points[k]);
236 this->n_dofs_per_cell());
237 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
238 for (
unsigned int k = 0; k < unit_points.size(); ++k)
240 this->poly_space->compute_value(j, unit_points[k]);
244 this_matrix.
mmult(interpolation_matrix, source_fe_matrix);