diff --git a/docker/Dockerfile.noble b/docker/Dockerfile.noble index 241843554e..21c138bbb7 100644 --- a/docker/Dockerfile.noble +++ b/docker/Dockerfile.noble @@ -20,11 +20,13 @@ RUN apt-get update && \ echo "Europe/London" > /etc/timezone && \ apt-get -y install fluidity-dev texlive-pstricks texlive texlive-latex-extra texlive-science python3-pip python3-junit.xml && \ apt-get -y install sudo flex bison && \ + apt-get -y install gmsh && \ apt-get clean # Use old version of gmsh in CI to avoid mesh-sensitive tests failing -WORKDIR /usr/local -RUN curl -fsL https://gmsh.info/bin/Linux/gmsh-2.16.0-Linux64.tgz | tar --strip-components=1 -zxf - +# WORKDIR /usr/local +# RUN curl -fsL https://gmsh.info/bin/Linux/gmsh-2.16.0-Linux64.tgz | tar --strip-components=1 -zxf - +RUN gmsh --version ENV OMPI_MCA_btl_vader_single_copy_mechanism=none ENV OMPI_MCA_rmaps_base_oversubscribe=1 diff --git a/docker/actions/Dockerfile.actions.noble b/docker/actions/Dockerfile.actions.noble index 08d68cdde4..9bce214c3c 100644 --- a/docker/actions/Dockerfile.actions.noble +++ b/docker/actions/Dockerfile.actions.noble @@ -1,4 +1,4 @@ -FROM fluidity/baseimages:noble +FROM fluidity/baseimages:noble-gmsh4 USER root diff --git a/python/fluidity/diagnostics/gmshtools.py b/python/fluidity/diagnostics/gmshtools.py index 371bf2a78c..6fc0720b36 100644 --- a/python/fluidity/diagnostics/gmshtools.py +++ b/python/fluidity/diagnostics/gmshtools.py @@ -290,6 +290,9 @@ def ReadBinaryMshV2(fileHandle, dataSize): def ReadBinaryMshV4(fileHandle, dataSize): + raise Warning("Fluidity's gmshtools does not correctly read physical surface ids " + "for meshes in .msh format version 4. If these are required save your .msh-file" + "in .msh format version 2 (e.g. using -format msh2 on the command line).") if dataSize == 4: sizeFormat = "i" elif dataSize == 8: @@ -410,6 +413,10 @@ def ReadBinaryMshV4(fileHandle, dataSize): if swap: sArr.byteswap() + # NOTE: these are not the physical and elementary tags + # that are expected in msh2 format. Physical tags + # can only be found by also reading in the separate + # "Entities" section ids = [entityTag, sArr[0]] nodes = FromGmshNodeOrder(utils.OffsetList(sArr[1:], -1), type) element = elements.Element(nodes, ids) @@ -519,6 +526,9 @@ def ReadAsciiMshV2(fileHandle): def ReadAsciiMshV4(fileHandle): + raise Warning("Fluidity's gmshtools does not correctly read physical surface ids " + "for meshes in .msh format version 4. If these are required save your .msh-file" + "in .msh format version 2 (e.g. using -format msh2 on the command line).") line = ReadNonCommentLine(fileHandle) assert line == "$EndMeshFormat" @@ -594,6 +604,10 @@ def ReadAsciiMshV4(fileHandle): lineSplit = line.split() assert len(lineSplit) == 1 + type.GetNodeCount() + # NOTE: these are not the physical and elementary tags + # that are expected in msh2 format. Physical tags + # can only be found by also reading in the separate + # "Entities" section ids = [entityTag, int(lineSplit[0])] nodes = FromGmshNodeOrder([int(node) - 1 for node in lineSplit[1:]], type) element = elements.Element(nodes, ids) diff --git a/tests/channel_wind_drag_rotated/Makefile b/tests/channel_wind_drag_rotated/Makefile index 4d643b8f3e..2f76f15e9d 100644 --- a/tests/channel_wind_drag_rotated/Makefile +++ b/tests/channel_wind_drag_rotated/Makefile @@ -1,7 +1,7 @@ PROJECT = channel input: clean - gmsh -3 -o channel.msh src/channel.geo + gmsh -3 -format msh 2 -o channel.msh src/channel.geo ../../bin/transform_mesh '(cos(1.)*x-sin(1.0)*y,sin(1.)*x+cos(1.)*y,z)' channel