17 #include <deal.II/base/quadrature_lib.h> 18 #include <deal.II/base/qprojector.h> 19 #include <deal.II/base/polynomials_p.h> 20 #include <deal.II/base/table.h> 21 #include <deal.II/grid/tria.h> 22 #include <deal.II/grid/tria_iterator.h> 23 #include <deal.II/dofs/dof_accessor.h> 24 #include <deal.II/fe/fe.h> 25 #include <deal.II/fe/mapping.h> 26 #include <deal.II/fe/fe_bdm.h> 27 #include <deal.II/fe/fe_values.h> 28 #include <deal.II/fe/fe_tools.h> 34 DEAL_II_NAMESPACE_OPEN
45 std::vector<bool>(dim,true)))
47 Assert (dim >= 2, ExcImpossibleInDim(dim));
48 Assert (deg > 0,
ExcMessage(
"Lowest order BDM element are degree 1, but you asked for degree 0"));
88 for (
unsigned int i=0; i<GeometryInfo<dim>::max_children_per_face; ++i)
93 unsigned int target_row=0;
94 for (
unsigned int d=0; d<GeometryInfo<dim>::max_children_per_face; ++d)
95 for (
unsigned int i=0; i<face_embeddings[d].
m(); ++i)
97 for (
unsigned int j=0; j<face_embeddings[d].
n(); ++j)
120 std::ostringstream namebuf;
121 namebuf <<
"FE_BDM<" << dim <<
">(" << this->
degree-1 <<
")";
123 return namebuf.str();
139 std::vector<double> &,
140 const std::vector<double> &)
const 142 Assert(
false, ExcNotImplemented());
149 std::vector<double> &,
153 Assert(
false, ExcNotImplemented());
161 std::vector<double> &local_dofs,
162 const VectorSlice<
const std::vector<std::vector<double> > > &values)
const 168 ExcDimensionMismatch(local_dofs.size(),this->
dofs_per_cell));
174 unsigned int dbase = 0;
176 unsigned int pbase = 0;
177 for (
unsigned int f = 0; f<GeometryInfo<dim>::faces_per_cell; ++f)
194 local_dofs[dbase+i] = s;
220 local_dofs[dbase+i] = s;
231 std::vector<unsigned int>
242 unsigned int interior_dofs = 0;
246 std::vector<unsigned int> dpo(dim+1);
248 dpo[dim] = interior_dofs;
261 Assert (
false, ExcImpossibleInDim(1));
262 return std::vector<bool>();
276 std::vector<bool> ret_val(dofs_per_cell,
false);
294 initialize_test_values (std::vector<std::vector<double> > &test_values,
296 const unsigned int deg)
299 std::vector<Tensor<1,dim> > dummy1;
300 std::vector<Tensor<2,dim> > dummy2;
301 std::vector<Tensor<3,dim> > dummy3;
302 std::vector<Tensor<4,dim> > dummy4;
304 test_values.resize(quadrature.
size());
306 for (
unsigned int k=0; k<quadrature.
size(); ++k)
308 test_values[k].resize(poly.
n());
309 poly.
compute(quadrature.
point(k), test_values[k], dummy1, dummy2,
311 for (
unsigned int i=0; i < poly.
n(); ++i)
313 test_values[k][i] *= quadrature.
weight(k);
323 initialize_test_values (std::vector<std::vector<double> > &,
339 QGauss<dim-1> face_points (deg+1);
343 for (
unsigned int k=0; k<face_points.size(); ++k)
353 const unsigned int npoints
362 ::DataSetDescriptor::face(0,
true,
false,
false,
363 this->dofs_per_face));
375 for (
unsigned int k=0; k<cell_points.
size(); ++k)
389 #include "fe_bdm.inst" 391 DEAL_II_NAMESPACE_CLOSE
std::vector< std::vector< double > > test_values_cell
void initialize_support_points(const unsigned int bdm_degree)
#define AssertDimension(dim1, dim2)
std::vector< Point< dim > > generalized_support_points
FullMatrix< double > interface_constraints
::ExceptionBase & ExcMessage(std::string arg1)
const unsigned int degree
const Point< dim > & point(const unsigned int i) const
void invert(const FullMatrix< number2 > &M)
static std::vector< bool > get_ria_vector(const unsigned int degree)
FE_BDM(const unsigned int p)
std::vector< std::vector< FullMatrix< double > > > prolongation
void reinit(const TableIndices< N > &new_size, const bool omit_default_initialization=false)
#define Assert(cond, exc)
void compute(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
unsigned int size() const
const unsigned int dofs_per_cell
std::vector< Point< dim-1 > > generalized_face_support_points
virtual FiniteElement< dim > * clone() const
static unsigned int compute_n_pols(const unsigned int n)
static Quadrature< dim > project_to_all_faces(const SubQuadrature &quadrature)
virtual std::string get_name() const
std::vector< std::vector< double > > test_values_face
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
static unsigned int compute_n_pols(unsigned int degree)
const unsigned int dofs_per_face
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
virtual void interpolate(std::vector< double > &local_dofs, const std::vector< double > &values) const
FullMatrix< double > inverse_node_matrix
double weight(const unsigned int i) const