const bool copy_manifold_ids = false,
const std::vector<types::manifold_id> &manifold_priorities = {});
+ /**
+ * Overload of extrude_triangulation() to allow dimension independent
+ * code to compile. This function throws an error when called, as
+ * extrude_triangulation() is only implemented to extrude a dim=2 to a dim=3
+ * Triangulation.
+ */
+ void
+ extrude_triangulation(
+ const Triangulation<2, 2> & input,
+ const unsigned int n_slices,
+ const double height,
+ Triangulation<2, 2> & result,
+ const bool copy_manifold_ids = false,
+ const std::vector<types::manifold_id> &manifold_priorities = {});
+
+
/**
* Overload of the previous function. Take a 2d Triangulation that is being
* extruded. Differing from the previous function taking height and number of
const bool copy_manifold_ids = false,
const std::vector<types::manifold_id> &manifold_priorities = {});
+ /**
+ * Overload of extrude_triangulation() to allow dimension independent
+ * code to compile. This function throws an error when called, as
+ * extrude_triangulation() is only implemented to extrude a dim=2 to a dim=3
+ * Triangulation.
+ */
+ void
+ extrude_triangulation(
+ const Triangulation<2, 2> & input,
+ const std::vector<double> & slice_coordinates,
+ Triangulation<2, 2> & result,
+ const bool copy_manifold_ids = false,
+ const std::vector<types::manifold_id> &manifold_priorities = {});
+
+
/**
* Given an input triangulation @p in_tria, this function makes a new flat
* given angle (given in radians, rather than degrees). This function uses
* the transform() function above, so the requirements on the triangulation
* stated there hold for this function as well.
+ *
+ * @note This function is only supported for dim=2.
*/
+ template <int dim>
void
- rotate(const double angle, Triangulation<2> &triangulation);
+ rotate(const double angle, Triangulation<dim> &triangulation);
/**
* Rotate all vertices of the given @p triangulation in counter-clockwise
+ void
+ extrude_triangulation(
+ const Triangulation<2, 2> & input,
+ const unsigned int n_slices,
+ const double height,
+ Triangulation<2, 2> & result,
+ const bool copy_manifold_ids,
+ const std::vector<types::manifold_id> &manifold_priorities)
+ {
+ (void)input;
+ (void)n_slices;
+ (void)height;
+ (void)result;
+ (void)copy_manifold_ids;
+ (void)manifold_priorities;
+
+ AssertThrow(false,
+ ExcMessage(
+ "GridTools::extrude_triangulation() is only available "
+ "for Triangulation<3, 3> as output triangulation."));
+ }
+
+
+
void
extrude_triangulation(
const Triangulation<2, 2> & input,
}
+
+ void
+ extrude_triangulation(
+ const Triangulation<2, 2> & input,
+ const std::vector<double> & slice_coordinates,
+ Triangulation<2, 2> & result,
+ const bool copy_manifold_ids,
+ const std::vector<types::manifold_id> &manifold_priorities)
+ {
+ (void)input;
+ (void)slice_coordinates;
+ (void)result;
+ (void)copy_manifold_ids;
+ (void)manifold_priorities;
+
+ AssertThrow(false,
+ ExcMessage(
+ "GridTools::extrude_triangulation() is only available "
+ "for Triangulation<3, 3> as output triangulation."));
+ }
+
+
+
template <>
void hyper_cube_with_cylindrical_hole(Triangulation<1> &,
const double,
}
-
+ template <>
void
rotate(const double angle, Triangulation<2> &triangulation)
{
transform(Rotate2d(angle), triangulation);
}
+ template <>
+ void
+ rotate(const double angle, Triangulation<3> &triangulation)
+ {
+ (void)angle;
+ (void)triangulation;
+
+ AssertThrow(
+ false, ExcMessage("GridTools::rotate() is not available for dim = 3."));
+ }
+
+
template <int dim>
void
rotate(const double angle,