Skip to content

Commit c7232a5

Browse files
committed
fixed variable inside a case
1 parent f044993 commit c7232a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mesh/vtk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ int feenox_mesh_write_header_vtk(mesh_t *mesh, FILE *file) {
7474

7575
int feenox_mesh_write_vtk_cells(mesh_t *mesh, FILE *file, int with_size) {
7676

77+
int is_tet10 = 0;
7778
for (size_t i = 0; i < mesh->n_elements; i++) {
7879
element_t *element = &mesh->element[i];
7980
if (element->type->dim == mesh->dim_topo) {
@@ -95,7 +96,7 @@ int feenox_mesh_write_vtk_cells(mesh_t *mesh, FILE *file, int with_size) {
9596
fprintf(file, "\n");
9697
break;
9798
default:
98-
int is_tet10 = vtkfromgmsh_types[element->type->id] == 24;
99+
is_tet10 = vtkfromgmsh_types[element->type->id] == 24;
99100
for (int j = 0; j < element->type->nodes; j++) {
100101
// tet10 has nodes 8 & 9 swapped
101102
if (is_tet10 && (j == 8 || j == 9)) {

0 commit comments

Comments
 (0)