Commit 6da6a7ef authored by Dave Moxey's avatar Dave Moxey
Browse files

Merge branch 'master' into fix/mpi-cmake

parents 3cf92905 8a377d39
......@@ -34,8 +34,13 @@ v4.4.0
- Enabled MUMPS support in PETSc if a Fortran compiler was found and added 3D
support to the Helmholtz smoother used e.g. in FieldConverts C0Projection
module (!714)
- Fix bug in `Vmath::FillWhiteNoise` which caused `ForcingNoise` to have
a repeated pattern (!718)
- Fix bug in the calculation of the RHS magnitude in CG solver (!721)
- Fix bug in MPI detection for recent CMake on OS X (!725)
- Fix bug in CMake Homebrew and MacPorts detection for OS X (!729)
- Fix bug in FieldUtils when using half mode expansions (!734)
- Fix bug in CMake PETSc detection for Ubuntu 16.04/Debian 9 (!735)
**ADRSolver:**
- Add a projection equation system for C^0 projections (!675)
......@@ -52,12 +57,17 @@ v4.4.0
- Fix linearised advection for full 3D cases (!708)
- Added a weak pressure formulation following Guermond & Shen (!713)
- Added a convective like outflow boundary condition from Dong (!713)
- Added the ability to specifiy Womersley boundary conditions for pulsatile flow (!472)
**CardiacEPSolver:**
- Added a Python translator utility to generate cell models from CellML (!723)
**FieldConvert:**
- Allow equi-spaced output for 1D and 2DH1D fields (!613)
- Update quality metric to include scaled Jacobian output (!695)
- Allow multiple XML files to be specified in InterpField module (!705)
- Fix issues with isocontour module (!719)
- Fix issue with interpolator routine (!746)
**NekMesh:**
- Modify curve module to allow for spline input (!628)
......@@ -84,6 +94,17 @@ v4.4.0
(!712)
- 2D to 3D mesh extrusion module (!715)
- Add new two-dimensional mesher from NACA code or step file (!720)
- Fix inverted boundary layer in 2D (!736)
- More sensible element sizing with boundary layers in 2D (!736)
- Change variable names in mcf file to make more sense (!736)
- Fix issues in varopti module so that in can be compiled without meshgen on
(!736)
- Replace LAPACK Eigenvalue calculation with handwritten function in
varopti (!738)
- Improved node-colouring algorithm for better load-balancing
in varopti (!738)
- Simplified calculation of the energy functional in varopti for improved
performance (!738)
**FieldConvert:**
- Move all modules to a new library, FieldUtils, to support post-processing
......@@ -92,6 +113,9 @@ v4.4.0
- Add module to add composite ID of elements as a field (!674)
- Add reader for Nek5000 field files (!680)
**Tester:**
- Fix output not displayed on segfault or system error (!745)
v4.3.5
------
**Library:**
......@@ -120,6 +144,12 @@ v4.3.4
**IncNavierStokesSolver:**
- Fix 2nd order time-integration for VCSMapping (!687)
v4.3.4
------
**Library:**
- Fix performance issue with `v_ExtractDataToCoeffs` for post-processing of large
simulations (!672)
v4.3.3
------
**Library**:
......
......@@ -139,6 +139,8 @@ OPTION(NEKTAR_BUILD_PACKAGES "Build Nektar++ binary packages" OFF)
MARK_AS_ADVANCED(NEKTAR_BUILD_PACKAGES)
OPTION(NEKTAR_TEST_ALL "Include full set of regression tests to this build." OFF)
OPTION(NEKTAR_TEST_USE_HOSTFILE "Use a hostfile to explicitly specify number of
slots." OFF)
# Meshing utilities and library
IF (NOT WIN32)
......@@ -229,9 +231,7 @@ INCLUDE (ThirdPartyBoost)
INCLUDE (ThirdPartyFFTW)
INCLUDE (ThirdPartyArpack)
INCLUDE (ThirdPartyMPI)
INCLUDE (ThirdPartyPETSc)
INCLUDE (ThirdPartyVTK)
INCLUDE (ThirdPartyQT4)
INCLUDE (ThirdPartySMV)
INCLUDE (ThirdPartyOCE)
INCLUDE (ThirdPartyTetGen)
......@@ -274,7 +274,7 @@ IF( NEKTAR_USE_WIN32_LAPACK )
ENDIF( NEKTAR_USE_WIN32_LAPACK )
IF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
INCLUDE(FindNativeBlasLapack)
INCLUDE(ThirdPartyBlasLapack)
SET(NEKTAR_USING_BLAS TRUE)
SET(NEKTAR_USING_LAPACK TRUE)
ENDIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
......@@ -303,6 +303,8 @@ ELSE( NEKTAR_USE_MEMORY_POOLS )
REMOVE_DEFINITIONS(-DNEKTAR_MEMORY_POOL_ENABLED)
ENDIF( NEKTAR_USE_MEMORY_POOLS )
INCLUDE (ThirdPartyPETSc)
SET(Boost_USE_STATIC_LIBS OFF)
IF( WIN32 )
# The auto-linking feature has problems with USE_STATIC_LIBS off, so we use
......
......@@ -62,6 +62,7 @@ ENDIF ( MKL_LAPACK_FOUND )
SET( MKL_BLAS_INCLUDE_FILE ${MKL_INCLUDE_DIR}/mkl_blas.h )
SET( MKL_LAPACK_INCLUDE_FILE ${MKL_INCLUDE_DIR}/mkl_lapack.h )
GET_FILENAME_COMPONENT(MKL_LIB_DIR ${MKL_CORE} PATH)
IF (MKL_INCLUDE_DIR)
SET(MKL_FOUND ON)
......@@ -78,6 +79,7 @@ ELSE(MKL_FOUND OR MKL_INTEL_FOUND )
ENDIF (MKL_FOUND OR MKL_INTEL_FOUND )
MARK_AS_ADVANCED(MKL_INCLUDE_DIR)
MARK_AS_ADVANCED(MKL_LIB_DIR)
MARK_AS_ADVANCED(MKL_LAPACK)
MARK_AS_ADVANCED(MKL)
MARK_AS_ADVANCED(MKL_GUIDE)
......
......@@ -4,6 +4,8 @@ SET(NATIVE_BLAS_LAPACK_SEARCH_PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/loca
FIND_LIBRARY(NATIVE_BLAS NAMES blas PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})
FIND_LIBRARY(NATIVE_LAPACK NAMES lapack PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})
GET_FILENAME_COMPONENT(NATIVE_BLAS_LIB_DIR ${NATIVE_BLAS} PATH)
GET_FILENAME_COMPONENT(NATIVE_LAPACK_LIB_DIR ${NATIVE_LAPACK} PATH)
IF (NATIVE_BLAS AND NATIVE_LAPACK)
......@@ -22,4 +24,6 @@ ENDIF (NATIVE_BLAS_LAPACK_FOUND)
MARK_AS_ADVANCED(NATIVE_BLAS)
MARK_AS_ADVANCED(NATIVE_LAPACK)
MARK_AS_ADVANCED(NATIVE_BLAS_LIB_DIR)
MARK_AS_ADVANCED(NATIVE_LAPACK_LIB_DIR)
......@@ -225,6 +225,13 @@ show :
else ()
set (PETSC_LIBRARY_VEC "NOTFOUND" CACHE INTERNAL "Cleared" FORCE) # There is no libpetscvec
petsc_find_library (SINGLE petsc)
# Debian 9/Ubuntu 16.04 uses _real and _complex extensions when using libraries in /usr/lib/petsc.
if (NOT PETSC_LIBRARY_SINGLE)
petsc_find_library (SINGLE petsc_real)
endif()
if (NOT PETSC_LIBRARY_SINGLE)
petsc_find_library (SINGLE petsc_complex)
endif()
foreach (pkg SYS VEC MAT DM KSP SNES TS ALL)
set (PETSC_LIBRARIES_${pkg} "${PETSC_LIBRARY_SINGLE}")
endforeach ()
......
########################################################################
#
# ThirdParty configuration for Nektar++
#
# BLAS/LAPACK
#
########################################################################
INCLUDE(FindNativeBlasLapack)
IF(NATIVE_BLAS_LAPACK_FOUND)
SET(BUILD_BLAS_LAPACK OFF)
ELSE()
IF(CMAKE_Fortran_COMPILER)
SET(BUILD_BLAS_LAPACK ON)
ELSE()
MESSAGE(SEND_ERROR "No blas installation or fortran compiler found")
ENDIF()
ENDIF()
OPTION(THIRDPARTY_BUILD_BLAS_LAPACK "Build blas and lapack libraries from ThirdParty."
${BUILD_BLAS_LAPACK})
IF(THIRDPARTY_BUILD_BLAS_LAPACK)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
lapack-3.7.0
PREFIX ${TPSRC}
URL http://www.netlib.org/lapack/lapack-3.7.0.tgz
URL_MD5 "697bb8d67c7d336a0f339cc9dd0fa72f"
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/lapack-3.7.0
BINARY_DIR ${TPBUILD}/lapack-3.7.0
TMP_DIR ${TPBUILD}/lapack-3.7.0-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_Fortran_COMPILER:FILEPATH=${CMAKE_Fortran_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_INSTALL_LIBDIR:PATH=${TPDIST}/lib
-DBUILD_SHARED_LIBS:STRING=ON
-DBUILD_TESTING:STRING=OFF
${TPSRC}/lapack-3.7.0
)
SET(NATIVE_BLAS blas CACHE FILEPATH "BLAS library" FORCE)
SET(NATIVE_LAPACK lapack CACHE FILEPATH "LAPACK library" FORCE)
SET(NATIVE_BLAS_LIB_DIR ${TPDIST}/lib CACHE FILEPATH "BLAS library dir" FORCE)
SET(NATIVE_LAPACK_LIB_DIR ${TPDIST}/lib CACHE FILEPATH "LAPACK library dir" FORCE)
MARK_AS_ADVANCED(NATIVE_BLAS)
MARK_AS_ADVANCED(NATIVE_LAPACK)
MARK_AS_ADVANCED(NATIVE_BLAS_LIB_DIR)
MARK_AS_ADVANCED(NATIVE_LAPACK_LIB_DIR)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(${TPDIST}/include)
IF (WIN32)
MESSAGE(STATUS "Build blas: ${TPDIST}/${LIB_DIR}/${NATIVE_BLAS}.dll")
MESSAGE(STATUS "Build lapack: ${TPDIST}/${LIB_DIR}/${NATIVE_LAPACK}.dll")
ELSE ()
MESSAGE(STATUS "Build blas: ${TPDIST}/${LIB_DIR}/lib${NATIVE_BLAS}.a")
MESSAGE(STATUS "Build lapack: ${TPDIST}/${LIB_DIR}/${NATIVE_LAPACK}.a")
ENDIF()
ENDIF()
......@@ -8,7 +8,7 @@
# Try to find system Loki headers. Hint /opt/local/include for MacPorts
# (although there is no Portfile for Loki currently).
FIND_PATH(LOKI_INCLUDE_DIR loki/Typelist.h PATHS /opt/local/include)
FIND_PATH(LOKI_INCLUDE_DIR loki/Singleton.h PATHS /opt/local/include)
IF (LOKI_INCLUDE_DIR)
SET(BUILD_LOKI OFF)
......
......@@ -49,6 +49,27 @@ IF (NEKTAR_USE_PETSC)
# we use a MUMPS build in ordering here, in the future it might make
# sense to hook it up with metis/scotch since this MIGHT be faster
SET(PETSC_MUMPS --download-scalapack --download-mumps)
SET(PETSC_DEPS "")
IF( NEKTAR_USE_BLAS_LAPACK )
IF( NEKTAR_USE_MKL AND MKL_FOUND )
SET(PETSC_MUMPS ${PETSC_MUMPS} --with-blas-lapack-dir=${MKL_LIB_DIR})
ELSEIF( NEKTAR_USE_WIN32_LAPACK )
SET(PETSC_MUMPS ${PETSC_MUMPS} --with-blas-lapack-dir=${LAPACK_DIR})
ELSEIF( NEKTAR_USE_SYSTEM_BLAS_LAPACK )
SET(PETSC_MUMPS ${PETSC_MUMPS} --with-blas-lapack-dir=${NATIVE_LAPACK_LIB_DIR})
IF(THIRDPARTY_BUILD_BLAS_LAPACK)
SET(PETSC_DEPS ${PETSC_DEPS} lapack-3.7.0)
ENDIF()
ELSE()
MESSAGE(STATUS "No suitable blas/lapack found, downloading")
SET(PETSC_MUMPS ${PETSC_MUMPS} --download-fblaslapack)
ENDIF()
ELSE()
MESSAGE(STATUS "No suitable blas/lapack found, downloading")
SET(PETSC_MUMPS ${PETSC_MUMPS} --download-fblaslapack)
ENDIF()
ELSE()
MESSAGE(WARNING "No Fortran support. Building PETSc without MUMPS support")
SET(PETSC_Fortran_COMPILER "0")
......@@ -56,6 +77,7 @@ IF (NEKTAR_USE_PETSC)
EXTERNALPROJECT_ADD(
petsc-3.7.2
DEPENDS ${PETSC_DEPS}
PREFIX ${TPSRC}
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
......
# QT4
OPTION(NEKTAR_USE_QT4
"Use QT4 for graphical tools and utilities." OFF)
IF( NEKTAR_USE_QT4 )
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
IF (QT4_FOUND)
MESSAGE(STATUS "Found QT4: ${QT_INCLUDE_DIR}")
ENDIF(QT4_FOUND)
ENDIF( NEKTAR_USE_QT4 )
......@@ -872,6 +872,83 @@ the session file:
\item \inltt{SVVDiffCoeff}: sets the SVV diffusion coefficient (default value = 0.1)
\end{itemize}
\subsection{Womersley Boundary Condition}
It is possible to define the time-dependent Womersley velocity profile
for pulsatile flow in a pipe. The modulation of the velocity profile
is based on the desired peak or centerline velocity which can be
represented by a Fourier expansion $U_{max}=A(\omega_n)e^{i\omega_n
t}$ where $A$ are the Fourier modes and $\omega $ the frequency. The
womersely solution is then defined as:
$$ w(r,t) = A_0(1-(r/R)^2) + \sum_{n=1}^N
\tilde{A_n}[1-\frac{J_0(i^{3/2}\alpha_n r/R)}{J_0(i^{3/2}
\alpha)}]e^{i\omega_n t} $$
where the womersley number $\alpha$ is defined:
$$ \alpha_n = R\sqrt{\frac{2\pi n}{T\nu}}$$
and $\tilde{A_n}$ ($n=1:N$)are the Fourier coefficients scaled in the
following way:
$$ \tilde{A_n} = 2A_n/[1 - \frac{1}{J_0(i^{3/2}\alpha)}] $$
The Womersley velocity profile is implemented in the following way:
\begin{lstlisting}[style=XMLStyle]
<REGION REF="0">
<D VAR="u" USERDEFINEDTYPE="Womersley:WomParams.xml" VALUE="0" />
<D VAR="v" USERDEFINEDTYPE="Womersley:WomParams.xml" VALUE="0" />
<D VAR="w" USERDEFINEDTYPE="Womersley:WomParams.xml" VALUE="0" />
<N VAR="p" USERDEFINEDTYPE="H" VALUE="0" />
</REGION>
\end{lstlisting}
A file containing the Fourier coefficients, $\tilde{A}$, must be in
the directory where the solver is called from. The name of the file is
defined by the string given in the attribute \inltt{USERDEFINEDTYPE}
after the ``:'' and contains the real and imaginary coefficients. This
file has the format
\begin{lstlisting}[style=XMLStyle]
<NEKTAR>
<WOMERSLEYBC>
<WOMPARAMS>
<W PROPERTY="Radius" VALUE="0.5" />
<W PROPERTY="Period" VALUE="1.0" />
<W PROPERTY="axisnormal" VALUE="0.0,0.0,1.0" />
<W PROPERTY="axispoint" VALUE="0.0,0.0,0.0" />
</WOMPARAMS>
<FOURIERCOEFFS>
<F ID="0"> 0.600393641193, 0.0 </F>
<F ID="1"> -0.277707172935, 0.0767582715413 </F>
<F ID="2"> -0.0229953131146, 0.0760936232478 </F>
<F ID="3"> 0.00858135174058, 0.017089888642 </F>
<F ID="4"> 0.0140332527651, 0.0171575122496 </F>
<F ID="5"> 0.0156970122129, -0.00547357750345 </F>
<F ID="6"> 0.00473626554238, -0.00498786519876 </F>
<F ID="7"> 0.00204434981523, -0.00614566561937 </F>
<F ID="8"> -0.000274697215201, 0.000153571881197 </F>
<F ID="9"> -0.000148037910774, 2.68919619581e-05 </F>
</FOURIERCOEFFS>
</WOMERSLEYBC>
</NEKTAR>
\end{lstlisting}
Each value of $\tilde{A}$ is provided in the \inltt{FOURIERCOEFFS}
section and provided as separate entries containing the real and
imaginary components, i.e. the mean component provided above is
$0.600393641193,0.0$.
Similarly in the \inltt{WOMPARAMS} section the key parameters of the boundary condition are also provided as:
\begin{itemize}
\item \inltt{RADIUS} is the radius of the boundary.
\item \inltt{PERIOD} is the cycle time period,
\item \inltt{AXISNORMAL} defines the normal direction to the boundary,
\item \inltt{AXISPOINT} defines a coordinate in the boundary centre,
\end{itemize}
\subsection{Forcing}
\subsubsection{MovingBody}
......
......@@ -495,7 +495,7 @@ where the step time is used as variable. For example, the function
</FUNCTION>
\end{lstlisting}
For .pts files, the time consuming computation of interpolation weights in only
For .pts files, the time consuming computation of interpolation weights is only
performed for the first timestep. The weights are stored and reused in all subsequent steps,
which is why all consecutive .pts files must use the same ordering, number and location of
data points.
......@@ -674,4 +674,4 @@ will be the y-axis and the z-axis.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../user-guide"
%%% End:
\ No newline at end of file
%%% End:
......@@ -190,7 +190,10 @@ state of the solution fields at at given timestep. This can subsequently be used
for restarting the simulation or examining time-dependent behaviour. This
produces a sequence of files, by default named \inltt{session\_*.chk}, where
\inltt{*} is replaced by a counter. The initial condition is written to
\inltt{session\_0.chk}.
\inltt{session\_0.chk}. Existing files are not overwritten, but renamed to e.g.
\inltt{session\_0.bak0.chk}. In case this file already exists, too, the \inltt{chk}-file
is renamed to \inltt{session\_0.bak*.chk} and so on.
\begin{notebox}
This functionality is equivalent to setting the \inltt{IO\_CheckSteps}
......
......@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
}
}
char *vars[3] = { "u", "v", "w" };
string vars = "uvw";
for (int i = 0; i < dim; ++i)
{
......
......@@ -14,7 +14,7 @@ NekDouble Tri_sol(NekDouble x, NekDouble y, int order1, int order2);
int main(int argc, char *argv[])
{
int i, j;
int i;
int order, nq1, nq2;
LibUtilities::PointsType Qtype1, Qtype2;
LibUtilities::BasisType btype1, btype2;
......
......@@ -281,7 +281,9 @@ struct Field
// Define Homogeneous expansion
int nplanes;
NekDouble lz;
LibUtilities::BasisType btype;
LibUtilities::BasisType btype;
LibUtilities::PointsType ptype =
LibUtilities::eFourierEvenlySpaced;
if (fldfilegiven)
{
......@@ -299,6 +301,11 @@ struct Field
nplanes = 4;
}
}
else if (btype == LibUtilities::eFourierHalfModeRe &&
nplanes == 1)
{
ptype = LibUtilities::ePolyEvenlySpaced;
}
}
else
{
......@@ -310,7 +317,7 @@ struct Field
// Choose points to be at evenly spaced points at
// nplanes points
const LibUtilities::PointsKey Pkey(
nplanes, LibUtilities::eFourierEvenlySpaced);
nplanes, ptype);
const LibUtilities::BasisKey Bkey(btype, nplanes, Pkey);
......
......@@ -339,8 +339,7 @@ void Interpolator::Interpolate(
if (elmtid >= 0)
{
int offset = m_expInField[0]->GetPhys_Offset(
m_expInField[0]->GetOffset_Elmt_Id(elmtid));
int offset = m_expInField[0]->GetPhys_Offset(elmtid);
for (int f = 0; f < m_expInField.size(); ++f)
{
......@@ -424,8 +423,7 @@ void Interpolator::Interpolate(
if (elmtid >= 0)
{
int offset = m_expInField[0]->GetPhys_Offset(
m_expInField[0]->GetOffset_Elmt_Id(elmtid));
int offset = m_expInField[0]->GetPhys_Offset(elmtid);
for (int f = 0; f < m_expInField.size(); ++f)
{
......
......@@ -99,7 +99,7 @@ void ProcessAddCompositeID::Process(po::variables_map &vm)
m_f->m_graph->GetComposites();
SpatialDomains::CompositeMapConstIter it;
NekDouble compid;
NekDouble compid=0;
// loop over elements
for (int n = 0; n < exp->GetNumElmts(); ++n)
......
......@@ -862,8 +862,7 @@ void Iso::GlobalCondense(vector<IsoSharedPtr> &iso, bool verbose)
//Find neipghbours
int unique_index = 0;
bool unique_index_found = false;
int prog;
int prog=0;
for(i = 0; i < m_nvert; ++i)
{
if(verbose)
......@@ -871,7 +870,7 @@ void Iso::GlobalCondense(vector<IsoSharedPtr> &iso, bool verbose)
prog = LibUtilities::PrintProgressbar(i,m_nvert,
"Nearest verts",prog);
}
BPoint queryPoint = inPoints[i].first;
......@@ -882,7 +881,7 @@ void Iso::GlobalCondense(vector<IsoSharedPtr> &iso, bool verbose)
}
else
{
// find nearest 10 points within the distance box
std::vector<PointPair> result;
rtree.query(bgi::nearest(queryPoint, 10), std::back_inserter(result));
......@@ -898,7 +897,7 @@ void Iso::GlobalCondense(vector<IsoSharedPtr> &iso, bool verbose)
{
id2 = result[id1].second;
samept.insert(id2);
if(global_to_unique_map[id2] <unique_index)
{
new_index = global_to_unique_map[id2];
......@@ -919,7 +918,7 @@ void Iso::GlobalCondense(vector<IsoSharedPtr> &iso, bool verbose)
}
}
}
if(verbose)
{
cout << endl;
......
......@@ -83,7 +83,7 @@ void ProcessMultiShear::Process(po::variables_map &vm)
}
}
int nstart, i, j, nfields;
int nstart, i, j, nfields=0;
bool wssg = false;
NekDouble nfld = m_config["N"].as<NekDouble>();
string fromfld, basename, endname, nstartStr;
......
......@@ -108,7 +108,7 @@ void ProcessPointDataToFld::Process(po::variables_map &vm)
int i, j;
bool setnantovalue = false;
NekDouble defvalue;
NekDouble defvalue=0.0;
if (!boost::iequals(m_config["setnantovalue"].as<string>(), "NotSet"))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment