StreamType &out,
const bool legacy_format)
{
- Assert(dim <= 3 && dim > 1, ExcNotImplemented());
unsigned int first_vertex_of_patch = 0;
// Array to hold all the node numbers of a cell
std::vector<unsigned> connectivity;
/* use VTU, not VTK: */ false);
local_vertex_order[connectivity_index] =
local_index;
- flush_current_cell();
}
+ flush_current_cell();
break;
}
+/**
+ * Modified from
+ * https://github.com/Kitware/VTK/blob/265ca48a79a36538c95622c237da11133608bbe5/Common/DataModel/vtkLagrangeCurve.cxx#L478
+ */
template <>
unsigned int
ReferenceCell::vtk_lexicographic_to_node_index<1>(
- const std::array<unsigned, 1> &,
- const std::array<unsigned, 1> &,
+ const std::array<unsigned, 1> &node_indices,
+ const std::array<unsigned, 1> &nodes_per_direction,
const bool) const
{
- DEAL_II_NOT_IMPLEMENTED();
- return 0;
+ const unsigned int i = node_indices[0];
+
+ const bool ibdy = (i == 0 || i == nodes_per_direction[0]);
+ // How many boundaries do we lie on at once?
+ const int nbdy = (ibdy ? 1 : 0);
+
+ if (nbdy == 1) // Vertex DOF
+ { // ijk is a corner node. Return the proper index (somewhere in [0,7]):
+ return i ? 1 : 0;
+ }
+
+ const int offset = 2;
+ return (i - 1) + offset;
}
initlog();
unsigned cell_order = 4;
+ check<1>(deallog.get_file_stream(), cell_order);
check<2>(deallog.get_file_stream(), cell_order);
check<3>(deallog.get_file_stream(), cell_order);
}
ASCII
DATASET UNSTRUCTURED_GRID
+POINTS 5 double
+0.00000 0 0
+0.250000 0 0
+0.500000 0 0
+0.750000 0 0
+1.00000 0 0
+
+CELLS 1 6
+5 0 4 1 2 3
+
+CELL_TYPES 1
+ 68
+POINT_DATA 5
+# vtk DataFile Version 3.0
+#This file was generated
+ASCII
+DATASET UNSTRUCTURED_GRID
+
POINTS 25 double
0.00000 0.00000 0
0.250000 0.00000 0