17 #include <deal.II/base/qprojector.h> 18 #include <deal.II/base/quadrature_lib.h> 19 #include <deal.II/base/std_cxx14/memory.h> 21 #include <deal.II/dofs/dof_accessor.h> 23 #include <deal.II/fe/fe.h> 24 #include <deal.II/fe/fe_rt_bubbles.h> 25 #include <deal.II/fe/fe_tools.h> 26 #include <deal.II/fe/fe_values.h> 27 #include <deal.II/fe/mapping.h> 29 #include <deal.II/grid/tria.h> 30 #include <deal.II/grid/tria_iterator.h> 35 DEAL_II_NAMESPACE_OPEN
49 std::vector<bool>(dim, true)))
55 "Lowest order RT_Bubbles element is degree 1, but you requested for degree 0"));
70 ref_case < RefinementCase<dim>::isotropic_refinement + 1;
73 const unsigned int nc =
76 for (
unsigned int i = 0; i < nc; ++i)
77 this->
prolongation[ref_case - 1][i].reinit(n_dofs, n_dofs);
83 for (
unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
85 FETools::compute_face_embedding_matrices<dim, double>(*
this,
91 unsigned int target_row = 0;
92 for (
unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
93 for (
unsigned int i = 0; i < face_embeddings[d].m(); ++i)
95 for (
unsigned int j = 0; j < face_embeddings[d].n(); ++j)
109 std::ostringstream namebuf;
110 namebuf <<
"FE_RT_Bubbles<" << dim <<
">(" << this->degree <<
")";
112 return namebuf.str();
118 std::unique_ptr<FiniteElement<dim, dim>>
121 return std_cxx14::make_unique<FE_RT_Bubbles<dim>>(*this);
135 this->generalized_support_points.resize(this->dofs_per_cell);
136 this->generalized_face_support_points.resize(this->dofs_per_face);
139 unsigned int current = 0;
148 for (
unsigned int k = 0; k < this->dofs_per_face; ++k)
149 this->generalized_face_support_points[k] = face_points.point(k);
152 for (
unsigned int k = 0;
155 this->generalized_support_points[k] =
157 0,
true,
false,
false, this->dofs_per_face));
168 std::vector<Point<1>> pts = high.
get_points();
169 pts.erase(pts.begin());
170 pts.erase(pts.end() - 1);
172 std::vector<double> wts(pts.size(), 1);
175 for (
unsigned int d = 0; d < dim; ++d)
177 std::unique_ptr<QAnisotropic<dim>> quadrature;
181 quadrature = std_cxx14::make_unique<QAnisotropic<dim>>(high);
184 quadrature = std_cxx14::make_unique<QAnisotropic<dim>>(
185 ((d == 0) ? low : high), ((d == 1) ? low : high));
189 std_cxx14::make_unique<QAnisotropic<dim>>(((d == 0) ? low : high),
190 ((d == 1) ? low : high),
198 for (
unsigned int k = 0; k < quadrature->size(); ++k)
199 this->generalized_support_points[current++] = quadrature->point(k);
207 std::vector<unsigned int>
211 unsigned int dofs_per_face = 1;
212 for (
unsigned int d = 1; d < dim; ++d)
213 dofs_per_face *= deg + 1;
216 const unsigned int interior_dofs =
219 std::vector<unsigned int> dpo(dim + 1);
220 dpo[dim - 1] = dofs_per_face;
221 dpo[dim] = interior_dofs;
233 return std::vector<bool>();
242 const unsigned int dofs_per_cell =
244 unsigned int dofs_per_face = deg + 1;
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 267 Assert(support_point_values.size() == this->generalized_support_points.size(),
269 this->generalized_support_points.size()));
270 Assert(nodal_values.size() == this->dofs_per_cell,
278 unsigned int fbase = 0;
280 for (; f < GeometryInfo<dim>::faces_per_cell;
281 ++f, fbase += this->dofs_per_face)
283 for (
unsigned int i = 0; i < this->dofs_per_face; ++i)
285 nodal_values[fbase + i] = support_point_values[fbase + i](
291 const unsigned int istep = (this->dofs_per_cell - fbase) / dim;
295 while (fbase < this->dofs_per_cell)
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
FullMatrix< double > interface_constraints
const std::vector< Point< dim > > & get_points() const
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 Point< dim > & point(const unsigned int i) 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)
constexpr unsigned int pow(const unsigned int base, const int iexp)
void initialize_support_points(const unsigned int rt_degree)
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()
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
FullMatrix< double > inverse_node_matrix
static ::ExceptionBase & ExcInternalError()
static std::vector< bool > get_ria_vector(const unsigned int degree)