1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
Index: fenics-dolfinx/cpp/demo/interpolation-io/main.cpp
===================================================================
--- fenics-dolfinx.orig/cpp/demo/interpolation-io/main.cpp 2025-11-12 15:27:14.779518727 +0100
+++ fenics-dolfinx/cpp/demo/interpolation-io/main.cpp 2025-11-12 15:28:34.478884959 +0100
@@ -7,6 +7,7 @@
// # Interpolation and IO
#include <basix/finite-element.h>
+#include <bit>
#include <cmath>
#include <concepts>
#include <dolfinx/common/log.h>
@@ -64,12 +65,16 @@
});
#ifdef HAS_ADIOS2
+ // Adios2 is not well tested on big-endian systems, so skip them
+ if constexpr (std::endian::native != std::endian::big)
+ {
// Write the function to a VTX file for visualisation, e.g. using
// ParaView
io::VTXWriter<U> outfile(mesh->comm(), filename.replace_extension("bp"), {u},
"BP4");
outfile.write(0);
outfile.close();
+ }
#endif
}
@@ -183,10 +188,14 @@
// (jump in the normal component between cells) and the x1 component
// will appear continuous (continuous tangent component between cells).
#ifdef HAS_ADIOS2
+ // Adios2 is not well tested on big-endian systems, so skip them
+ if constexpr (std::endian::native != std::endian::big)
+ {
io::VTXWriter<U> outfile(mesh->comm(), filename.replace_extension("bp"),
{u_l}, "BP4");
outfile.write(0);
outfile.close();
+ }
#endif
}
Index: fenics-dolfinx/cpp/demo/interpolation_different_meshes/main.cpp
===================================================================
--- fenics-dolfinx.orig/cpp/demo/interpolation_different_meshes/main.cpp 2025-11-12 15:27:14.779518727 +0100
+++ fenics-dolfinx/cpp/demo/interpolation_different_meshes/main.cpp 2025-11-12 15:29:11.432256585 +0100
@@ -10,6 +10,7 @@
#include <dolfinx/fem/dolfinx_fem.h>
#include <dolfinx/io/ADIOS2Writers.h>
#include <dolfinx/mesh/generation.h>
+#include <bit>
#include <memory>
using namespace dolfinx;
@@ -83,10 +84,14 @@
u_hex->interpolate(*u_tet, cells, interpolation_data);
#ifdef HAS_ADIOS2
+ // Adios2 is not well tested on big-endian systems, so skip them
+ if constexpr (std::endian::native != std::endian::big)
+ {
io::VTXWriter<double> write_tet(mesh_tet->comm(), "u_tet.bp", {u_tet});
write_tet.write(0);
io::VTXWriter<double> write_hex(mesh_hex->comm(), "u_hex.bp", {u_hex});
write_hex.write(0);
+ }
#endif
}
MPI_Finalize();
Index: fenics-dolfinx/cpp/demo/poisson/main.cpp
===================================================================
--- fenics-dolfinx.orig/cpp/demo/poisson/main.cpp 2025-11-12 15:27:14.779518727 +0100
+++ fenics-dolfinx/cpp/demo/poisson/main.cpp 2025-11-12 15:27:14.774116253 +0100
@@ -81,6 +81,7 @@
#include "poisson.h"
#include <basix/finite-element.h>
+#include <bit>
#include <cmath>
#include <dolfinx.h>
#include <dolfinx/fem/Constant.h>
@@ -251,9 +252,13 @@
file.write<T>({*u}, 0);
#ifdef HAS_ADIOS2
- // Save solution in VTX format
- io::VTXWriter<U> vtx(MPI_COMM_WORLD, "u.bp", {u}, "bp4");
- vtx.write(0);
+ // Adios2 is not well tested on big-endian systems, so skip them
+ if constexpr (std::endian::native != std::endian::big)
+ {
+ // Save solution in VTX format
+ io::VTXWriter<U> vtx(MPI_COMM_WORLD, "u.bp", {u}, "bp4");
+ vtx.write(0);
+ }
#endif
}
Index: fenics-dolfinx/python/demo/demo_interpolation-io.py
===================================================================
--- fenics-dolfinx.orig/python/demo/demo_interpolation-io.py 2025-11-12 15:27:14.779518727 +0100
+++ fenics-dolfinx/python/demo/demo_interpolation-io.py 2025-11-12 15:27:14.774808321 +0100
@@ -34,6 +34,7 @@
from mpi4py import MPI
import numpy as np
+from sys import byteorder
from dolfinx import default_scalar_type, has_adios2, plot
from dolfinx.fem import Function, functionspace
|