58 "Lowest order BDM element are degree 1, but you asked for degree 0"));
87 const unsigned int face_no = 0;
90 for (
unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
97 unsigned int target_row = 0;
98 for (
unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
99 for (
unsigned int i = 0; i < face_embeddings[d].
m(); ++i)
101 for (
unsigned int j = 0; j < face_embeddings[d].
n(); ++j)
140 std::ostringstream namebuf;
141 namebuf <<
"FE_BDM<" << dim <<
">(" << this->degree - 1 <<
")";
143 return namebuf.str();
148std::unique_ptr<FiniteElement<dim, dim>>
151 return std::make_unique<FE_BDM<dim>>(*this);
160 std::vector<double> &nodal_values)
const
162 Assert(support_point_values.size() == this->generalized_support_points.size(),
164 this->generalized_support_points.size()));
166 Assert(nodal_values.size() == this->n_dofs_per_cell(),
173 unsigned int dbase = 0;
175 unsigned int pbase = 0;
180 if (test_values_face.empty())
182 for (
unsigned int i = 0; i < this->n_dofs_per_face(f); ++i)
183 nodal_values[dbase + i] =
184 support_point_values[pbase + i]
186 pbase += this->n_dofs_per_face(f);
190 for (
unsigned int i = 0; i < this->n_dofs_per_face(f); ++i)
193 for (
unsigned int k = 0; k < test_values_face.size(); ++k)
197 test_values_face[k][i];
198 nodal_values[dbase + i] = s;
200 pbase += test_values_face.size();
202 dbase += this->n_dofs_per_face(f);
206 const unsigned int face_no = 0;
210 this->n_dofs_per_face(face_no) *
213 this->generalized_support_points.size() -
214 test_values_cell.size());
217 if (dbase == this->n_dofs_per_cell())
226 for (
unsigned int d = 0; d < dim; ++d, dbase += test_values_cell[0].size())
228 for (
unsigned int i = 0; i < test_values_cell[0].size(); ++i)
231 for (
unsigned int k = 0; k < test_values_cell.size(); ++k)
232 s += support_point_values[pbase + k][d] * test_values_cell[k][i];
233 nodal_values[dbase + i] = s;
243std::vector<unsigned int>
256 std::vector<unsigned int> dpo(dim + 1, 0u);
273 return std::vector<bool>();
277 const unsigned int dofs_per_face =
288 std::vector<bool> ret_val(dofs_per_cell,
false);
311 initialize_test_values(std::vector<std::vector<double>> &test_values,
313 const unsigned int deg)
316 std::vector<Tensor<1, dim>> dummy1;
317 std::vector<Tensor<2, dim>> dummy2;
318 std::vector<Tensor<3, dim>> dummy3;
319 std::vector<Tensor<4, dim>> dummy4;
321 test_values.resize(quadrature.
size());
323 for (
unsigned int k = 0; k < quadrature.
size(); ++k)
325 test_values[k].resize(poly.
n());
332 for (
unsigned int i = 0; i < poly.
n(); ++i)
334 test_values[k][i] *= quadrature.
weight(k);
344 initialize_test_values(std::vector<std::vector<double>> &,
362 const QGauss<dim - 1> face_points(deg + 1);
367 const unsigned int face_no = 0;
370 this->generalized_face_support_points[face_no].resize(face_points.size());
371 for (
unsigned int k = 0; k < face_points.size(); ++k)
372 this->generalized_face_support_points[face_no][k] = face_points.point(k);
381 const unsigned int npoints =
384 this->generalized_support_points.resize(npoints);
389 for (
unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
392 this->reference_cell(),
396 for (
unsigned int k = 0; k < face_points.size(); ++k)
397 this->generalized_support_points[face_points.size() * f + k] =
398 faces.
point(offset + k);
405 internal::FE_BDM::initialize_test_values(test_values_face,
413 const unsigned int ibase =
415 for (
unsigned int k = 0; k < cell_points.size(); ++k)
417 this->generalized_support_points[ibase + k] = cell_points.point(k);
423 internal::FE_BDM::initialize_test_values(test_values_cell,
431#include "fe_bdm.inst"
void initialize_support_points(const unsigned int bdm_degree)
FE_BDM(const unsigned int p)
static std::vector< bool > get_ria_vector(const unsigned int degree)
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const override
void initialize_quad_dof_index_permutation_and_sign_change()
virtual std::string get_name() const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
FullMatrix< double > inverse_node_matrix
std::vector< MappingKind > mapping_kind
unsigned int n_dofs_per_cell() const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_unique_faces() const
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
FullMatrix< double > interface_constraints
std::vector< std::vector< FullMatrix< double > > > prolongation
void invert(const FullMatrix< number2 > &M)
static unsigned int n_polynomials(const unsigned int n)
void evaluate(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads, std::vector< Tensor< 3, dim > > &third_derivatives, std::vector< Tensor< 4, dim > > &fourth_derivatives) const override
static unsigned int n_polynomials(const unsigned int degree)
static DataSetDescriptor face(const ReferenceCell &reference_cell, const unsigned int face_no, const bool face_orientation, const bool face_flip, const bool face_rotation, const unsigned int n_quadrature_points)
static Quadrature< dim > project_to_all_faces(const ReferenceCell &reference_cell, const hp::QCollection< dim - 1 > &quadrature)
const Point< dim > & point(const unsigned int i) const
double weight(const unsigned int i) const
unsigned int size() const
static constexpr unsigned char default_combined_face_orientation()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > face_indices()