Commit 29c69911 authored by David Moxey's avatar David Moxey

Merge branch 'master' into feature/barycentricInterpolation

parents 396a8f8f 0d4a83a8
......@@ -7,6 +7,7 @@
!.gitlab-ci
# Ignore builds and ThirdParty directories
build
buildDebug
builds
ThirdParty
# Ignore .DS_Store sometimes created by OS X.
......
......@@ -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)
......
......@@ -4,7 +4,10 @@ Changelog
v5.1.0
------
**Library**
- Restructure library to use local coefficient storage down to the GlobalLinSys level. Removed GlobalCeoffs functionality (!963)
- Restructure library to use local coefficient storage down to the GlobalLinSys
level. Removed GlobalCeoffs 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)
......@@ -18,12 +21,18 @@ v5.1.0
**CardiacEPSolver**
- Added additional parameter sets to Fenton-Karma model (!1119)
**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)
- Added r-adaptation code (!1109)
**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
------
......@@ -31,6 +40,9 @@ v5.0.1
- Fix incorrect coordinate dimension used in history point filter (!1118)
- Fix compile errors with GCC 9.x (!1108)
- Correct the Energy/Enstropy integral for the 3DH1 flow (!1132)
- Added IsRealEqual method to compare real numbers with relative tolerance.
Started using it in SharedArray and in NekMesh to fix peralign-extrude tool
chain (!1134)
**IncNavierStokesSolver**
- Change the baseflow time in the Adjoint advection (!1133)
......
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
This diff is collapsed.
......@@ -442,18 +442,28 @@ corresponding edge or face is the same size and shape but translated along the
appropriate axis.
When using periodic boundary conditions that are rotationally aligned the following rotational options should be applied:
When using periodic boundary conditions that are rotationally aligned the
following rotational options should be applied:
%
\begin{lstlisting}[style=BashInputStyle]
NekMesh -m peralign:surf1=11:surf2=12:dir=x:rot=PI/6:tol=1e-6 \
NekMesh -m peralign:surf1=11:surf2=12:dir=x:rot=PI/6 \
Mesh.xml Mesh_aligned.xml
\end{lstlisting}
%
where \inltt{rot} specifies the rotation angle in radians from
surf1 to surf2 about the axis specified by \inltt{dir} (i.e. the ``x'' axis in
this example). An optional tolerance \inltt{tol} can also be specified which is
the tolerance within which the rotation is assumed to be exact. The
default tolerance is 1e-8.
this example).
The rotation/translation is assumed to be exact within a relative tolerance.
An optional factor, which is used to scale the tolerance, \inltt{tolfact}
can also be specified. The default tolerance factor is 4, and it needs to be
$tolfact \ge 1$. For example:
%
\begin{lstlisting}[style=BashInputStyle]
NekMesh -m peralign:surf1=11:surf2=12:dir=x:rot=PI/6:tolfact=100 \
Mesh.xml Mesh_aligned.xml
\end{lstlisting}
%
In 3D, where prismatic or tetrahedral elements are connected to one or both of
the surfaces, additional logic is needed to guarantee connectivity in the XML
......@@ -981,23 +991,47 @@ A list of the CAD surfaces which will have a prism generated on is described by
%
The mesh generator has been created with a range of error messages to aid in
debugging. If you encounter an error and the mesh generator fails, run \nm with
the verbose \inltt{-v} flag and send the stdout with the .mcf and .step files
to \inltt{m.turner14@imperial.ac.uk}. Without the feedback this functionality
cannot improve.
the verbose \inltt{-v} flag and send the stdout with the .mcf and .step files to
\inltt{d.moxey@exeter.ac.uk}. Without the feedback this functionality cannot
improve.
\subsubsection{Handling 3D geometries with voids}
Although NekMesh supports the definition of 3D geometries that contain voids --
for example, a sphere contained within a cube -- at present it does require the
definition of a point per-void that lies strictly on the interior of the
void. This is so that tetrahedra on the interior of the void can be removed
before the mesh is generated.
%
For example, if one defines a geometry where two spheres of radius 1, centred at
$(0,0,0)$ and $(2,0,0)$, were contained within a larger domain, the void points
can be specified through the \inltt{VOIDPOINTS} tag in the MCF as follows:
\begin{lstlisting}[style=XmlStyle]
<NEKTAR>
<MESHING>
<!-- other parameters here... -->
<VOIDPOINTS>
<V> 0 0 0 </V>
<V> 2 0 0 </V>
</VOIDPOINTS>
</MESHING>
</NEKTAR>
\end{lstlisting}
\subsubsection{GEO format}
Recent developments have been made to facilitate the generation of meshes from
<