17 #include <deal.II/fe/fe_p1nc.h> 19 DEAL_II_NAMESPACE_OPEN
28 std::vector<bool> (1, false),
78 std::vector<unsigned int>
81 std::vector<unsigned int> dpo(3);
90 std_cxx11::array<std_cxx11::array<double,3>,4>
94 const Point<2> mpt[4] = { (cell->vertex(0) + cell->vertex(2)) / 2,
95 (cell->vertex(1) + cell->vertex(3)) / 2,
96 (cell->vertex(0) + cell->vertex(1)) / 2,
97 (cell->vertex(2) + cell->vertex(3)) / 2
101 const Point<2> cpt = (cell->vertex(0) +
104 cell->vertex(3)) / 4;
106 const double det = (mpt[0](0)-mpt[1](0))*(mpt[2](1)-mpt[3](1)) - (mpt[2](0)-mpt[3](0))*(mpt[0](1)-mpt[1](1));
108 std_cxx11::array<std_cxx11::array<double,3>,4> coeffs;
109 coeffs[0][0] = ((mpt[2](1)-mpt[3](1))*(0.5) -(mpt[0](1)-mpt[1](1))*(0.5))/det;
110 coeffs[1][0] = ((mpt[2](1)-mpt[3](1))*(-0.5) -(mpt[0](1)-mpt[1](1))*(0.5))/det;
111 coeffs[2][0] = ((mpt[2](1)-mpt[3](1))*(0.5) -(mpt[0](1)-mpt[1](1))*(-0.5))/det;
112 coeffs[3][0] = ((mpt[2](1)-mpt[3](1))*(-0.5) -(mpt[0](1)-mpt[1](1))*(-0.5))/det;
114 coeffs[0][1] = (-(mpt[2](0)-mpt[3](0))*(0.5) +(mpt[0](0)-mpt[1](0))*(0.5))/det;
115 coeffs[1][1] = (-(mpt[2](0)-mpt[3](0))*(-0.5) +(mpt[0](0)-mpt[1](0))*(0.5))/det;
116 coeffs[2][1] = (-(mpt[2](0)-mpt[3](0))*(0.5) +(mpt[0](0)-mpt[1](0))*(-0.5))/det;
117 coeffs[3][1] = (-(mpt[2](0)-mpt[3](0))*(-0.5) +(mpt[0](0)-mpt[1](0))*(-0.5))/det;
119 coeffs[0][2] = 0.25 - cpt(0)*coeffs[0][0] - cpt(1)*coeffs[0][1];
120 coeffs[1][2] = 0.25 - cpt(0)*coeffs[1][0] - cpt(1)*coeffs[1][1];
121 coeffs[2][2] = 0.25 - cpt(0)*coeffs[2][0] - cpt(1)*coeffs[2][1];
122 coeffs[3][2] = 0.25 - cpt(0)*coeffs[3][0] - cpt(1)*coeffs[3][1];
139 const unsigned int n_q_points = quadrature.
size();
152 FE_P1NC::get_face_data (
const UpdateFlags update_flags,
161 const unsigned int n_q_points = quadrature.
size();
174 FE_P1NC::get_subface_data (
const UpdateFlags update_flags,
183 const unsigned int n_q_points = quadrature.
size();
214 for (
unsigned int i=0; i<n_q_points; ++i)
221 for (
unsigned int i=0; i<n_q_points; ++i)
231 const unsigned int face_no,
235 const ::internal::FEValues::MappingRelatedData<2,2> &,
236 const InternalDataBase &fe_internal,
242 const std_cxx11::array<std_cxx11::array<double,3>,4> coeffs
249 for (
unsigned int i=0; i<quadrature_on_face.
size(); ++i)
255 output_data.
shape_values[k][i] = (coeffs[k][0]*quadrature_point(0) +
256 coeffs[k][1]*quadrature_point(1) +
261 for (
unsigned int i=0; i<quadrature_on_face.
size(); ++i)
271 const unsigned int face_no,
272 const unsigned int sub_no,
276 const ::internal::FEValues::MappingRelatedData<2,2> &,
277 const InternalDataBase &fe_internal,
283 const std_cxx11::array<std_cxx11::array<double,3>,4> coeffs
290 for (
unsigned int i=0; i<quadrature_on_subface.
size(); ++i)
297 output_data.
shape_values[k][i] = (coeffs[k][0]*quadrature_point(0) +
298 coeffs[k][1]*quadrature_point(1) +
304 for (
unsigned int i=0; i<quadrature_on_subface.
size(); ++i)
323 DEAL_II_NAMESPACE_CLOSE
Transformed quadrature weights.
FullMatrix< double > interface_constraints
virtual FiniteElement< 2, 2 >::InternalDataBase * get_data(const UpdateFlags update_flags, const Mapping< 2, 2 > &, const Quadrature< 2 > &quadrature, ::internal::FEValues::FiniteElementRelatedData< 2, 2 > &output_data) const
const Point< dim > & point(const unsigned int i) const
Transformed quadrature points.
static std_cxx11::array< std_cxx11::array< double, 3 >, 4 > get_linear_shape_coefficients(const Triangulation< 2, 2 >::cell_iterator &cell)
static std::vector< unsigned int > get_dpo_vector()
virtual void fill_fe_values(const Triangulation< 2, 2 >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< 2 > &quadrature, const Mapping< 2, 2 > &mapping, const Mapping< 2, 2 >::InternalDataBase &mapping_internal, const internal::FEValues::MappingRelatedData< 2, 2 > &mapping_data, const FiniteElement< 2, 2 >::InternalDataBase &fe_internal, internal::FEValues::FiniteElementRelatedData< 2, 2 > &output_data) const
static void project_to_subface(const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, std::vector< Point< dim > > &q_points, const RefinementCase< dim-1 > &ref_case=RefinementCase< dim-1 >::isotropic_refinement)
virtual UpdateFlags requires_update_flags(const UpdateFlags flags) const
Abstract base class for mapping classes.
std::vector< Point< dim-1 > > unit_face_support_points
Second derivatives of shape functions.
virtual FiniteElement< 2, 2 > * clone() const
virtual std::string get_name() const
unsigned int size() const
const unsigned int dofs_per_cell
virtual void fill_fe_face_values(const Triangulation< 2, 2 >::cell_iterator &cell, const unsigned int face_no, const Quadrature< 1 > &quadrature, const Mapping< 2, 2 > &mapping, const Mapping< 2, 2 >::InternalDataBase &mapping_internal, const ::internal::FEValues::MappingRelatedData< 2, 2 > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValues::FiniteElementRelatedData< 2, 2 > &output_data) const
static void project_to_face(const SubQuadrature &quadrature, const unsigned int face_no, std::vector< Point< dim > > &q_points)
Shape function gradients.
void initialize_constraints()
virtual Point< spacedim > transform_unit_to_real_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &p) const =0
TableIndices< 2 > interface_constraints_size() const
void fill(InputIterator entries, const bool C_style_indexing=true)
virtual void fill_fe_subface_values(const Triangulation< 2, 2 >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< 1 > &quadrature, const Mapping< 2, 2 > &mapping, const Mapping< 2, 2 >::InternalDataBase &mapping_internal, const ::internal::FEValues::MappingRelatedData< 2, 2 > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValues::FiniteElementRelatedData< 2, 2 > &output_data) const