Skip to content

Commit a5e2e7e

Browse files
Merge pull request #239 from FloatingArrayDesign/dev
Release v2.3.4
2 parents 0a9a8aa + 137ef35 commit a5e2e7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+9147
-1436
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: MoorDynF regression tests
2+
3+
on:
4+
push:
5+
branches: [ $default-branch, master ]
6+
pull_request:
7+
branches:
8+
- "**"
9+
10+
permissions: write-all
11+
12+
env:
13+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
14+
BUILD_TYPE: Release
15+
16+
jobs:
17+
test:
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
matrix:
21+
os: [ubuntu-22.04]
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v5
28+
id: setup-python
29+
30+
- name: Install Python dependencies
31+
run: pip install --upgrade build pytest Bokeh numpy
32+
33+
- name: Download OpenFAST
34+
shell: bash
35+
run: |
36+
cd ${{github.workspace}}/
37+
git clone --recursive https://github.com/OpenFAST/openfast.git
38+
39+
- name: Compile MoorDynF
40+
shell: bash
41+
run: |
42+
cd ${{github.workspace}}/
43+
mkdir -p openfast.build
44+
cd openfast.build
45+
cmake openfast -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_TESTING=ON ../openfast
46+
make moordyn_driver
47+
cd ${{github.workspace}}/
48+
49+
- name: Run MoorDynF regression tests
50+
shell: bash
51+
run: |
52+
cd ${{github.workspace}}/openfast.build
53+
ctest -VV -R md_ -LE python
54+
cd ${{github.workspace}}/
55+
56+
- name: Create install folder
57+
run: |
58+
mkdir -p ${{github.workspace}}/install
59+
60+
- name: Configure CMake
61+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=ON -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=OFF -DBUILD_TESTING=ON
62+
63+
- name: Build
64+
id: build
65+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
66+
67+
- name: Install
68+
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
69+
70+
- name: Set env variables for the tests
71+
run: |
72+
echo "LD_LIBRARY_PATH=${{github.workspace}}/build/source/" >> $GITHUB_ENV
73+
74+
- name: Run the tests
75+
run: python ${{github.workspace}}/tests/.mdf_verification/verify.py ${{github.workspace}}/

.github/workflows/memcheck.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: memcheck
2+
3+
on:
4+
pull_request:
5+
branches: [ $default-branch, master ]
6+
7+
permissions: write-all
8+
9+
env:
10+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11+
BUILD_TYPE: RelWithDebInfo
12+
PROCESSES: 4
13+
14+
jobs:
15+
memcheck:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-22.04]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install valgrind
25+
run: |
26+
sudo apt-get -qq update
27+
sudo apt-get -qq -y install valgrind
28+
29+
- name: Configure CMake
30+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DUSE_VTK=OFF -DBUILD_TESTING=ON
31+
32+
- name: Build
33+
id: build
34+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
35+
36+
- name: Test
37+
working-directory: ${{github.workspace}}/build
38+
# We are just testing in Linux
39+
run: ctest -C ${{env.BUILD_TYPE}} -T memcheck --output-on-failure -j ${{env.PROCESSES}} -E "(seafloor|time_schemes|wavekin|wilson|lowe_and_langley_2006)"

.github/workflows/python-wheels-manylinux-arch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
platforms: all
5454

5555
- name: Build wheels
56-
uses: pypa/cibuildwheel@v2.19.1
56+
uses: pypa/cibuildwheel@v2.20.0
5757
with:
5858
output-dir: dist
5959
env:

.github/workflows/python-wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
if: runner.os == 'Linux'
8282

8383
- name: Build wheels
84-
uses: pypa/cibuildwheel@v2.19.1
84+
uses: pypa/cibuildwheel@v2.20.0
8585
with:
8686
output-dir: dist
8787
env:

.github/workflows/python-wrapper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
id: setup-python
3232

3333
- name: Install Python dependencies
34-
run: pip install --upgrade build pytest
34+
run: pip install --upgrade build pytest numpy scipy
3535

