16 #ifndef dealii_tria_manifold_h 17 #define dealii_tria_manifold_h 36 template <
int,
typename>
52 template <
typename MeshIteratorType>
53 inline constexpr std::size_t
111 template <
typename MeshIteratorType>
114 const bool with_interpolation =
false);
158 template <
typename MeshIteratorType>
159 std::pair<std::array<Point<MeshIteratorType::AccessorType::space_dimension>,
160 n_default_points_per_cell<MeshIteratorType>()>,
161 std::array<
double, n_default_points_per_cell<MeshIteratorType>()>>
163 const bool with_interpolation =
false);
333 template <
int dim,
int spacedim = dim>
338 static_assert(dim <= spacedim,
339 "The dimension <dim> of a Manifold must be less than or " 340 "equal to the space dimension <spacedim> in which it lives.");
362 virtual ~
Manifold()
override =
default;
369 virtual std::unique_ptr<Manifold<dim, spacedim>>
397 const double w)
const;
475 get_new_point_on_line(
496 get_new_point_on_quad(
518 get_new_point_on_hex(
529 get_new_point_on_face(
540 get_new_point_on_cell(
662 get_normals_at_vertices(
681 template <
int dim,
int spacedim = dim>
713 const double tolerance = 1
e-10);
718 virtual std::unique_ptr<Manifold<dim, spacedim>>
719 clone()
const override;
819 get_normals_at_vertices(
828 get_periodicity()
const;
850 <<
"The component number " << arg1 <<
" of the point [ " 851 << arg2 <<
" ] is not in the interval [ 0, " << arg3
852 <<
"), bailing out.");
950 template <
int dim,
int spacedim = dim,
int chartdim = dim>
955 static_assert(dim <= spacedim,
956 "The dimension <dim> of a ChartManifold must be less than or " 957 "equal to the space dimension <spacedim> in which it lives.");
988 const double w)
const override;
1123 get_periodicity()
const;
1188 template <
typename MeshIteratorType>
1191 const bool with_interpolation)
1193 const auto points_and_weights =
1195 static const int spacedim = MeshIteratorType::AccessorType::space_dimension;
1197 std::vector<Point<spacedim>>(points_and_weights.first.begin(),
1198 points_and_weights.first.end()),
1199 std::vector<double>(points_and_weights.second.begin(),
1200 points_and_weights.second.end()));
1205 template <
typename MeshIteratorType>
1206 std::pair<std::array<Point<MeshIteratorType::AccessorType::space_dimension>,
1207 n_default_points_per_cell<MeshIteratorType>()>,
1208 std::array<
double, n_default_points_per_cell<MeshIteratorType>()>>
1210 const bool with_interpolation)
1212 const int dim = MeshIteratorType::AccessorType::structure_dimension;
1213 const int spacedim = MeshIteratorType::AccessorType::space_dimension;
1214 constexpr std::size_t points_per_cell =
1215 n_default_points_per_cell<MeshIteratorType>();
1217 std::pair<std::array<Point<spacedim>, points_per_cell>,
1218 std::array<double, points_per_cell>>
1231 points_weights.first[0] = iterator->vertex(0);
1232 points_weights.second[0] = .5;
1233 points_weights.first[1] = iterator->vertex(1);
1234 points_weights.second[1] = .5;
1240 for (
unsigned int i = 0; i < 4; ++i)
1242 points_weights.first[i] = iterator->vertex(i);
1243 points_weights.first[4 + i] =
1244 (iterator->line(i)->has_children() ?
1245 iterator->line(i)->child(0)->vertex(1) :
1246 iterator->line(i)->get_manifold().get_new_point_on_line(
1247 iterator->line(i)));
1250 if (with_interpolation)
1252 std::fill(points_weights.second.begin(),
1253 points_weights.second.begin() + 4,
1255 std::fill(points_weights.second.begin() + 4,
1256 points_weights.second.end(),
1260 std::fill(points_weights.second.begin(),
1261 points_weights.second.end(),
1273 auto *sp3 =
reinterpret_cast< 1274 std::array<Point<3>, n_default_points_per_cell<decltype(hex)>()
> 1275 *>(&points_weights.first);
1284 if (with_interpolation)
1286 for (
unsigned int i = 0;
1287 i < GeometryInfo<dim>::vertices_per_cell;
1290 (*sp3)[j] = hex->vertex(i);
1291 points_weights.second[j] = 1.0 / 8.0;
1293 for (
unsigned int i = 0; i < GeometryInfo<dim>::lines_per_cell;
1297 (hex->line(i)->has_children() ?
1298 hex->line(i)->child(0)->vertex(1) :
1299 hex->line(i)->get_manifold().get_new_point_on_line(
1301 points_weights.second[j] = -1.0 / 4.0;
1303 for (
unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell;
1307 (hex->quad(i)->has_children() ?
1308 hex->quad(i)->isotropic_child(0)->vertex(3) :
1309 hex->quad(i)->get_manifold().get_new_point_on_quad(
1311 points_weights.second[j] = 1.0 / 2.0;
1317 std::fill(points_weights.second.begin(),
1318 points_weights.second.end(),
1326 return points_weights;
std::pair< std::array< Point< MeshIteratorType::AccessorType::space_dimension >, n_default_points_per_cell< MeshIteratorType >)>, std::array< double, n_default_points_per_cell< MeshIteratorType >)> > get_default_points_and_weights(const MeshIteratorType &iterator, const bool with_interpolation=false)
Point< dim > push_forward(const TopoDS_Shape &in_shape, const double u, const double v)
typename IteratorSelector::line_iterator line_iterator
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
virtual Point< spacedim > get_new_point_on_hex(const typename Triangulation< dim, spacedim >::hex_iterator &hex) const
typename IteratorSelector::hex_iterator hex_iterator
constexpr std::size_t n_default_points_per_cell()
Quadrature< MeshIteratorType::AccessorType::space_dimension > get_default_quadrature(const MeshIteratorType &iterator, const bool with_interpolation=false)
#define Assert(cond, exc)
#define DEAL_II_NAMESPACE_CLOSE
typename IteratorSelector::quad_iterator quad_iterator
const FlatManifold< chartdim, chartdim > sub_manifold
Tensor< 2, dim, Number > w(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
#define DEAL_II_NAMESPACE_OPEN
virtual Point< spacedim > get_new_point_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad) const
std::array< Tensor< 1, spacedim >, GeometryInfo< dim >::vertices_per_face > FaceVertexNormals
#define DeclException3(Exception3, type1, type2, type3, outsequence)
Point< spacedim > get_new_point_on_face(const typename Triangulation< dim, spacedim >::face_iterator &face) const
#define DEAL_II_DEPRECATED
const Tensor< 1, spacedim > periodicity
static ::ExceptionBase & ExcInternalError()