class RefinementCase : public RefinementPossibilities<dim>
{
public:
+ /**
+ * A variable indicating the number of possible refinement cases.
+ */
+ static constexpr unsigned int n_refinement_cases = (1 << dim);
+
/**
* Default constructor. Initialize the refinement case with no_refinement.
*/
static RefinementCase
cut_axis(const unsigned int i);
+ /**
+ * Return an array that lists all possible refinement cases possible in
+ * the given space dimension. For example, for `dim==1`, it returns an
+ * array that only contains `{ RefinementCase<1>::no_refinement,
+ * RefinementCase<1>::cut_x }`. In `dim==2`, it returns
+ * `{ RefinementCase<1>::no_refinement, RefinementCase<2>::cut_x,
+ * RefinementCase<2>::cut_y, RefinementCase<2>::cut_xy }`.
+ */
+ static std::array<RefinementCase<dim>, n_refinement_cases>
+ all_refinement_cases();
+
/**
* Return the amount of memory occupied by an object of this type.
*/
};
+
namespace internal
{
/**
+template <>
+inline std::array<RefinementCase<1>, 2>
+RefinementCase<1>::all_refinement_cases()
+{
+ return {{RefinementPossibilities<1>::no_refinement,
+ RefinementPossibilities<1>::cut_x}};
+}
+
+
+
+template <>
+inline std::array<RefinementCase<2>, 4>
+RefinementCase<2>::all_refinement_cases()
+{
+ return {{RefinementPossibilities<2>::no_refinement,
+ RefinementPossibilities<2>::cut_x,
+ RefinementPossibilities<2>::cut_y,
+ RefinementPossibilities<2>::cut_xy}};
+}
+
+
+
+template <>
+inline std::array<RefinementCase<3>, 8>
+RefinementCase<3>::all_refinement_cases()
+{
+ return {{RefinementPossibilities<3>::no_refinement,
+ RefinementPossibilities<3>::cut_x,
+ RefinementPossibilities<3>::cut_y,
+ RefinementPossibilities<3>::cut_xy,
+ RefinementPossibilities<3>::cut_z,
+ RefinementPossibilities<3>::cut_xz,
+ RefinementPossibilities<3>::cut_yz,
+ RefinementPossibilities<3>::cut_xyz}};
+}
+
+
+
template <int dim>
inline RefinementCase<dim>::RefinementCase()
: value(RefinementPossibilities<dim>::no_refinement)