3636
- name: Install VTK
3737
run: |

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [](https://github.com/core-marine-dev/MoorDyn/compare/v2.3.3...v) (2024-08-07)
2+
3+
### Features
4+
5+
* **body:** Add centripetal forces for rotating bodies ([f4f816c](https://github.com/core-marine-dev/MoorDyn/commit/f4f816cadb4116f4052f4a3cc36ca2c82f5cabd9))
6+
7+
### Bug Fixes
8+
9+
* accelerations of Coupled/fixed bodies/rods when there are several isntances of them ([1a07a2d](https://github.com/core-marine-dev/MoorDyn/commit/1a07a2d39fe6ffb5f27b6e143830d18ce4f758f2))
10+
* Add a centripetal force to bodies with a excentric COG ([7a56b7c](https://github.com/core-marine-dev/MoorDyn/commit/7a56b7c941c0bfbddb37fab48423f1ad715270a7))
11+
* Centripetal force for parallel axes shall be null ([829c837](https://github.com/core-marine-dev/MoorDyn/commit/829c83711a98ed11178cc3b934b76ce515c61f82))
12+
* Drop the patch to move from extrinsic to intrinsic Euler angles ([6ff56ac](https://github.com/core-marine-dev/MoorDyn/commit/6ff56acc47d756634b1a8238898221ec016c8e0f))
13+
* EulerXYZ intrinsic angles instead of extrinsic ([1eec2e3](https://github.com/core-marine-dev/MoorDyn/commit/1eec2e3005239c9bd8e19f1ebddd05ead8f2f08f))
14+
* EulerZYX -> EulerXYZ on moordyn::Euler2Quat() ([5a5f7fd](https://github.com/core-marine-dev/MoorDyn/commit/5a5f7fdfa8bc161cd580c50b3dcedcca394919c6))
15+
* Freeze when writeLog is not the first option ([d4cce8e](https://github.com/core-marine-dev/MoorDyn/commit/d4cce8ecfb8e5af4819f3877e0f882d59ebb04c8))
16+
* make rod submergence calcs match what is in MDF (verified code) ([0ac0e92](https://github.com/core-marine-dev/MoorDyn/commit/0ac0e9207eec4c202bf6b85f4a6fbc5178a1fb13))
17+
* Odd treatment was meant for indexes from 1 to 3, not 0 to 2, and the matrix indexes were transposed ([0bb4ae2](https://github.com/core-marine-dev/MoorDyn/commit/0bb4ae27c8ed307a7a2382f0a53121ef8d73ebb7))
18+
* Read first the writelog option, and then anything else ([028a567](https://github.com/core-marine-dev/MoorDyn/commit/028a56742226aa27fa900272bf020924eec56b6d))
19+
* Rebranding to include centripetal forces on getNetForceAndMass ([f20a98a](https://github.com/core-marine-dev/MoorDyn/commit/f20a98aa23a584a0475f6055a33acfda30f39718))
20+
* The quaternions shall be renormalized to get the rotation matrix ([7256746](https://github.com/core-marine-dev/MoorDyn/commit/7256746793f0c48b6ec4bc8dd97407ad582a9ae2))

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.10)
22
set(MOORDYN_MAJOR_VERSION 2)
33
set(MOORDYN_MINOR_VERSION 3)
4-
set(MOORDYN_PATCH_VERSION 3)
4+
set(MOORDYN_PATCH_VERSION 4)
55
set(MOORDYN_VERSION ${MOORDYN_MAJOR_VERSION}.${MOORDYN_MINOR_VERSION})
66
project(Moordyn VERSION ${MOORDYN_VERSION})
77

@@ -141,6 +141,14 @@ if(${MOORDYN_FASTMATH})
141141
endif()
142142
endif()
143143

144+
find_program(MEMORYCHECK_COMMAND valgrind)
145+
if(NOT MEMORYCHECK_COMMAND)
146+
message(WARNING "valgrind is not found, you will not be able to run memchecks")
147+
else(NOT ${MEMORYCHECK_COMMAND})
148+
set(MEMORYCHECK_SUPPRESSIONS_FILE "${PROJECT_SOURCE_DIR}/tests/valgrind_suppress.txt")
149+
endif()
150+
151+
144152
# Compile the library
145153
add_subdirectory(source)
146154
# And the eventual wrappers

compile/DLL/makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# Several options can be set:
55
#
6-
# - USEGL: Enables the OpenGL visualization
76
# - COPTS: Compilation options. For good performance and compatibility use:
87
# COPTS='-msse2 -ffast-math -DMOORDYN_SINGLEPRECISSION'
98
# However, for local-only installations a more aggresive instructions
@@ -24,10 +23,16 @@
2423
LFLAGS = -shared -static-libgcc -static-libstdc++ -DMoorDyn_EXPORTS -fPIC
2524
CFLAGS = -c -O3 -g -Wall -Wextra -DMoorDyn_EXPORTS -fPIC -I../../source/
2625

27-
ifdef USEGL
28-
CFLAGS += -DUSEGL
29-
LFLAGS += -lopengl32 -lglu32
30-
endif
26+
# Automagically collect the library version
27+
# This should still work fine with mingw, or even in modern Windows with bash
28+
# I have not tested it anyway
29+
CMAKEROOT := ../../CMakeLists.txt
30+
MOORDYN_MAJOR_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_MAJOR_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
31+
MOORDYN_MINOR_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_MINOR_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
32+
MOORDYN_PATCH_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_PATCH_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
33+
CFLAGS += -DMOORDYN_MAJOR_VERSION=$(MOORDYN_MAJOR_VERSION)
34+
CFLAGS += -DMOORDYN_MINOR_VERSION=$(MOORDYN_MINOR_VERSION)
35+
CFLAGS += -DMOORDYN_PATCH_VERSION=$(MOORDYN_PATCH_VERSION)
3136

3237
CFLAGS += $(COPTS)
3338
LFLAGS += $(LOPTS)

compile/DYLIB/makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# Several options can be set:
55
#
6-
# - USEGL: Enables the OpenGL visualization
76
# - COPTS: Compilation options. For good performance and compatibility use:
87
# COPTS='-msse2 -ffast-math -DMOORDYN_SINGLEPRECISSION'
98
# However, for local-only installations a more aggresive instructions
@@ -29,10 +28,14 @@
2928
LFLAGS = -shared -DOSX -DMoorDyn_EXPORTS -fPIC
3029
CFLAGS = -c -O3 -static -g -Wall -Wextra -DOSX -DMoorDyn_EXPORTS -fPIC -I../../source/
3130

32-
ifdef USEGL
33-
CFLAGS += -DUSEGL
34-
LFLAGS += -lopengl32 -lglu32
35-
endif
31+
# Automagically collect the library version
32+
CMAKEROOT := ../../CMakeLists.txt
33+
MOORDYN_MAJOR_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_MAJOR_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
34+
MOORDYN_MINOR_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_MINOR_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
35+
MOORDYN_PATCH_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_PATCH_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
36+
CFLAGS += -DMOORDYN_MAJOR_VERSION=$(MOORDYN_MAJOR_VERSION)
37+
CFLAGS += -DMOORDYN_MINOR_VERSION=$(MOORDYN_MINOR_VERSION)
38+
CFLAGS += -DMOORDYN_PATCH_VERSION=$(MOORDYN_PATCH_VERSION)
3639

3740
CFLAGS += $(COPTS)
3841
LFLAGS += $(LOPTS)

compile/SO/makefile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# Several options can be set:
55
#
6-
# - USEGL: Enables the OpenGL visualization
76
# - COPTS: Compilation options. For good performance and compatibility use:
87
# COPTS='-msse2 -ffast-math -DMOORDYN_SINGLEPRECISSION'
98
# However, for local-only installations a more aggresive instructions
@@ -25,10 +24,14 @@
2524
LFLAGS = -shared -static-libgcc -static-libstdc++ -DLINUX -DMoorDyn_EXPORTS -fPIC
2625
CFLAGS = -c -O3 -g -Wall -Wextra -DLINUX -DMoorDyn_EXPORTS -fPIC -I../../source/
2726

28-
ifdef USEGL
29-
CFLAGS += -DUSEGL
30-
LFLAGS += -lopengl32 -lglu32
31-
endif
27+
# Automagically collect the library version
28+
CMAKEROOT := ../../CMakeLists.txt
29+
MOORDYN_MAJOR_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_MAJOR_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
30+
MOORDYN_MINOR_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_MINOR_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
31+
MOORDYN_PATCH_VERSION=$(shell cat ${CMAKEROOT} | grep "set(MOORDYN_PATCH_VERSION" | cut -d " " -f 2 | cut -d ")" -f 1)
32+
CFLAGS += -DMOORDYN_MAJOR_VERSION=$(MOORDYN_MAJOR_VERSION)
33+
CFLAGS += -DMOORDYN_MINOR_VERSION=$(MOORDYN_MINOR_VERSION)
34+
CFLAGS += -DMOORDYN_PATCH_VERSION=$(MOORDYN_PATCH_VERSION)
3235

3336
CFLAGS += $(COPTS)
3437
LFLAGS += $(LOPTS)
@@ -47,12 +50,16 @@ DIRGUARD = @mkdir -p $(@D)
4750

4851
all: libmoordyn.so
4952

50-
libmoordyn.so: libmoordyn.so.2.0.0
53+
libmoordyn.so: libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION)
5154
rm -f libmoordyn.so
52-
ln -s libmoordyn.so.2.0.0 libmoordyn.so
55+
ln -s libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION) libmoordyn.so
5356

54-
libmoordyn.so.2.0.0: $(OBJECTS)
55-
$(CXX) $(LFLAGS) -o libmoordyn.so.2.0.0 $(OBJECTS)
57+
libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION): libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION)
58+
rm -f libmoordyn.so
59+
ln -s libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION) libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION)
60+
61+
libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION): $(OBJECTS)
62+
$(CXX) $(LFLAGS) -o libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION) $(OBJECTS)
5663

5764
%.o: ../../source/%.cpp $(HEADERS)
5865
${CXX} $(CPPFLAGS) -o $@ $<

0 commit comments

Comments
 (0)