16 #include <deal.II/base/std_cxx14/memory.h> 18 #include <deal.II/fe/mapping_c1.h> 20 #include <deal.II/grid/manifold.h> 21 #include <deal.II/grid/tria_accessor.h> 22 #include <deal.II/grid/tria_iterator.h> 26 DEAL_II_NAMESPACE_OPEN
30 template <
int dim,
int spacedim>
37 template <
int dim,
int spacedim>
49 std::make_shared<MappingC1<dim, spacedim>::MappingC1Generic>();
60 const unsigned int dim = 1;
73 const unsigned int dim = 2;
74 const std::array<double, 2> interior_gl_points{
75 {0.5 - 0.5 * std::sqrt(1.0 / 5.0), 0.5 + 0.5 * std::sqrt(1.0 / 5.0)}};
80 for (
unsigned int line_no = 0; line_no < GeometryInfo<dim>::lines_per_cell;
85 if (line->at_boundary())
118 line->vertex(1) - line->vertex(0);
119 const double h = std::sqrt(coordinate_vector * coordinate_vector);
121 coordinate_axis /= h;
124 std::atan2(coordinate_axis[1], coordinate_axis[0]);
125 const double c = -((face_vertex_normals[0][1] * std::sin(alpha) +
126 face_vertex_normals[0][0] * std::cos(alpha)) /
127 (face_vertex_normals[0][1] * std::cos(alpha) -
128 face_vertex_normals[0][0] * std::sin(alpha)));
129 const double b = ((face_vertex_normals[1][1] * std::sin(alpha) +
130 face_vertex_normals[1][0] * std::cos(alpha)) /
131 (face_vertex_normals[1][1] * std::cos(alpha) -
132 face_vertex_normals[1][0] * std::sin(alpha))) -
135 const double t1 = interior_gl_points[0];
136 const double t2 = interior_gl_points[1];
137 const double s_t1 = (((-
b - c) * t1 + b) * t1 + c) * t1;
138 const double s_t2 = (((-
b - c) * t2 + b) * t2 + c) * t2;
146 for (
const auto &new_unit_point : new_unit_points)
148 Point<2> real_point(std::cos(alpha) * new_unit_point[0] -
149 std::sin(alpha) * new_unit_point[1],
150 std::sin(alpha) * new_unit_point[0] +
151 std::cos(alpha) * new_unit_point[1]);
153 real_point += line->vertex(0);
154 a.push_back(real_point);
163 a.push_back((1.0 - interior_gl_points[0]) * line->vertex(0) +
164 (interior_gl_points[0] * line->vertex(1)));
165 a.push_back((1.0 - interior_gl_points[1]) * line->vertex(0) +
166 (interior_gl_points[1] * line->vertex(1)));
173 template <
int dim,
int spacedim>
190 const unsigned int dim = 1;
203 const unsigned int dim = 2;
210 template <
int dim,
int spacedim>
221 template <
int dim,
int spacedim>
222 std::unique_ptr<Mapping<dim, spacedim>>
225 return std_cxx14::make_unique<MappingC1<dim, spacedim>>();
231 #include "mapping_c1.inst" 234 DEAL_II_NAMESPACE_CLOSE
std::shared_ptr< const MappingQGeneric< dim, spacedim > > qp_mapping
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
virtual void add_quad_support_points(const typename Triangulation< dim >::cell_iterator &cell, std::vector< Point< dim >> &a) const override
#define Assert(cond, exc)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
virtual void add_line_support_points(const typename Triangulation< dim >::cell_iterator &cell, std::vector< Point< dim >> &a) const override
std::array< Tensor< 1, spacedim >, GeometryInfo< dim >::vertices_per_face > FaceVertexNormals
static ::ExceptionBase & ExcNotImplemented()
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const
const Manifold< dim, spacedim > & get_manifold(const types::manifold_id number) const