17 #include <deal.II/base/quadrature_lib.h> 18 #include <deal.II/base/std_cxx14/memory.h> 20 #include <deal.II/fe/fe_rannacher_turek.h> 22 #include <deal.II/lac/vector.h> 28 DEAL_II_NAMESPACE_OPEN
33 const unsigned int order,
34 const unsigned int n_face_support_points)
41 std::vector<bool>(4, false),
44 , n_face_support_points(n_face_support_points)
54 std::vector<unsigned int>
57 std::vector<unsigned int> dpo(dim + 1, 0);
69 std::ostringstream namebuf;
70 namebuf <<
"FE_RannacherTurek" 72 <<
"(" << this->order <<
", " << this->n_face_support_points <<
")";
79 std::unique_ptr<FiniteElement<dim, dim>>
82 return std_cxx14::make_unique<FE_RannacherTurek<dim>>(
83 this->order, this->n_face_support_points);
93 ::QGauss<dim - 1> face_quadrature(this->n_face_support_points);
94 this->weights = face_quadrature.get_weights();
95 this->generalized_support_points.resize(4 * face_quadrature.size());
96 for (
unsigned int q = 0; q < face_quadrature.size(); ++q)
98 this->generalized_support_points[0 * face_quadrature.size() + q] =
100 this->generalized_support_points[1 * face_quadrature.size() + q] =
102 this->generalized_support_points[2 * face_quadrature.size() + q] =
104 this->generalized_support_points[3 * face_quadrature.size() + q] =
115 std::vector<double> & nodal_values)
const 118 this->generalized_support_points.size());
121 const unsigned int q_points_per_face = this->weights.size();
122 std::fill(nodal_values.begin(), nodal_values.end(), 0.0);
124 std::vector<Vector<double>>::const_iterator value =
125 support_point_values.begin();
126 for (
unsigned int face = 0; face < ::GeometryInfo<dim>::faces_per_cell;
129 for (
unsigned int q = 0; q < q_points_per_face; ++q)
131 nodal_values[face] += (*value)[0] * this->weights[q];
140 #include "fe_rannacher_turek.inst" 142 DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
FE_RannacherTurek(const unsigned int order=0, const unsigned int n_face_support_points=2)
void initialize_support_points()
virtual std::string get_name() const override
#define Assert(cond, exc)
static ::ExceptionBase & ExcNotImplemented()
std::vector< unsigned int > get_dpo_vector()
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
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