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"