Skip to content

Commit d866971

Browse files
committed
Renumber nodes from exodus input
To be consistent with dat-style input
1 parent 33e0834 commit d866971

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

src/core/io/src/4C_io_meshreader.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,11 @@ namespace
822822

823823
const auto& geometry_data = data.group(exodus_reader.section_name);
824824
const auto& exodus_file = geometry_data.get<std::filesystem::path>("FILE");
825-
exodus_reader.mesh_on_rank_zero =
826-
std::make_unique<Core::IO::Exodus::Mesh>(exodus_file.string());
825+
exodus_reader.mesh_on_rank_zero = std::make_unique<Core::IO::Exodus::Mesh>(
826+
exodus_file.string(), Core::IO::Exodus::MeshParameters{
827+
// We internally depend on node numbers starting at 0.
828+
.node_start_id = 0,
829+
});
827830
const auto& mesh = *exodus_reader.mesh_on_rank_zero;
828831

829832
// Initial implementation:

tests/input_files/contact3D_exodus_in.4C.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ DESIGN SURF DIRICH CONDITIONS:
8282
RESULT DESCRIPTION:
8383
- STRUCTURE:
8484
DIS: structure
85-
NODE: 1270
85+
NODE: 1269
8686
QUANTITY: dispx
8787
VALUE: -8.31974725251016095e-03
8888
TOLERANCE: 1e-8
8989
- STRUCTURE:
9090
DIS: structure
91-
NODE: 1372
91+
NODE: 1371
9292
QUANTITY: dispx
9393
VALUE: -8.36015173005985428e-03
9494
TOLERANCE: 1e-8

tests/input_files/fluid_exodus_in.4C.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,73 +65,73 @@ DESIGN POINT DIRICH CONDITIONS:
6565
RESULT DESCRIPTION:
6666
- FLUID:
6767
DIS: "fluid"
68-
NODE: 2912
68+
NODE: 2911
6969
QUANTITY: "velx"
7070
VALUE: 0
7171
TOLERANCE: 1e-08
7272
- FLUID:
7373
DIS: "fluid"
74-
NODE: 2912
74+
NODE: 2911
7575
QUANTITY: "vely"
7676
VALUE: 0
7777
TOLERANCE: 1e-08
7878
- FLUID:
7979
DIS: "fluid"
80-
NODE: 2912
80+
NODE: 2911
8181
QUANTITY: "pressure"
8282
VALUE: 2.316272235592883
8383
TOLERANCE: 1e-10
8484
- FLUID:
8585
DIS: "fluid"
86-
NODE: 4034
86+
NODE: 4033
8787
QUANTITY: "velx"
8888
VALUE: 0
8989
TOLERANCE: 1e-08
9090
- FLUID:
9191
DIS: "fluid"
92-
NODE: 4034
92+
NODE: 4033
9393
QUANTITY: "vely"
9494
VALUE: 0
9595
TOLERANCE: 1e-08
9696
- FLUID:
9797
DIS: "fluid"
98-
NODE: 4034
98+
NODE: 4033
9999
QUANTITY: "pressure"
100100
VALUE: 1.5110014506671248
101101
TOLERANCE: 1e-08
102102
- FLUID:
103103
DIS: "fluid"
104-
NODE: 6667
104+
NODE: 6666
105105
QUANTITY: "velx"
106106
VALUE: 0.8140348125434049
107107
TOLERANCE: 1e-08
108108
- FLUID:
109109
DIS: "fluid"
110-
NODE: 6667
110+
NODE: 6666
111111
QUANTITY: "vely"
112112
VALUE: -0.022743581282554975
113113
TOLERANCE: 1e-10
114114
- FLUID:
115115
DIS: "fluid"
116-
NODE: 6667
116+
NODE: 6666
117117
QUANTITY: "pressure"
118118
VALUE: 2.0581385928541125
119119
TOLERANCE: 1e-10
120120
- FLUID:
121121
DIS: "fluid"
122-
NODE: 6998
122+
NODE: 6997
123123
QUANTITY: "velx"
124124
VALUE: 0.9708173796517694
125125
TOLERANCE: 1e-08
126126
- FLUID:
127127
DIS: "fluid"
128-
NODE: 6998
128+
NODE: 6997
129129
QUANTITY: "vely"
130130
VALUE: -7.977045433472414e-16
131131
TOLERANCE: 1e-08
132132
- FLUID:
133133
DIS: "fluid"
134-
NODE: 6998
134+
NODE: 6997
135135
QUANTITY: "pressure"
136136
VALUE: 1.8450141345624358
137137
TOLERANCE: 1e-10

0 commit comments

Comments
 (0)