17 #include <deal.II/base/qprojector.h> 18 #include <deal.II/base/quadrature_lib.h> 19 #include <deal.II/base/std_cxx14/memory.h> 20 #include <deal.II/base/table.h> 22 #include <deal.II/dofs/dof_accessor.h> 24 #include <deal.II/fe/fe.h> 25 #include <deal.II/fe/fe_rt_bubbles.h> 26 #include <deal.II/fe/fe_tools.h> 27 #include <deal.II/fe/fe_values.h> 28 #include <deal.II/fe/mapping.h> 30 #include <deal.II/grid/tria.h> 31 #include <deal.II/grid/tria_iterator.h> 36 DEAL_II_NAMESPACE_OPEN
50 std::vector<bool>(dim, true)))
56 "Lowest order RT_Bubbles element is degree 1, but you requested for degree 0"));
71 ref_case < RefinementCase<dim>::isotropic_refinement + 1;
74 const unsigned int nc =
77 for (
unsigned int i = 0; i < nc; ++i)
78 this->
prolongation[ref_case - 1][i].reinit(n_dofs, n_dofs);
84 for (
unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
86 FETools::compute_face_embedding_matrices<dim, double>(*
this,
92 unsigned int target_row = 0;
93 for (
unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
94 for (
unsigned int i = 0; i < face_embeddings[d].m(); ++i)
96 for (
unsigned int j = 0; j < face_embeddings[d].n(); ++j)
110 std::ostringstream namebuf;
111 namebuf <<
"FE_RT_Bubbles<" << dim <<
">(" << this->
degree <<
")";
113 return namebuf.str();
119 std::unique_ptr<FiniteElement<dim, dim>>
122 return std_cxx14::make_unique<FE_RT_Bubbles<dim>>(*this);
140 unsigned int current = 0;
153 for (
unsigned int k = 0;
158 0,
true,
false,
false, this->dofs_per_face));
160 current = this->dofs_per_face * GeometryInfo<dim>::faces_per_cell;
169 std::vector<Point<1>> pts = high.
get_points();
170 pts.erase(pts.begin());
171 pts.erase(pts.end() - 1);
173 std::vector<double> wts(pts.size(), 1);
176 for (
unsigned int d = 0; d < dim; ++d)
178 std::unique_ptr<QAnisotropic<dim>> quadrature;
182 quadrature = std_cxx14::make_unique<QAnisotropic<dim>>(high);
185 quadrature = std_cxx14::make_unique<QAnisotropic<dim>>(
186 ((d == 0) ? low : high), ((d == 1) ? low : high));
190 std_cxx14::make_unique<QAnisotropic<dim>>(((d == 0) ? low : high),
191 ((d == 1) ? low : high),
199 for (
unsigned int k = 0; k < quadrature->size(); ++k)
208 std::vector<unsigned int>
213 for (
unsigned int d = 1; d < dim; ++d)
214 dofs_per_face *= deg + 1;
217 const unsigned int interior_dofs = dim * (deg - 1) * pow(deg + 1, dim - 1);
219 std::vector<unsigned int> dpo(dim + 1);
221 dpo[dim] = interior_dofs;
233 return std::vector<bool>();
245 for (
unsigned int d = 2; d < dim; ++d)
246 dofs_per_face *= deg + 1;
250 std::vector<bool> ret_val(dofs_per_cell,
false);
265 std::vector<double> & nodal_values)
const 278 unsigned int fbase = 0;
280 for (; f < GeometryInfo<dim>::faces_per_cell;
285 nodal_values[fbase + i] = support_point_values[fbase + i](
291 const unsigned int istep = (this->
dofs_per_cell - fbase) / dim;
297 for (
unsigned int i = 0; i < istep; ++i)
299 nodal_values[fbase + i] = support_point_values[fbase + i](f);
310 #include "fe_rt_bubbles.inst" 313 DEAL_II_NAMESPACE_CLOSE
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
std::vector< Point< dim > > generalized_support_points
FullMatrix< double > interface_constraints
static unsigned int compute_n_pols(const unsigned int degree)
virtual std::string get_name() const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
const unsigned int degree
std::vector< Point< dim-1 > > generalized_face_support_points
const Point< dim > & point(const unsigned int i) const
const std::vector< Point< dim > > & get_points() const
static::ExceptionBase & ExcMessage(std::string arg1)
static::ExceptionBase & ExcImpossibleInDim(int arg1)
std::vector< std::vector< FullMatrix< double > > > prolongation
void invert(const FullMatrix< number2 > &M)
void reinit(const TableIndices< N > &new_size, const bool omit_default_initialization=false)
#define Assert(cond, exc)
FE_RT_Bubbles(const unsigned int k)
static::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void initialize_support_points(const unsigned int rt_degree)
unsigned int n_components() const
const unsigned int dofs_per_cell
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
static unsigned int n_children(const RefinementCase< dim > &refinement_case)
static Quadrature< dim > project_to_all_faces(const SubQuadrature &quadrature)
const unsigned int dofs_per_face
static::ExceptionBase & ExcNotImplemented()
FullMatrix< double > inverse_node_matrix
static::ExceptionBase & ExcInternalError()
static std::vector< bool > get_ria_vector(const unsigned int degree)