Commit a6e856f7 authored by Spencer Sherwin's avatar Spencer Sherwin

Merge branch 'master' into feature/CollapseExpList

parents 86723554 96e8d53c
......@@ -51,6 +51,7 @@ stages:
- sed "s %%BASE_IMAGE%% $CI_REGISTRY_IMAGE:$ENV_NAME g" .gitlab-ci/Dockerfile_add_repo > Dockerfile_tmp
- export ENV_IMAGE=$(docker build -q -f Dockerfile_tmp .)
- mkdir -p log
- if [ ! -d $CCACHE_DIR ]; then mkdir -p $CCACHE_DIR && chown 1000:1000 $CCACHE_DIR; fi
- docker run --name $CONTAINER_NAME -v ccache:/cache
-e "BUILD_TYPE=$BUILD_TYPE"
-e "NUM_CPUS=$NUM_CPUS"
......@@ -242,7 +243,14 @@ tutorials-build:
<<: *build-env-ubuntu-template-default
stage:
build-env-full
focal-default-build-env:
<<: *build-env-ubuntu-template-default
focal-full_py3-build-env:
<<: *build-env-ubuntu-template-full
needs: ["focal-default-build-env"]
bionic-default-build-env:
<<: *build-env-ubuntu-template-default
......@@ -257,13 +265,14 @@ xenial-full-build-env:
<<: *build-env-ubuntu-template-full
needs: ["xenial-default-build-env"]
trusty-default-build-env:
<<: *build-env-ubuntu-template-default
trusty-full-build-env:
<<: *build-env-ubuntu-template-full
needs: ["trusty-default-build-env"]
focal-default-build-and-test:
<<: *build-and-test-template
needs: ["focal-default-build-env"]
focal-full_py3-build-and-test:
<<: *build-and-test-template
needs: ["focal-full_py3-build-env"]
bionic-default-build-and-test:
<<: *build-and-test-template
......@@ -281,16 +290,16 @@ xenial-full-build-and-test:
<<: *build-and-test-template
needs: ["xenial-full-build-env"]
trusty-default-build-and-test:
<<: *build-and-test-template
needs: ["trusty-default-build-env"]
trusty-full-build-and-test:
<<: *build-and-test-template
needs: ["trusty-full-build-env"]
# COMPILER WARNINGS
focal-default-warnings:
<<: *compiler-warning-template
needs: ["focal-default-build-and-test"]
focal-full_py3-warnings:
<<: *compiler-warning-template
needs: ["focal-full_py3-build-and-test"]
# COMPILER WARNINGS
bionic-default-warnings:
<<: *compiler-warning-template
needs: ["bionic-default-build-and-test"]
......@@ -307,14 +316,6 @@ xenial-full-warnings:
<<: *compiler-warning-template
needs: ["xenial-full-build-and-test"]
trusty-default-warnings:
<<: *compiler-warning-template
needs: ["trusty-default-build-and-test"]
trusty-full-warnings:
<<: *compiler-warning-template
needs: ["trusty-full-build-and-test"]
################################################
################### CENTOS ###################
......
......@@ -2,7 +2,33 @@
[[ $OS_VERSION != "osx" ]] && ccache -s && ccache -M 5G
rm -rf build && mkdir -p build && (cd build && if [[ $BUILD_TYPE == "default" ]]; then cmake -G 'Unix Makefiles' .. -DCMAKE_BUILD_TYPE=Release -DNEKTAR_TEST_ALL=ON -DNEKTAR_BUILD_TIMINGS=ON -DNEKTAR_ERROR_ON_WARNINGS=OFF ..; elif [[ $BUILD_TYPE == "full" ]]; then cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DNEKTAR_FULL_DEBUG:BOOL=ON -DNEKTAR_TEST_ALL:BOOL=ON -DNEKTAR_BUILD_TIMINGS:BOOL=ON -DNEKTAR_USE_ARPACK:BOOL=ON -DNEKTAR_USE_FFTW:BOOL=ON -DNEKTAR_USE_MPI:BOOL=ON -DNEKTAR_USE_SCOTCH:BOOL=ON -DNEKTAR_USE_PETSC:BOOL=ON -DNEKTAR_USE_HDF5:BOOL=ON -DNEKTAR_USE_MESHGEN:BOOL=ON -DNEKTAR_USE_CCM:BOOL=ON -DNEKTAR_BUILD_PYTHON:BOOL=ON -DNEKTAR_TEST_USE_HOSTFILE=ON -DNEKTAR_ERROR_ON_WARNINGS=OFF ..; fi) && \
if [[ $BUILD_TYPE == "default" ]]; then
BUILD_OPTS="-DCMAKE_BUILD_TYPE=Release \
-DNEKTAR_TEST_ALL=ON \
-DNEKTAR_BUILD_TIMINGS=ON \
-DNEKTAR_ERROR_ON_WARNINGS=OFF"
elif [[ $BUILD_TYPE == "full" ]] || [[ $BUILD_TYPE == "full_py3" ]]; then
BUILD_OPTS="-DCMAKE_BUILD_TYPE:STRING=Debug \
-DNEKTAR_FULL_DEBUG:BOOL=ON \
-DNEKTAR_TEST_ALL:BOOL=ON \
-DNEKTAR_BUILD_TIMINGS:BOOL=ON \
-DNEKTAR_USE_ARPACK:BOOL=ON \
-DNEKTAR_USE_FFTW:BOOL=ON \
-DNEKTAR_USE_MPI:BOOL=ON \
-DNEKTAR_USE_SCOTCH:BOOL=ON \
-DNEKTAR_USE_PETSC:BOOL=ON \
-DNEKTAR_USE_HDF5:BOOL=ON \
-DNEKTAR_USE_MESHGEN:BOOL=ON \
-DNEKTAR_USE_CCM:BOOL=ON \
-DNEKTAR_BUILD_PYTHON:BOOL=ON \
-DNEKTAR_TEST_USE_HOSTFILE=ON \
-DNEKTAR_ERROR_ON_WARNINGS=OFF"
if [[ $BUILD_TYPE == "full_py3" ]]; then
BUILD_OPTS="$BUILD_OPTS -DNEKTAR_USE_PYTHON3=ON"
fi
fi
rm -rf build && mkdir -p build && (cd build && cmake -G 'Unix Makefiles' $BUILD_OPTS ..) && \
make -C build -j $NUM_CPUS all 2>&1 && \
make -C build -j $NUM_CPUS install && \
(cd build && ctest -j $NUM_CPUS --output-on-failure)
......
......@@ -5,8 +5,9 @@ v5.1.0
------
**Library**
- Restructure library to use local coefficient storage down to the GlobalLinSys
level. Removed GlobalCeoffs functionality (!963)
level. Removed GlobalCoeffs functionality (!963)
- Add interior penalty method to DG framework (!1101)
- Add an error filter for the time-evolution of the L2 and Linf errors (!1147)
**FieldConvert**
- Refactored time integration code using factory pattern (!1034)
......@@ -16,10 +17,19 @@ v5.1.0
- Use base MPI functions instead of the GS library in the trace exchange
for parallel DG simulations (!1112)
num_elements with size() (!1127, !1137, !1141)
- Add phifile module to compute shape functions for the SPM solver (!1065)
**CardiacEPSolver**
- Added additional parameter sets to Fenton-Karma model (!1119)
**IncNavierStokesSolver**
- Add Smoothed Profile Method (SPM) for the formulation of immersed boundaries
(!1065)
- Add new filter AeroForcesSPM to compute aerodynamic forces in immersed
boundaries (!1065)
**Documentation**:
- Updated Windows source build instructions in user guide (!1152)
**NekMesh**
- Improved boundary layer splitting and output to CADfix (!938)
- Improve .geo reader and support 3D geometries with voids (!1031)
......@@ -27,6 +37,8 @@ v5.1.0
**BuildSystem**
- Toggle build type (!1135)
- Updated minimum required CMake version to 3.5.1 (!1152)
- Updated third party Boost version 1.71 (!1152)
v5.0.1
------
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build,
options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
RelWithDebInfo MinSizeRel.")
......@@ -8,32 +8,19 @@ SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebIn
PROJECT(Nektar++ C CXX)
CMAKE_POLICY(SET CMP0022 NEW)
# Resolves issue with checking string equality for string params that are also
# variable names - this resolves an issue with checking for MSVC on Windows
CMAKE_POLICY(SET CMP0054 NEW)
# Defer to use _ROOT variables to avoid Zlib warning
IF (POLICY CMP0074)
CMAKE_POLICY(SET CMP0074 OLD)
ENDIF()
# Nektar++ requires C++11. Try to infer this for older CMake versions (less than
# 3.1.0)
IF ("${CMAKE_VERSION}" VERSION_LESS "3.1")
IF (NOT MSVC)
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSE()
MESSAGE(FATAL_ERROR "Nektar++ requires a compiler with C++11 support.")
ENDIF()
ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
MESSAGE(FATAL_ERROR "Nektar++ requires full C++11 support: please upgrade to Visual Studio 2013 or later")
ENDIF()
ELSE()
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
ENDIF()
# Nektar++ requires C++11.
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
INCLUDE(CheckLanguage)
......
......@@ -12,6 +12,14 @@
# `-llibname` to the linker flags. This avoids the issue of e.g. linking against
# an outdated system zlib installation.
#
# On Windows, it is necessary to link using .lib files which will have been
# generated based on whether the target library was built as STATIC or SHARED.
# Where the library has been built as a SHARED library the associated DLLs
# are used at runtime. The setting of LIBTYPE determines the file names to
# link against so on Windows setting this to SHARED results in trying to link
# against .dll files. LIBTYPE is therefore forced to be STATIC on WIN32
# platforms to ensure linking against the .lib files.
#
# Arguments:
# - `varname`: variable name containing the third-party library name. On
# output will be altered to update the correct path.
......@@ -24,7 +32,12 @@ MACRO(THIRDPARTY_LIBRARY varname)
CMAKE_PARSE_ARGUMENTS(TPLIB "" "DESCRIPTION" "STATIC;SHARED" ${ARGN})
IF(TPLIB_SHARED)
SET(LIBTYPE "SHARED")
IF(WIN32)
# Ensure linking against .lib files on Windows
SET(LIBTYPE "STATIC")
ELSE()
SET(LIBTYPE "SHARED")
ENDIF()
SET(TPLIBS ${TPLIB_SHARED})
ELSEIF(TPLIB_STATIC)
SET(LIBTYPE "STATIC")
......
......@@ -123,8 +123,8 @@ IF (THIRDPARTY_BUILD_BOOST)
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
URL ${TPURL}/boost_1_57_0.tar.bz2
URL_MD5 "1be49befbdd9a5ce9def2983ba3e7b76"
URL ${TPURL}/boost_1_71_0.tar.bz2
URL_MD5 "4cdf9b5c2dc01fb2b7b733d5af30e558"
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPBUILD}/boost
......@@ -144,16 +144,18 @@ IF (THIRDPARTY_BUILD_BOOST)
INSTALL_COMMAND ""
)
ELSE ()
IF (CMAKE_CL_64)
MESSAGE(STATUS "Windows MSVC build - toolset is: ${TOOLSET_CMDLINE}")
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(ADDRESS_MODEL 64)
ELSE()
SET(ADDRESS_MODEL 32)
ENDIF()
MESSAGE(STATUS "Windows MSVC build - address model is: ${ADDRESS_MODEL}")
EXTERNALPROJECT_ADD(
boost
PREFIX ${TPSRC}
URL ${TPURL}/boost_1_57_0.tar.bz2
URL_MD5 "1be49befbdd9a5ce9def2983ba3e7b76"
URL ${TPURL}/boost_1_71_0.tar.bz2
URL_MD5 "4cdf9b5c2dc01fb2b7b733d5af30e558"
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPBUILD}/boost
......
......@@ -33,10 +33,6 @@ IF (NEKTAR_USE_HDF5)
"NEKTAR_USE_HDF5" OFF)
IF(THIRDPARTY_BUILD_HDF5)
IF (CMAKE_VERSION VERSION_LESS 3.1.0)
MESSAGE(FATAL_ERROR "HDF5 compilation requires CMake 3.1.0 or later.")
ENDIF()
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
hdf5-1.8.16
......
......@@ -115,6 +115,26 @@ IF (NEKTAR_BUILD_PYTHON)
-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DLIBRARY_TYPE=STATIC
${TPSRC}/boost-numpy
)
# This resolves issues with warnings on the OS X CI builds. These
# trigger warnings in the CI pipeline console. This fix updates
# boost-numpy to use a small number of more recent API macros rather
# than the ones from the deprectated API.
IF (APPLE)
UNSET(PATCH CACHE)
FIND_PROGRAM(PATCH patch)
IF(NOT PATCH)
MESSAGE(FATAL_ERROR
"'patch' tool for modifying files not found. Cannot build boost-numpy.")
ENDIF()
MARK_AS_ADVANCED(PATCH)
EXTERNALPROJECT_ADD_STEP(boost-numpy patch-deprecated-numpy-api
WORKING_DIRECTORY ${TPSRC}/boost-numpy
COMMAND ${PATCH} -p 0 < ${CMAKE_SOURCE_DIR}/cmake/thirdparty-patches/numpy-deprecated-api-warnings.patch
DEPENDERS configure
DEPENDEES patch)
ENDIF (APPLE)
IF (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
SET(BOOST_NUMPY_LIB ${TPDIST}/lib64/${CMAKE_STATIC_LIBRARY_PREFIX}boost_numpy${CMAKE_STATIC_LIBRARY_SUFFIX})
ELSE()
......
......@@ -8,11 +8,19 @@
# Find a system ZLIB library. If not found enable the THIRDPARTY_BUILD_ZLIB
# option.
FIND_PACKAGE(ZLIB QUIET)
IF (ZLIB_FOUND AND NOT ZLIB_VERSION_PATCH LESS 7)
SET(BUILD_ZLIB OFF)
ELSE ()
# On Windows, we want to force the use of third party zlib
# since this will be used with the boost build if boost is being
# built as a third party lib
IF(WIN32)
MESSAGE(STATUS "On a WIN32 platform, zlib will be built as a third party library...")
SET(BUILD_ZLIB ON)
ELSE()
FIND_PACKAGE(ZLIB QUIET)
IF (ZLIB_FOUND AND NOT ZLIB_VERSION_PATCH LESS 7)
SET(BUILD_ZLIB OFF)
ELSE ()
SET(BUILD_ZLIB ON)
ENDIF()
ENDIF()
OPTION(THIRDPARTY_BUILD_ZLIB "Build ZLib library" ${BUILD_ZLIB})
......@@ -45,12 +53,14 @@ IF (THIRDPARTY_BUILD_ZLIB)
ENDIF ()
IF (WIN32)
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES STATIC zlib DESCRIPTION "Zlib library")
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES_DEBUG STATIC zlibd DESCRIPTION "Zlib library")
SET(ZLIB_NAME zlib)
SET(ZLIB_NAME_DEBUG zlibd)
ELSE ()
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES SHARED z DESCRIPTION "Zlib library")
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES_DEBUG SHARED z DESCRIPTION "Zlib library")
SET(ZLIB_NAME z)
SET(ZLIB_NAME_DEBUG z)
ENDIF ()
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES SHARED ${ZLIB_NAME} DESCRIPTION "Zlib library")
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES_DEBUG SHARED ${ZLIB_NAME_DEBUG} DESCRIPTION "Zlib library")
MESSAGE(STATUS "Build Zlib: ")
MESSAGE(STATUS " -- Optimized: ${ZLIB_LIBRARIES}")
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
PROJECT(libccmio)
# compile in Release mode by default
......
......@@ -36,17 +36,55 @@
}
ADF_Read_All_Data(origNode.node, bytes, &adfErr);
--- libccmio/ccmio.c 2019-10-01 10:52:27.872670035 +0100
+++ libccmio/ccmio.c 2019-10-01 10:52:54.900797471 +0100
@@ -520,9 +520,9 @@
type == kCCMIORestartData || type == kCCMIOReferenceData ||
type == kCCMIOModelConstants)
--- libccmio/ccmio.c 2006-06-30 19:00:17.000000000 +0100
+++ libccmio/ccmio.c 2020-05-27 15:58:48.000000000 +0100
@@ -469,8 +469,10 @@
if (type == kCCMIOField)
node = id.node;
#if kHasSNPrintf
- snprintf(name, kCCMIOMaxStringLength, "%ss",
+ int ret = snprintf(name, kCCMIOMaxStringLength, "%ss",
gEntityNames[(int)type]);
+ if (ret < 0)
+ abort();
#else
sprintf(name, "%ss", gEntityNames[(int)type]);
#endif
@@ -515,23 +517,32 @@
void MakeEntityName( CCMIOEntity type, int id, char *name )
{
+ int ret = 0;
if (type == kCCMIOInternalFaces || type == kCCMIOCells ||
- type == kCCMIOInterfaces || type == kCCMIORestart ||
- type == kCCMIORestartData || type == kCCMIOReferenceData ||
- type == kCCMIOModelConstants)
+ type == kCCMIOInterfaces || type == kCCMIORestart ||
+ type == kCCMIORestartData || type == kCCMIOReferenceData ||
+ type == kCCMIOModelConstants)
+ {
#if kHasSNPrintf
- snprintf(name, kCCMIOMaxStringLength, gEntityNames[(int)type]);
+ snprintf(name, kCCMIOMaxStringLength, "%s", gEntityNames[(int)type]);
+ ret = snprintf(name, kCCMIOMaxStringLength, "%s", gEntityNames[(int)type]);
+ if (ret < 0)
+ abort();
#else
- sprintf(name, gEntityNames[(int)type]);
+ sprintf(name, "%s", gEntityNames[(int)type]);
sprintf(name, gEntityNames[(int)type]);
#endif
+ }
else
+ {
#if kHasSNPrintf
- snprintf(name, kCCMIOMaxStringLength, "%s%c%d",
+ ret = snprintf(name, kCCMIOMaxStringLength, "%s%c%d",
gEntityNames[(int)type], kEntityIDDelimiter, id);
+ if (ret < 0)
+ abort();
#else
sprintf(name, "%s%c%d",
gEntityNames[(int)type], kEntityIDDelimiter, id);
#endif
+ }
name[kCCMIOMaxStringLength] = '\0';
}
--- CMakeLists.txt 2019-10-07 12:58:21.000000000 +0100
+++ CMakeLists.txt 2020-06-01 13:49:08.000000000 +0100
@@ -144,6 +144,9 @@
# compiler definitions for non-windows builds
if (NOT WIN32)
add_definitions(-fPIC)
+ if (APPLE)
+ add_definitions(-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
+ endif()
endif()
if (BUILD_TESTS)
--- libs/numpy/src/ndarray.cpp 2020-06-01 13:51:55.000000000 +0100
+++ libs/numpy/src/ndarray.cpp 2020-06-01 13:52:17.000000000 +0100
@@ -25,20 +25,20 @@
ndarray::bitflag numpy_to_bitflag(int const f)
{
ndarray::bitflag r = ndarray::NONE;
- if (f & NPY_C_CONTIGUOUS) r = (r | ndarray::C_CONTIGUOUS);
- if (f & NPY_F_CONTIGUOUS) r = (r | ndarray::F_CONTIGUOUS);
- if (f & NPY_ALIGNED) r = (r | ndarray::ALIGNED);
- if (f & NPY_WRITEABLE) r = (r | ndarray::WRITEABLE);
+ if (f & NPY_ARRAY_C_CONTIGUOUS) r = (r | ndarray::C_CONTIGUOUS);
+ if (f & NPY_ARRAY_F_CONTIGUOUS) r = (r | ndarray::F_CONTIGUOUS);
+ if (f & NPY_ARRAY_ALIGNED) r = (r | ndarray::ALIGNED);
+ if (f & NPY_ARRAY_WRITEABLE) r = (r | ndarray::WRITEABLE);
return r;
}
int bitflag_to_numpy(ndarray::bitflag f)
{
int r = 0;
- if (f & ndarray::C_CONTIGUOUS) r |= NPY_C_CONTIGUOUS;
- if (f & ndarray::F_CONTIGUOUS) r |= NPY_F_CONTIGUOUS;
- if (f & ndarray::ALIGNED) r |= NPY_ALIGNED;
- if (f & ndarray::WRITEABLE) r |= NPY_WRITEABLE;
+ if (f & ndarray::C_CONTIGUOUS) r |= NPY_ARRAY_C_CONTIGUOUS;
+ if (f & ndarray::F_CONTIGUOUS) r |= NPY_ARRAY_F_CONTIGUOUS;
+ if (f & ndarray::ALIGNED) r |= NPY_ARRAY_ALIGNED;
+ if (f & ndarray::WRITEABLE) r |= NPY_ARRAY_WRITEABLE;
return r;
}
@@ -122,10 +122,10 @@
}
int itemsize = dt.get_itemsize();
int flags = 0;
- if (writeable) flags |= NPY_WRITEABLE;
- if (is_c_contiguous(shape, strides, itemsize)) flags |= NPY_C_CONTIGUOUS;
- if (is_f_contiguous(shape, strides, itemsize)) flags |= NPY_F_CONTIGUOUS;
- if (is_aligned(strides, itemsize)) flags |= NPY_ALIGNED;
+ if (writeable) flags |= NPY_ARRAY_WRITEABLE;
+ if (is_c_contiguous(shape, strides, itemsize)) flags |= NPY_ARRAY_C_CONTIGUOUS;
+ if (is_f_contiguous(shape, strides, itemsize)) flags |= NPY_ARRAY_F_CONTIGUOUS;
+ if (is_aligned(strides, itemsize)) flags |= NPY_ARRAY_ALIGNED;
ndarray r(python::detail::new_reference
(PyArray_NewFromDescr(&PyArray_Type,
incref_dtype(dt),
@@ -246,13 +246,13 @@
ndarray array(python::object const & obj)
{
return ndarray(python::detail::new_reference
- (PyArray_FromAny(obj.ptr(), NULL, 0, 0, NPY_ENSUREARRAY, NULL)));
+ (PyArray_FromAny(obj.ptr(), NULL, 0, 0, NPY_ARRAY_ENSUREARRAY, NULL)));
}
ndarray array(python::object const & obj, dtype const & dt)
{
return ndarray(python::detail::new_reference
- (PyArray_FromAny(obj.ptr(), detail::incref_dtype(dt), 0, 0, NPY_ENSUREARRAY, NULL)));
+ (PyArray_FromAny(obj.ptr(), detail::incref_dtype(dt), 0, 0, NPY_ARRAY_ENSUREARRAY, NULL)));
}
ndarray from_object(python::object const & obj, dtype const & dt, int nd_min, int nd_max, ndarray::bitflag flags)
......@@ -15,6 +15,9 @@ ENV LD_LIBRARY_PATH /usr/lib64/openmpi/lib/
ENV PATH /usr/lib64/openmpi/bin/:$PATH
RUN ln -s /usr/bin/ccache /usr/local/bin/cc && ln -s /usr/bin/ccache /usr/local/bin/c++
# The cmake3 package installs cmake3, ctest3, cpack3 executables.
# Create symlinks to provide expected cmake, ctest and cpack executables
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake && ln -s /usr/bin/ctest3 /usr/bin/ctest && ln -s /usr/bin/cpack3 /usr/bin/cpack
RUN groupadd nektar && useradd -m -g nektar nektar
USER nektar:nektar
......
FROM %%REGISTRY%%:env-%%OS_VERSION%%-default
LABEL maintainer="Nektar++ Development Team <nektar-users@imperial.ac.uk>"
USER root
COPY docker/nektar-env/${UBUNTU_VERSION}_full_packages.txt packages.txt
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y $(cat packages.txt) \
&& rm -rf /var/lib/apt/lists/*
USER nektar:nektar
blas-devel
ccache
cmake
cmake3
fftw-devel
gcc-c++
gcc-gfortran
......
......@@ -10,4 +10,5 @@ libboost-thread-dev
liblapack-dev
libscotch-dev
libtinyxml-dev
patch
zlib1g-dev
libarpack2-dev
libboost-numpy-dev
libboost-python-dev
libfftw3-dev
libhdf5-mpi-dev
......@@ -9,8 +10,7 @@ libptscotch-dev
libtet1.5-dev
libtriangle-dev
mpi-default-dev
patch
petsc-dev
python-dev
python-numpy
python3-dev
python3-numpy
rsh-client
......@@ -547,3 +547,47 @@ year = {2016}
school = {Technische Universität Darmstadt},
url = {http://tuprints.ulb.tu-darmstadt.de/id/eprint/7611},
}
@article{NakayamaSPM,
title = {Simulation method to resolve hydrodynamic interactions in colloidal dispersions},
author = {Nakayama, Yasuya and Yamamoto, Ryoichi},
journal = {Phys. Rev. E},
volume = {71},
issue = {3},
pages = {036707},
numpages = {7},
year = {2005},
month = {Mar},
publisher = {American Physical Society},
doi = {10.1103/PhysRevE.71.036707},
url = {https://link.aps.org/doi/10.1103/PhysRevE.71.036707}
}
@article{LuoSPM,
abstract = {We re-formulate and analyze a new method for particulate flows, the so-called ``smoothed profile'' method (SPM) first proposed in [Y. Nakayama, R. Yamamoto, Simulation method to resolve hydrodynamic interactions in colloidal dispersions, Phys. Rev. E 71 (2005) 036707], which uses a fixed computational mesh without conformation to the geometry of the particles. The method represents the particles by certain smoothed profiles to construct a body force term added into the Navier--Stokes equations. SPM imposes accurately and efficiently the proper conditions at the particle--fluid interface. In particular, while the original method employs a fully-explicit time-integration scheme we develop a high-order semi-implicit splitting scheme, which we implement in the context of spectral/hp element discretization. First, we show that the modeling error of SPM has a non-monotonic dependence on the time step size \ensuremath{\Delta}t; it is a function of \ensuremath{\nu}\ensuremath{\Delta}t/\ensuremath{\xi}, where \ensuremath{\nu} is the kinematic viscosity of fluid and \ensuremath{\xi} is the interface thickness of the smoothed profile. Subsequently, we present several steady and unsteady simulations, including flow past 3D complex-shaped particles, and compare against direct numerical simulations and the force coupling method (FCM).},
author = {Luo, Xian and Maxey, Martin R. and Karniadakis, George Em},
doi = {10.1016/j.jcp.2008.11.006},
issn = {0021-9991},
journal = {Journal of Computational Physics},
keywords = {SPM, Two-phase flow, Suspensions, Time-splitting scheme},
number = {5},
pages = {1750--1769},
title = {{Smoothed profile method for particulate flows: Error analysis and simulations}},
url = {http://www.sciencedirect.com/science/article/pii/S0021999108005925},
volume = {228},
year = {2009}
}
@article{WangSPM,
abstract = {An accurate, fast and robust spectral-element/Fourier smoothed profile method (SEF-SPM) for turbulent flow past 3D complex-geometry moving bluff-bodies is developed and analyzed in this paper. Based on the concept of momentum thickness \ensuremath{\delta}2, a new formula for determining the interface thickness parameter \ensuremath{\xi} is proposed. In order to overcome the numerical instability at high Reynolds number, the so-called Entropy Viscosity Method (EVM) is introduced in the framework of large-eddy simulation. To overcome resolution constraints pertaining to moving immersed bodies, the Coordinate Transformation Method (Mapping method) is incorporated in the current implementation. Moreover, a hybrid spectral-element method using mixed triangular and quadrilateral elements is employed in conjunction with Fourier discretization along the third direction to efficiently represent a body of revolution or a long-aspect ratio bluff-body like risers and cables. The combination of the above algorithms results in a robust method which we validate by several prototype flows, including flow past a stationary sphere at 200 \ensuremath{\leq} Re \ensuremath{\leq} 1000, as well as turbulent flow past a stationary and moving cylinder at 80 \ensuremath{\leq} Re \ensuremath{\leq} 10, 000. Finally, we apply the new method to simulate a self-excited rigidly moving dual-step cylinder and demonstrate that SEF-SPM is an efficient method for complex VIV problems.},
author = {Wang, Zhicheng and Triantafyllou, Michael S and Constantinides, Yiannis and Karniadakis, George Em},
doi = {10.1016/j.compfluid.2018.06.022},
issn = {0045-7930},
journal = {Computers \& Fluids},
keywords = {High-order methods, LES, Entropy-viscosity, Hybrid discretization, Industrial flows},
pages = {84--96},
title = {{A spectral-element/Fourier smoothed profile method for large-eddy simulations of complex VIV problems}},
url = {http://www.sciencedirect.com/science/article/pii/S0045793018303529},
volume = {172},
year = {2018}
}
This diff is collapsed.
\documentclass{standalone}
\usepackage[x11names]{xcolor}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=2.5]
\fill[SkyBlue1!70] (-1.8,0) rectangle (0,1);
\fill[SlateGray4!50] (0,0) rectangle (1.8,1);
\draw[thick,->] (-2,0) -- (2,0);
\draw[thick,->] (0,0) -- (0,1.2);
\draw[domain=-2:2,very thick,variable=\x,red] plot ({\x},{0.5*(tanh(\x)+1)});
\draw[domain=-2:2,very thick,variable=\x,blue] plot[samples=100] ({\x},{0.5*(tanh(3*\x)+1)});
\draw[-,dashed] (-2,1) node[above] {$\Phi=1$} -- (2,1);
\node at (1,0.4) {body};
\node at (-1,0.6) {fluid};
\end{tikzpicture}
\end{document}
......@@ -197,6 +197,8 @@ possibly also Reynolds stresses) into single file;
\item \inltt{surfdistance}: Computes height of a prismatic boundary layer mesh and projects onto the surface (for e.g. $y^+$ calculation).
\item \inltt{vorticity}: Computes the vorticity field.
\item \inltt{wss}: Computes wall shear stress field.
\item \inltt{phifile}: Computes the $\Phi$ function representing a body defined
in an \inltt{.stl} file. Useful for the Smoothed Profile Method solver.
\end{enumerate}
The module list above can be seen by running the command
%
......@@ -1084,6 +1086,58 @@ To process the output file(s) you will need an xml file of the same region.
%
%
\subsection{Calculating the shape function $\Phi$ for an SPM case:
\textit{phifile} module}
\label{s:utilities:fieldconvert:sub:phifile}
\begin{notebox}
This module is in experimental phase and only runs in serial. When reading
3D geometries from \inltt{.stl} files, errors may occur if triangles are
placed exactly at $90^{\circ}$.
\end{notebox}
This FieldConvert module converts a binary \inltt{.stl} CAD file into
\inltt{.fld} or \inltt{.vtu}/\inltt{.dat} files that can be used as inputs for
the Smoothed Profile Method solver. Running the command:
\begin{lstlisting}[style=BashInputStyle]
FieldConvert -m phifile:file=geom.stl:scale=value session.xml geom.fld
\end{lstlisting}
will generate an output file \inltt{geom.fld} with all the information required
to define a shape function $\Phi$ representing the geometry specified in
\inltt{geom.stl}. The option \inltt{scale} sets the value of $\xi$ as it is
described in the Synopsis chapter of the Incompressible N-S solver. If the
output file gets the extension \inltt{.vtu} or \inltt{.dat}, the module will
produce a graphical representation of the shape function; however, the
recommended way to proceed is to generate an \inltt{.fld} file and then, use
FieldConvert to obtain the \inltt{.vtu} or \inltt{.dat} files if needed for
visualisation purposes:
\begin{lstlisting}[style=BashInputStyle]