Skip to content

Commit 1f68407

Browse files
committed
Adapt c++ demos
1 parent 9a04825 commit 1f68407

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

cpp/demo/interpolation-io/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ void interpolate_scalar(std::shared_ptr<mesh::Mesh<U>> mesh,
6666
#ifdef HAS_ADIOS2
6767
// Write the function to a VTX file for visualisation, e.g. using
6868
// ParaView
69-
io::VTXWriter<U> outfile(mesh->comm(), filename.replace_extension("bp"), {u},
70-
"BP4");
69+
io::VTXWriter<U> outfile(mesh->comm(), filename.replace_extension("bp"), "w",
70+
{u}, "BP4");
7171
outfile.write(0);
7272
outfile.close();
7373
#endif
@@ -183,7 +183,7 @@ void interpolate_nedelec(std::shared_ptr<mesh::Mesh<U>> mesh,
183183
// (jump in the normal component between cells) and the x1 component
184184
// will appear continuous (continuous tangent component between cells).
185185
#ifdef HAS_ADIOS2
186-
io::VTXWriter<U> outfile(mesh->comm(), filename.replace_extension("bp"),
186+
io::VTXWriter<U> outfile(mesh->comm(), filename.replace_extension("bp"), "w",
187187
{u_l}, "BP4");
188188
outfile.write(0);
189189
outfile.close();

cpp/demo/interpolation_different_meshes/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ int main(int argc, char* argv[])
8686
u_hex->interpolate(*u_tet, cells, eps, max_iter, interpolation_data);
8787

8888
#ifdef HAS_ADIOS2
89-
io::VTXWriter<double> write_tet(mesh_tet->comm(), "u_tet.bp", {u_tet});
89+
io::VTXWriter<double> write_tet(mesh_tet->comm(), "u_tet.bp", "w", {u_tet});
9090
write_tet.write(0);
91-
io::VTXWriter<double> write_hex(mesh_hex->comm(), "u_hex.bp", {u_hex});
91+
io::VTXWriter<double> write_hex(mesh_hex->comm(), "u_hex.bp", "w", {u_hex});
9292
write_hex.write(0);
9393
#endif
9494
}

cpp/demo/mixed_poisson/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ int main(int argc, char* argv[])
364364

365365
#ifdef HAS_ADIOS2
366366
// Save solution in VTX format
367-
io::VTXWriter<U> vtx_u(MPI_COMM_WORLD, "u.bp", {u_soln}, "bp4");
367+
io::VTXWriter<U> vtx_u(MPI_COMM_WORLD, "u.bp", "w", {u_soln}, "bp4");
368368
vtx_u.write(0);
369369
// Save interpolated boundary condition
370-
io::VTXWriter<U> vtx_u0(MPI_COMM_WORLD, "u0.bp", {u0}, "bp4");
370+
io::VTXWriter<U> vtx_u0(MPI_COMM_WORLD, "u0.bp", "w", {u0}, "bp4");
371371
vtx_u0.write(0);
372372
#endif
373373
}

cpp/demo/poisson/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ int main(int argc, char* argv[])
250250

251251
#ifdef HAS_ADIOS2
252252
// Save solution in VTX format
253-
io::VTXWriter<U> vtx(MPI_COMM_WORLD, "u.bp", {u}, "bp4");
253+
io::VTXWriter<U> vtx(MPI_COMM_WORLD, "u.bp", "w", {u}, "bp4");
254254
vtx.write(0);
255255
#endif
256256
}

0 commit comments

Comments
 (0)