16 #include <deal.II/grid/tria_accessor.h> 17 #include <deal.II/grid/tria_iterator.h> 18 #include <deal.II/grid/tria_boundary.h> 19 #include <deal.II/fe/mapping_c1.h> 22 DEAL_II_NAMESPACE_OPEN
26 template <
int dim,
int spacedim>
34 template <
int dim,
int spacedim>
56 const unsigned int dim = 1;
68 const unsigned int dim = 2;
69 std::vector<Point<dim> > line_points (2);
74 for (
unsigned int line_no=0; line_no<GeometryInfo<dim>::lines_per_cell; ++line_no)
78 if (line->at_boundary())
111 const Tensor<1,2> coordinate_vector = line->vertex(1) - line->vertex(0);
112 const double h = std::sqrt(coordinate_vector * coordinate_vector);
114 coordinate_axis /= h;
116 const double alpha = std::atan2(coordinate_axis[1], coordinate_axis[0]);
117 const double c = -((face_vertex_normals[0][1] * std::sin(alpha)
118 +face_vertex_normals[0][0] * std::cos(alpha)) /
119 (face_vertex_normals[0][1] * std::cos(alpha)
120 -face_vertex_normals[0][0] * std::sin(alpha)));
121 const double b = ((face_vertex_normals[1][1] * std::sin(alpha)
122 +face_vertex_normals[1][0] * std::cos(alpha)) /
123 (face_vertex_normals[1][1] * std::cos(alpha)
124 -face_vertex_normals[1][0] * std::sin(alpha)))
128 const double t1 = quad_points.point(1)[0];
129 const double t2 = quad_points.point(2)[0];
130 const double s_t1 = (((-
b-c)*t1+b)*t1+c)*t1;
131 const double s_t2 = (((-
b-c)*t2+b)*t2+c)*t2;
140 for (
unsigned int i=0; i<2; ++i)
142 Point<2> real_point (std::cos(alpha) * new_unit_points[i][0]
143 - std::sin(alpha) * new_unit_points[i][1],
144 std::sin(alpha) * new_unit_points[i][0]
145 + std::cos(alpha) * new_unit_points[i][1]);
147 real_point += line->vertex(0);
148 a.push_back (real_point);
156 a.insert (a.end(), line_points.begin(), line_points.end());
163 template<
int dim,
int spacedim>
178 const unsigned int dim = 1;
190 const unsigned int dim = 2;
197 template<
int dim,
int spacedim>
207 template<
int dim,
int spacedim>
218 #include "mapping_c1.inst" 221 DEAL_II_NAMESPACE_CLOSE
virtual Mapping< dim, spacedim > * clone() const
const Boundary< dim, spacedim > & get_boundary(const types::manifold_id number) const
virtual void add_quad_support_points(const typename Triangulation< dim >::cell_iterator &cell, std::vector< Point< dim > > &a) const
virtual void get_intermediate_points_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line, std::vector< Point< spacedim > > &points) const
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define Assert(cond, exc)
Abstract base class for mapping classes.
virtual void add_line_support_points(const typename Triangulation< dim >::cell_iterator &cell, std::vector< Point< dim > > &a) const
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
static ::ExceptionBase & ExcNotImplemented()
std_cxx11::shared_ptr< const MappingQGeneric< dim, spacedim > > qp_mapping
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const
Triangulation< dim, spacedim > & get_triangulation()