44 void reorder_new_to_old_style(std::vector<
CellData<1>> &)
48 void reorder_new_to_old_style(std::vector<
CellData<2>> &cells)
50 for (
auto &cell : cells)
51 std::swap(cell.vertices[2], cell.vertices[3]);
55 void reorder_new_to_old_style(std::vector<
CellData<3>> &cells)
58 for (
auto &cell : cells)
61 tmp[i] = cell.vertices[i];
71 void reorder_old_to_new_style(std::vector<
CellData<1>> &)
75 void reorder_old_to_new_style(std::vector<
CellData<2>> &cells)
78 reorder_new_to_old_style(cells);
82 void reorder_old_to_new_style(std::vector<
CellData<3>> &cells)
86 for (
auto &cell : cells)
89 tmp[i] = cell.vertices[i];
98template <
int dim,
int spacedim>
101 const bool use_new_style_ordering)
104 ExcMessage(
"List of elements to orient must have at least one cell"));
111 if (use_new_style_ordering ==
false)
112 reorder_old_to_new_style(cells);
117 if (use_new_style_ordering ==
false)
118 reorder_new_to_old_style(cells);
161 const std::vector<
Point<2>> &all_vertices,
163 const bool use_new_style_ordering)
165 if (!use_new_style_ordering)
166 reorder_old_to_new_style(cells);
170 if (!use_new_style_ordering)
171 reorder_new_to_old_style(cells);
191 const std::vector<
Point<3>> &all_vertices,
193 const bool use_new_style_ordering)
195 if (!use_new_style_ordering)
196 reorder_old_to_new_style(cells);
200 if (!use_new_style_ordering)
201 reorder_new_to_old_style(cells);
static void reorder_cells(std::vector< CellData< dim > > &original_cells, const bool use_new_style_ordering=false)
static void invert_all_cells_of_negative_grid(const std::vector< Point< spacedim > > &all_vertices, std::vector< CellData< dim > > &original_cells, const bool use_new_style_ordering=false)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)
void swap(MemorySpaceData< Number, MemorySpace > &, MemorySpaceData< Number, MemorySpace > &)