Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docker/Dockerfile.noble
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/actions/Dockerfile.actions.noble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fluidity/baseimages:noble
FROM fluidity/baseimages:noble-gmsh4

USER root

Expand Down
14 changes: 14 additions & 0 deletions python/fluidity/diagnostics/gmshtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/channel_wind_drag_rotated/Makefile
Original file line number Diff line number Diff line change
@@ -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


Expand Down
Loading