Commit 473075bf authored by Michael Turner's avatar Michael Turner
Browse files

Merge remote-tracking branch 'origin/master' into feature/insert_new_logic

parents 8f3ccc55 2c38d5c2
......@@ -23,6 +23,7 @@ v4.4.0
to boundary conditions (!615)
- Allow expansions to be loaded directly from field file (!617)
- New options for load balancing (DOF or BOUNDARY) in mesh partitioner (!617)
- Rework nodal utilities to support nodal prismatic elements (!660)
- Update Body/Field forces at each timestep (!665)
**ADRSolver:**
......@@ -40,14 +41,21 @@ v4.4.0
**FieldConvert:**
- Allow equi-spaced output for 1D and 2DH1D fields (!613)
- Update quality metric to include scaled Jacobian output (!695)
**NekMesh:**
- Modify curve module to allow for spline input (!628)
- Add STL surface writer module (!668)
- New module for inserting an alternate high-order surface into the working
mesh (!669)
- Add curve projection routines to CAD system (!697)
- Improvements to mesh linearisation module (!659)
- Add support for Gmsh high-order output (!679)
- Move CAD classes to factory format (!676)
- Add module to check topology of the mesh along with boundary connectivity
to detect problems such as hanging nodes (!691)
- Add option to `linearise` module to linearise only prisms (!688)
- Add option to `linearise` to use element quality (!690)
**FieldConvert:**
- Move all modules to a new library, FieldUtils, to support post-processing
......@@ -55,11 +63,24 @@ v4.4.0
- Add module to stretch homogeneous direction (!609)
- Add module to add composite ID of elements as a field (!674)
v4.3.5
------
**Documentation**
- Update build instructions in user guide for Windows (!692)
v4.3.4
------
**Library:**
- Fix performance issue with `v_ExtractDataToCoeffs` for post-processing of large
simulations (!672)
- Fix performance issue with `v_ExtractDataToCoeffs` for post-processing of
large simulations (!672)
- Added additional assertions to ensure homogeneous simulations have an even
number of planes per process (!666)
- Fix compilation with NEKTAR_USE_MESHGEN option
- Fix IterativeFull solver in parallel (!685)
- Fix error message for missing fld file (!689)
**IncNavierStokesSolver:**
- Fix 2nd order time-integration for VCSMapping (!687)
v4.3.3
------
......
......@@ -15,7 +15,7 @@ IF(NEKTAR_USE_MESHGEN)
ELSE()
SET(BUILD_OCC ON)
ENDIF()
OPTION(THIRDPARTY_BUILD_OCC "Build OpenCascade library from ThirdParty."
${BUILD_OCC})
......@@ -33,7 +33,7 @@ IF(NEKTAR_USE_MESHGEN)
IF(WIN32)
MESSAGE(SEND_ERROR "Cannot currently use OpenCascade with Nektar++ on Windows")
ENDIF()
EXTERNALPROJECT_ADD(
opencascade-6.9
PREFIX ${TPSRC}
......
......@@ -427,3 +427,17 @@ year={2011}
volume = {33},
year = {2000}
}
@article{GaRoPeSa15,
title = {Distortion and quality measures for validating and generating
high-order tetrahedral meshes},
author = {Gargallo-Peir{\'o}, Abel and Roca, Xevi and Peraire, Jaime and
Sarrate, Josep},
journal = {Engineering with Computers},
volume = 31,
number = 3,
pages = {423--437},
year = 2015,
publisher = {Springer London}
}
......@@ -12,6 +12,7 @@ dependencies are required:
\item texlive-base
\item texlive-latex-extra
\item texlive-science
\item texlive-fonts-recommended
\item imagemagick
\end{itemize}
......
......@@ -369,7 +369,7 @@ automatically in the build process.
& & \multicolumn{2}{c}{Installation} & \\ \cmidrule(r){3-4}
Package & Req. & User & Auto. & Note \\
\midrule
MS Visual Studio & \cmark & \cmark & & 2012 and 2013 known working\\
MS Visual Studio & \cmark & \cmark & & 2012, 2013 and 2015 known working\\
CMake $\geq 3.0$ & \cmark & \cmark & & \\
BLAS & \cmark & \cmark & \cmark & \\
LAPACK & \cmark & \cmark & \cmark & \\
......@@ -382,10 +382,10 @@ ModMETIS & \cmark & \cmark & \cmark & \\
\subsubsection{Detailed instructions}
\begin{enumerate}
\item Install Microsoft Visual Studio 2013 (preferred) or 2012 (known to
\item Install Microsoft Visual Studio 2015 (preferred), 2013 or 2012 (known to
work). This can be obtained from Microsoft free of charge by using their
Express developer tools from
\url{http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx}.
Community developer tools from
\url{https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx}.
\item Install WinRAR from \url{http://www.rarlab.com/download.htm}.
\item Install CMake 3.0+ from \url{http://www.cmake.org/download/}. When
prompted, select the option to add CMake to the system PATH.
......@@ -395,14 +395,21 @@ ModMETIS & \cmark & \cmark & \cmark & \\
to the PATH.
\item (Optional) If you do not wish to build boost during the compilation
process (which can take some time), then boost binaries can be found at
\url{http://sourceforge.net/projects/boost/files/boost-binaries/1.57.0/}. By
\url{http://sourceforge.net/projects/boost/files/boost-binaries/1.61.0/}. By
default these install into \inlsh{C:\textbackslash local\textbackslash
boost\_1\_57\_0}. If you use these libraries, you will need to:
boost\_1\_61\_0}. If you use these libraries, you will need to:
\begin{itemize}
\item Rename \texttt{libs-msvc12.0} to \texttt{lib}
\item Rename \texttt{libs-msvc14.0} to \texttt{lib}
\item Inside the \texttt{lib} directory, create duplicates of
\texttt{boost\_zlib.dll} and \texttt{boost\_bzip2.dll} called
\texttt{zlib.dll} and \texttt{libbz2.dll}.
\texttt{zlib.dll} and \texttt{libbz2.dll}
\item Add a \inlsh{BOOST\_HOME} environment variable. To do so,
navigate to \emph{Control Panel > System and Security > System}, select
\emph{Advanced System Settings}, and in the \emph{Advanced} tab click the
\emph{Environment Variables}. In the \emph{System Variables} box, click
\emph{New}. In the \emph{New System Variable} window, type \inlsh{BOOST\_HOME}
next to \emph{Variable name} and \inlsh{C:\textbackslash local\textbackslash
boost\_1\_61\_0} next to\emph{Variable value}.
\end{itemize}
\item Unpack \inlsh{nektar++-\nekver.tar.gz} using WinRAR.
......@@ -415,8 +422,8 @@ ModMETIS & \cmark & \cmark & \cmark & \\
\item Create a \inlsh{builds} directory within the \inlsh{nektar++-\nekver}
subdirectory.
\item Open a Visual Studio terminal. From the start menu, this can be found in
\emph{All Programs > Visual Studio 2013 > Visual Studio Tools > Developer
Command Prompt for VS2013}.
\emph{All Programs > Visual Studio 2015 > Visual Studio Tools > Developer
Command Prompt for VS2015}.
\item Change directory into the \texttt{builds} directory and run the CMake
graphical utility:
\begin{lstlisting}[style=BashInputStyle]
......@@ -424,8 +431,8 @@ ModMETIS & \cmark & \cmark & \cmark & \\
cmake-gui ..
\end{lstlisting}
\item Select the build system you want to generate build scripts for. Note
that \emph{Visual Studio 2013} is listed as \emph{Visual Studio 12} in the
drop-down list. If you have a 64-bit installation of Windows 7, you should
that \emph{Visual Studio 2015} is listed as \emph{Visual Studio 14} in the
drop-down list. If you have a 64-bit installation of Windows, you should
select the \emph{Win64} variant, otherwise 32-bit executables will be
generated. Select the option to use the native compilers.
\item Click the \emph{Configure} button, then the \emph{Generate} button.
......@@ -450,7 +457,7 @@ ModMETIS & \cmark & \cmark & \cmark & \\
\item \inlsh{builds\textbackslash dist\textbackslash lib\textbackslash nektar++-\nekver}
\item \inlsh{builds\textbackslash dist\textbackslash bin}
\item Optionally, if you installed Boost from the binary packages,
\inlsh{C:\textbackslash local\textbackslash boost\_1\_57\_0 \textbackslash lib}
\inlsh{C:\textbackslash local\textbackslash boost\_1\_61\_0 \textbackslash lib}
\end{itemize}
\item To run the test suite, open a \textbf{new} command line window, change
to the \inlsh{builds} directory, and then issue the command
......
......@@ -122,6 +122,7 @@ possibly also Reynolds stresses) into single file;
\item \inltt{interppoints}: Interpolates a set of points to another, requires fromfld and fromxml to be defined, a line or plane of points can be defined;
\item \inltt{isocontour}: Extract an isocontour of ``fieldid'' variable and at value ``fieldvalue''. Optionally ``fieldstr'' can be specified for a string defiition or ``smooth'' for smoothing;
\item \inltt{jacobianenergy}: Shows high frequency energy of Jacobian;
\item \inltt{qualitymetric}: Evaluate a quality metric of the underlying mesh to show mesh quality;
\item \inltt{meanmode}: Extract mean mode (plane zero) of 3DH1D expansions;
\item \inltt{pointdatatofld}: Given discrete data at quadrature points
project them onto an expansion basis and output fld file;
......@@ -629,6 +630,38 @@ The output file \inltt{jacenergy.fld} can be processed in a similar
way as described in section \ref{s:utilities:fieldconvert:sub:convert}
to visualise the result either in Tecplot, Paraview or VisIt.
\subsection{Calculate mesh quality: \textit{qualitymetric} module}
The \inltt{qualitymetric} module assesses the quality of the mesh by calculating
a per-element quality metric and adding an additional field to any resulting
output. This does not require any field input, therefore an example usage looks
like
\begin{lstlisting}[style=BashInputStyle]
FieldConvert -m qualitymetric mesh.xml mesh-with-quality.dat
\end{lstlisting}
Two quality metrics are implemented that produce scalar fields $Q$:
\begin{itemize}
\item By default a metric outlined in~\cite{GaRoPeSa15} is produced, where all
straight sided elements have quality $Q = 1$ and $Q < 1$ shows the deformation
between the curved element and the straight-sided element. If $Q = 0$ then the
element is invalid. Note that $Q$ varies over the volume of the element but is
not guaranteed to be continuous between elements.
\item Alternatively, if the \inlsh{scaled} option is passed through to the
module, then the scaled Jacobian
\[
J_s =
\frac{\min_{\xi\in\Omega_{\text{st}}}J(\xi)}{\max_{\xi\in\Omega_{\text{st}}}J(\xi)}
\]
(i.e. the ratio of the minimum to maximum Jacobian of each element) is
calculated. Again $Q = 1$ denotes an ideal element, but now invalid elements
are shown by $Q < 0$. Any elements with $Q$ near zero are determined to be low
quality.
\end{itemize}
%
%
%
......
......@@ -542,17 +542,32 @@ The module parameters are:
\subsection{Linearisation}
The ability to remove all the high-order information in a mesh can be useful
at times.
The ability to remove all the high-order information in a mesh can be useful at
times when mesh generation is tricky or impossible in the presence of curvature
To do this in NekMesh use the command:
\begin{lstlisting}[style=BashInputStyle]
NekMesh -m linearise high-order-mesh.xml linear-mesh.xml
NekMesh -m linearise:all high-order-mesh.xml linear-mesh.xml
\end{lstlisting}
The output will contain only the linear mesh information, all curved information
is removed.
is removed. Alternatively
\begin{lstlisting}[style=BashInputStyle]
NekMesh -m linearise:invalid high-order-mesh.xml linear-mesh.xml
\end{lstlisting}
attempts to remove curvature from elements only where necessary. This is a
simple algorithm that removes curvature from invalid elements and repeats until
all elements are valid. Either \inlsh{all} or \inlsh{invalid} must be specified.
\begin{itemize}
\item \inlsh{all}: remove curvature from all elements.
\item \inlsh{invalid}: remove curvature from invalid elements.
\item \inlsh{prismonly}: consider only prisms when removing curvature. This is
useful in the presence of a prismatic boundary layer.
\end{itemize}
\subsection{Extracting interface between tetrahedra and prismatic elements}
......@@ -603,6 +618,19 @@ may issue the command
module in combination with the splitting module described earlier.
\end{notebox}
\subsection{Link Checking}
It is quite possible that a mesh contains some sort of hanging entity or
element connectivity error. The check link module is a fast check that, a)
elements are correctly connected and b) the boundary entities (composites)
match the interior domain:
\begin{lstlisting}[style=BashInputStyle]
NekMesh -m linkcheck mesh.xml mesh2.xml
\end{lstlisting}
This module should be added to the module chain for any complex if the user
suspects there may be a mesh issue. The module will print a warning if there is.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
......@@ -75,6 +75,15 @@ class BwdTrans_StdMat : public Operator
0.0, output.get(), m_stdExp->GetTotPoints());
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
DNekMatSharedPtr m_mat;
......@@ -155,6 +164,15 @@ class BwdTrans_IterPerExp : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
private:
BwdTrans_IterPerExp(
vector<StdRegions::StdExpansionSharedPtr> pCollExp,
......@@ -229,6 +247,15 @@ class BwdTrans_NoCollection : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
vector<StdRegions::StdExpansionSharedPtr> m_expList;
......@@ -310,6 +337,15 @@ class BwdTrans_SumFac_Seg : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
......@@ -406,6 +442,15 @@ class BwdTrans_SumFac_Quad : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......@@ -495,6 +540,15 @@ class BwdTrans_SumFac_Tri : public Operator
&output[0], m_nquad0);
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
......@@ -596,6 +650,15 @@ class BwdTrans_SumFac_Hex : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......@@ -755,6 +818,15 @@ class BwdTrans_SumFac_Tet : public Operator
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......@@ -887,6 +959,15 @@ class BwdTrans_SumFac_Prism : public Operator
0.0, output.get(), m_nquad0);
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
......
......@@ -79,6 +79,12 @@ class Collection
Array<OneD, NekDouble> &output1,
Array<OneD, NekDouble> &output2);
inline void ApplyOperator(
const OperatorType &op,
int dir,
const Array<OneD, const NekDouble> &inarray,
Array<OneD, NekDouble> &output);
inline bool HasOperator(const OperatorType &op);
protected:
......@@ -135,6 +141,19 @@ inline void Collection::ApplyOperator(
(*m_ops[op])(inarray, output0, output1, output2, wsp);
}
/**
*
*/
inline void Collection::ApplyOperator(
const OperatorType &op,
int dir,
const Array<OneD, const NekDouble> &inarray,
Array<OneD, NekDouble> &output)
{
Array<OneD, NekDouble> wsp(m_ops[op]->GetWspSize());
(*m_ops[op])(dir, inarray, output, wsp);
}
inline bool Collection::HasOperator(const OperatorType &op)
{
return (m_ops.find(op) != m_ops.end());
......
......@@ -81,6 +81,15 @@ class IProductWRTBase_StdMat : public Operator
0.0, output.get(), m_stdExp->GetNcoeffs());
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
DNekMatSharedPtr m_mat;
Array<OneD, const NekDouble> m_jac;
......@@ -170,6 +179,15 @@ class IProductWRTBase_IterPerExp : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
Array<OneD, NekDouble> m_jac;
......@@ -270,6 +288,15 @@ class IProductWRTBase_NoCollection : public Operator
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
vector<StdRegions::StdExpansionSharedPtr> m_expList;
......@@ -364,6 +391,15 @@ class IProductWRTBase_SumFac_Seg : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nmodes0;
......@@ -422,6 +458,15 @@ class IProductWRTBase_SumFac_Quad : public Operator
m_jac, input, output, wsp);
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......@@ -487,6 +532,15 @@ class IProductWRTBase_SumFac_Tri : public Operator
output,wsp);
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......@@ -561,6 +615,15 @@ class IProductWRTBase_SumFac_Hex : public Operator
m_jac,input,output,wsp);
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......@@ -639,6 +702,15 @@ class IProductWRTBase_SumFac_Tet : public Operator
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......@@ -722,6 +794,15 @@ class IProductWRTBase_SumFac_Prism : public Operator
m_jac,input,output,wsp);
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
const int m_nquad0;
const int m_nquad1;
......
......@@ -124,6 +124,15 @@ class IProductWRTDerivBase_StdMat : public Operator
}
}
virtual void operator()(
int dir,
const Array<OneD, const NekDouble> &input,
Array<OneD, NekDouble> &output,
Array<OneD, NekDouble> &wsp)
{
ASSERTL0(false, "Not valid for this operator.");
}
protected:
Array<OneD, DNekMatSharedPtr> m_iProdWRTStdDBase;
Array<TwoD, const NekDouble> m_derivFac;
......@@ -284,6 +293,15 @@ class IProductWRTDerivBase_IterPerExp : public Operator
}
}
virtual void operator()(
int dir,