Skip to content

Commit

Permalink
Merge pull request #239 from FloatingArrayDesign/dev
Browse files Browse the repository at this point in the history
Release v2.3.4
  • Loading branch information
sanguinariojoe authored Aug 7, 2024
2 parents 0a9a8aa + 137ef35 commit a5e2e7e
Show file tree
Hide file tree
Showing 88 changed files with 9,147 additions and 1,436 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/mdf_verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: MoorDynF regression tests

on:
push:
branches: [ $default-branch, master ]
pull_request:
branches:
- "**"

permissions: write-all

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
id: setup-python

- name: Install Python dependencies
run: pip install --upgrade build pytest Bokeh numpy

- name: Download OpenFAST
shell: bash
run: |
cd ${{github.workspace}}/
git clone --recursive https://github.com/OpenFAST/openfast.git
- name: Compile MoorDynF
shell: bash
run: |
cd ${{github.workspace}}/
mkdir -p openfast.build
cd openfast.build
cmake openfast -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_TESTING=ON ../openfast
make moordyn_driver
cd ${{github.workspace}}/
- name: Run MoorDynF regression tests
shell: bash
run: |
cd ${{github.workspace}}/openfast.build
ctest -VV -R md_ -LE python
cd ${{github.workspace}}/
- name: Create install folder
run: |
mkdir -p ${{github.workspace}}/install
- name: Configure CMake
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

- name: Build
id: build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Install
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Set env variables for the tests
run: |
echo "LD_LIBRARY_PATH=${{github.workspace}}/build/source/" >> $GITHUB_ENV
- name: Run the tests
run: python ${{github.workspace}}/tests/.mdf_verification/verify.py ${{github.workspace}}/
39 changes: 39 additions & 0 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: memcheck

on:
pull_request:
branches: [ $default-branch, master ]

permissions: write-all

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
PROCESSES: 4

jobs:
memcheck:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v4

- name: Install valgrind
run: |
sudo apt-get -qq update
sudo apt-get -qq -y install valgrind
- name: Configure CMake
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

- name: Build
id: build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# We are just testing in Linux
run: ctest -C ${{env.BUILD_TYPE}} -T memcheck --output-on-failure -j ${{env.PROCESSES}} -E "(seafloor|time_schemes|wavekin|wilson|lowe_and_langley_2006)"
2 changes: 1 addition & 1 deletion .github/workflows/python-wheels-manylinux-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
uses: pypa/cibuildwheel@v2.20.0
with:
output-dir: dist
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
if: runner.os == 'Linux'

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
uses: pypa/cibuildwheel@v2.20.0
with:
output-dir: dist
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: setup-python

- name: Install Python dependencies
run: pip install --upgrade build pytest
run: pip install --upgrade build pytest numpy scipy

- name: Install VTK
run: |
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## [](https://github.com/core-marine-dev/MoorDyn/compare/v2.3.3...v) (2024-08-07)

### Features

