17 #include <deal.II/base/quadrature_lib.h> 18 #include <deal.II/base/qprojector.h> 19 #include <deal.II/base/table.h> 20 #include <deal.II/grid/tria.h> 21 #include <deal.II/grid/tria_iterator.h> 22 #include <deal.II/dofs/dof_accessor.h> 23 #include <deal.II/fe/fe.h> 24 #include <deal.II/fe/mapping.h> 25 #include <deal.II/fe/fe_rt_bubbles.h> 26 #include <deal.II/fe/fe_values.h> 27 #include <deal.II/fe/fe_tools.h> 30 #include <deal.II/base/std_cxx14/memory.h> 33 DEAL_II_NAMESPACE_OPEN
45 std::vector<bool>(dim,true)))
48 Assert (deg >= 1,
ExcMessage(
"Lowest order RT_Bubbles element is degree 1, but you requested for degree 0"));
63 ref_case<RefinementCase<dim>::isotropic_refinement+1; ++ref_case)
67 for (
unsigned int i=0; i<nc; ++i)
68 this->
prolongation[ref_case-1][i].reinit (n_dofs, n_dofs);
74 for (
unsigned int i=0; i<GeometryInfo<dim>::max_children_per_face; ++i)
76 FETools::compute_face_embedding_matrices<dim,double>(*
this, face_embeddings, 0, 0);
79 unsigned int target_row=0;
80 for (
unsigned int d=0; d<GeometryInfo<dim>::max_children_per_face; ++d)
81 for (
unsigned int i=0; i<face_embeddings[d].m(); ++i)
83 for (
unsigned int j=0; j<face_embeddings[d].n(); ++j)
97 std::ostringstream namebuf;
98 namebuf <<
"FE_RT_Bubbles<" << dim <<
">(" << this->degree <<
")";
100 return namebuf.str();
108 return std_cxx14::make_unique<FE_RT_Bubbles<dim>>(*this);
122 this->generalized_support_points.resize (this->dofs_per_cell);
123 this->generalized_face_support_points.resize (this->dofs_per_face);
126 unsigned int current = 0;
134 Assert (face_points.size() == this->dofs_per_face,
136 for (
unsigned int k=0; k<this->dofs_per_face; ++k)
137 this->generalized_face_support_points[k] = face_points.point(k);
139 for (
unsigned int k=0;
143 ::DataSetDescriptor::face(0,
147 this->dofs_per_face));
158 std::vector<Point<1>> pts = high.
get_points();
159 pts.erase(pts.begin());
160 pts.erase(pts.end()-1);
162 std::vector<double> wts(pts.size(),1);
165 for (
unsigned int d=0; d<dim; ++d)
167 std::unique_ptr<QAnisotropic<dim> > quadrature;
171 quadrature = std_cxx14::make_unique<QAnisotropic<dim>>(high);
174 quadrature = std_cxx14::make_unique<QAnisotropic<dim>>(((d==0) ? low : high),
175 ((d==1) ? low : high));
178 quadrature = std_cxx14::make_unique<QAnisotropic<dim>>(((d==0) ? low : high),
179 ((d==1) ? low : high),
180 ((d==2) ? low : high));
186 for (
unsigned int k=0; k<quadrature->size(); ++k)
187 this->generalized_support_points[current++] = quadrature->point(k);
195 std::vector<unsigned int>
199 unsigned int dofs_per_face = 1;
200 for (
unsigned int d=1; d<dim; ++d)
201 dofs_per_face *= deg+1;
205 interior_dofs = dim*(deg-1)*
pow(deg+1,dim-1);
207 std::vector<unsigned int> dpo(dim+1);
208 dpo[dim-1] = dofs_per_face;
209 dpo[dim] = interior_dofs;
221 return std::vector<bool>();
231 unsigned int dofs_per_face = deg+1;
232 for (
unsigned int d=2; d<dim; ++d)
233 dofs_per_face *= deg+1;
237 std::vector<bool> ret_val(dofs_per_cell,
false);
239 i < dofs_per_cell; ++i)
251 std::vector<double> &nodal_values)
const 253 Assert (support_point_values.size() == this->generalized_support_points.size(),
255 Assert (nodal_values.size() == this->dofs_per_cell,
262 unsigned int fbase = 0;
264 for (; f<GeometryInfo<dim>::faces_per_cell;
265 ++f, fbase+=this->dofs_per_face)
267 for (
unsigned int i=0; i<this->dofs_per_face; ++i)
274 const unsigned int istep = (this->dofs_per_cell - fbase) / dim;
278 while (fbase < this->dofs_per_cell)
280 for (
unsigned int i=0; i<istep; ++i)
282 nodal_values[fbase+i] = support_point_values[fbase+i](f);
293 #include "fe_rt_bubbles.inst" 296 DEAL_II_NAMESPACE_CLOSE
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)
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
VectorizedArray< Number > pow(const ::VectorizedArray< Number > &x, const Number p)
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)