17 #include <deal.II/fe/fe_rannacher_turek.h> 18 #include <deal.II/base/quadrature_lib.h> 19 #include <deal.II/lac/vector.h> 25 DEAL_II_NAMESPACE_OPEN
30 const unsigned int n_face_support_points) :
37 std::vector<bool>(4, false),
40 n_face_support_points(n_face_support_points)
42 Assert(dim == 2, ExcNotImplemented());
43 Assert(degree == 0, ExcNotImplemented());
52 std::vector<unsigned int> dpo(dim + 1, 0);
63 std::ostringstream namebuf;
64 namebuf <<
"FE_RannacherTurek" 83 Assert(dim == 2, ExcNotImplemented());
85 this->
weights = face_quadrature.get_weights();
87 for (
unsigned int q = 0;
88 q < face_quadrature.size();
106 std::vector<double> &local_dofs,
107 const std::vector<double> &values)
const 112 const unsigned int q_points_per_face = this->
weights.size();
113 std::fill(local_dofs.begin(), local_dofs.end(), 0.0);
115 std::vector<double>::const_iterator value = values.begin();
116 for (
unsigned int face = 0;
117 face < ::GeometryInfo<dim>::faces_per_cell;
120 for (
unsigned int q = 0;
121 q < q_points_per_face;
124 local_dofs[face] += (*value) * this->
weights[q];
134 std::vector<double> &local_dofs,
136 unsigned int offset)
const 142 std::vector<double> scalar_values(values.size());
143 for (
unsigned int q = 0; q < values.size(); ++q)
145 scalar_values[q] = values[q][offset];
154 std::vector<double> &local_dofs,
155 const VectorSlice<
const std::vector<std::vector<double> > > &values)
const 162 std::vector<double> scalar_values(values[0].size());
163 for (
unsigned int q = 0; q < values[0].size(); ++q)
165 scalar_values[q] = values[0][q];
173 #include "fe_rannacher_turek.inst" 175 DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
std::vector< Point< dim > > generalized_support_points
void initialize_support_points()
const unsigned int n_face_support_points
const unsigned int degree
FE_RannacherTurek(const unsigned int degree=0, const unsigned int n_face_support_points=2)
virtual FiniteElement< dim > * clone() const
#define Assert(cond, exc)
virtual std::string get_name() const
std::vector< double > weights
const unsigned int dofs_per_cell
virtual void interpolate(std::vector< double > &local_dofs, const std::vector< double > &values) const
std::vector< unsigned int > get_dpo_vector()