* **body:** Add centripetal forces for rotating bodies ([f4f816c](https://github.com/core-marine-dev/MoorDyn/commit/f4f816cadb4116f4052f4a3cc36ca2c82f5cabd9))

### Bug Fixes

* accelerations of Coupled/fixed bodies/rods when there are several isntances of them ([1a07a2d](https://github.com/core-marine-dev/MoorDyn/commit/1a07a2d39fe6ffb5f27b6e143830d18ce4f758f2))
* Add a centripetal force to bodies with a excentric COG ([7a56b7c](https://github.com/core-marine-dev/MoorDyn/commit/7a56b7c941c0bfbddb37fab48423f1ad715270a7))
* Centripetal force for parallel axes shall be null ([829c837](https://github.com/core-marine-dev/MoorDyn/commit/829c83711a98ed11178cc3b934b76ce515c61f82))
* Drop the patch to move from extrinsic to intrinsic Euler angles ([6ff56ac](https://github.com/core-marine-dev/MoorDyn/commit/6ff56acc47d756634b1a8238898221ec016c8e0f))
* EulerXYZ intrinsic angles instead of extrinsic ([1eec2e3](https://github.com/core-marine-dev/MoorDyn/commit/1eec2e3005239c9bd8e19f1ebddd05ead8f2f08f))
* EulerZYX -> EulerXYZ on moordyn::Euler2Quat() ([5a5f7fd](https://github.com/core-marine-dev/MoorDyn/commit/5a5f7fdfa8bc161cd580c50b3dcedcca394919c6))
* Freeze when writeLog is not the first option ([d4cce8e](https://github.com/core-marine-dev/MoorDyn/commit/d4cce8ecfb8e5af4819f3877e0f882d59ebb04c8))
* make rod submergence calcs match what is in MDF (verified code) ([0ac0e92](https://github.com/core-marine-dev/MoorDyn/commit/0ac0e9207eec4c202bf6b85f4a6fbc5178a1fb13))
* 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))
* Read first the writelog option, and then anything else ([028a567](https://github.com/core-marine-dev/MoorDyn/commit/028a56742226aa27fa900272bf020924eec56b6d))
* Rebranding to include centripetal forces on getNetForceAndMass ([f20a98a](https://github.com/core-marine-dev/MoorDyn/commit/f20a98aa23a584a0475f6055a33acfda30f39718))
* The quaternions shall be renormalized to get the rotation matrix ([7256746](https://github.com/core-marine-dev/MoorDyn/commit/7256746793f0c48b6ec4bc8dd97407ad582a9ae2))
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10)
set(MOORDYN_MAJOR_VERSION 2)
set(MOORDYN_MINOR_VERSION 3)
set(MOORDYN_PATCH_VERSION 3)
set(MOORDYN_PATCH_VERSION 4)
set(MOORDYN_VERSION ${MOORDYN_MAJOR_VERSION}.${MOORDYN_MINOR_VERSION})
project(Moordyn VERSION ${MOORDYN_VERSION})

Expand Down Expand Up @@ -141,6 +141,14 @@ if(${MOORDYN_FASTMATH})
endif()
endif()

find_program(MEMORYCHECK_COMMAND valgrind)
if(NOT MEMORYCHECK_COMMAND)
message(WARNING "valgrind is not found, you will not be able to run memchecks")
else(NOT ${MEMORYCHECK_COMMAND})
set(MEMORYCHECK_SUPPRESSIONS_FILE "${PROJECT_SOURCE_DIR}/tests/valgrind_suppress.txt")
endif()


# Compile the library
add_subdirectory(source)
# And the eventual wrappers
Expand Down
15 changes: 10 additions & 5 deletions compile/DLL/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# Several options can be set:
#
# - USEGL: Enables the OpenGL visualization
# - COPTS: Compilation options. For good performance and compatibility use:
# COPTS='-msse2 -ffast-math -DMOORDYN_SINGLEPRECISSION'
# However, for local-only installations a more aggresive instructions
Expand All @@ -24,10 +23,16 @@
LFLAGS = -shared -static-libgcc -static-libstdc++ -DMoorDyn_EXPORTS -fPIC
CFLAGS = -c -O3 -g -Wall -Wextra -DMoorDyn_EXPORTS -fPIC -I../../source/

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

CFLAGS += $(COPTS)
LFLAGS += $(LOPTS)
Expand Down
13 changes: 8 additions & 5 deletions compile/DYLIB/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# Several options can be set:
#
# - USEGL: Enables the OpenGL visualization
# - COPTS: Compilation options. For good performance and compatibility use:
# COPTS='-msse2 -ffast-math -DMOORDYN_SINGLEPRECISSION'
# However, for local-only installations a more aggresive instructions
Expand All @@ -29,10 +28,14 @@
LFLAGS = -shared -DOSX -DMoorDyn_EXPORTS -fPIC
CFLAGS = -c -O3 -static -g -Wall -Wextra -DOSX -DMoorDyn_EXPORTS -fPIC -I../../source/

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

CFLAGS += $(COPTS)
LFLAGS += $(LOPTS)
Expand Down
25 changes: 16 additions & 9 deletions compile/SO/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# Several options can be set:
#
# - USEGL: Enables the OpenGL visualization
# - COPTS: Compilation options. For good performance and compatibility use:
# COPTS='-msse2 -ffast-math -DMOORDYN_SINGLEPRECISSION'
# However, for local-only installations a more aggresive instructions
Expand All @@ -25,10 +24,14 @@
LFLAGS = -shared -static-libgcc -static-libstdc++ -DLINUX -DMoorDyn_EXPORTS -fPIC
CFLAGS = -c -O3 -g -Wall -Wextra -DLINUX -DMoorDyn_EXPORTS -fPIC -I../../source/

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

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

all: libmoordyn.so

libmoordyn.so: libmoordyn.so.2.0.0
libmoordyn.so: libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION)
rm -f libmoordyn.so
ln -s libmoordyn.so.2.0.0 libmoordyn.so
ln -s libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION) libmoordyn.so

libmoordyn.so.2.0.0: $(OBJECTS)
$(CXX) $(LFLAGS) -o libmoordyn.so.2.0.0 $(OBJECTS)
libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION): libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION)
rm -f libmoordyn.so
ln -s libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION) libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION)

libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION): $(OBJECTS)
$(CXX) $(LFLAGS) -o libmoordyn.so.$(MOORDYN_MAJOR_VERSION).$(MOORDYN_MINOR_VERSION).$(MOORDYN_PATCH_VERSION) $(OBJECTS)

%.o: ../../source/%.cpp $(HEADERS)
${CXX} $(CPPFLAGS) -o $@ $<
Expand Down
Loading

0 comments on commit a5e2e7e

Please sign in to comment.