Commit 3e028fc5 authored by Spencer Sherwin's avatar Spencer Sherwin

Merge branch 'master' into feature/IncNS_DGKernel

parents 8db831d6 623a8b06
......@@ -12,7 +12,8 @@ v5.0.0
- Use chrono in Timer (!807)
- Fix caching of FUNCTION tags that read from file and provide the same
functionality in FUNCTIONs defined for forcings (!759)
- Added native support for csv files in addititon to pts (!760)
- Added native support for csv files in addititon to pts (!760 !835)
- Utilize LAPACK_DIR env variable to find the native blas/lapack install (!827)
**NekMesh**:
- Add feature to read basic 2D geo files as CAD (!731)
......@@ -24,6 +25,7 @@ v5.0.0
- Fix issue with reading CCM files due to definition of default arrays
rather than a vector (!797)
- Fix inverted triangles and small memory issue in surface meshing (!798)
- Additional curve types in GEO reader: BSpline, Circle, Ellipse (!800)
**FieldConvert**:
- Add input module for Semtex field files (!777)
......@@ -33,21 +35,6 @@ v5.0.0
**Documentation**:
- Added the developer-guide repository as a submodule (!751)
v4.4.2
------
**NekMesh**:
- Fix uninitialised memory bug in Nek5000 input module (!801)
**Library**
- Fix ability to set default implementation in Collections and added an option
to set eNoCollections in FieldConvert as default (!789)
- Fix performance issue in ProcessIsoContour in relation to memory consumption
(!821)
- Fix performance issue with ExtractPhysToBndElmt (!796)
**Utilities**
- Fix vtkToFld missing dependency which prevented compiling with VTK 7.1 (!808)
v4.4.1
------
**Library**
......@@ -65,6 +52,12 @@ v4.4.1
- Fix deadlock with HDF5 input (!786)
- Fix missing entriess in LibUtilities::kPointsTypeStr (!792)
- Fix compiler warnings with CommDataType (!793)
- Fix ability to set default implementation in Collections and added an option
to set eNoCollections in FieldConvert as default (!789)
- Fix performance issue in ProcessIsoContour in relation to memory consumption
(!821)
- Fix performance issue with ExtractPhysToBndElmt (!796)
- Fix available classes being listed multiple times (!817)
**FieldConvert:**
- Fix issue with field ordering in the interppointdatatofld module (!754)
......@@ -80,10 +73,14 @@ v4.4.1
- Fix issue with older rea input files (!765)
- Fix memory leak in variational optimiser, add small optimisations (!785)
- Check the dimensionality of the CAD system before running the 2D generator (!780)
- Fix uninitialised memory bug in Nek5000 input module (!801)
**IncNavierStokesSolver**
- Fix an initialisation issue when using an additional advective field (!779)
**Utilities**
- Fix vtkToFld missing dependency which prevented compiling with VTK 7.1 (!808)
**Packaging**
- Added missing package for FieldUtils library (!755)
......
......@@ -177,10 +177,6 @@ IF (${CMAKE_COMPILER_IS_GNUCXX})
MARK_AS_ADVANCED(NEKTAR_ENABLE_PROFILE)
ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
OPTION(NEKTAR_USE_EXPRESSION_TEMPLATES
"Use Expression templates." OFF)
MARK_AS_ADVANCED(NEKTAR_USE_EXPRESSION_TEMPLATES)
# BLAS Support
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_SYSTEM_BLAS_LAPACK
"Use the system provided blas and lapack libraries" ON
......@@ -282,10 +278,6 @@ IF( NEKTAR_USE_TINYXML_STL )
ADD_DEFINITIONS( -DTIXML_USE_STL)
ENDIF( NEKTAR_USE_TINYXML_STL )
IF( NEKTAR_USE_EXPRESSION_TEMPLATES )
ADD_DEFINITIONS(-DNEKTAR_USE_EXPRESSION_TEMPLATES -DNEKTAR_USING_CMAKE)
ENDIF( NEKTAR_USE_EXPRESSION_TEMPLATES )
IF( NEKTAR_USE_MEMORY_POOLS )
ADD_DEFINITIONS(-DNEKTAR_MEMORY_POOL_ENABLED)
ELSE( NEKTAR_USE_MEMORY_POOLS )
......
SET(NATIVE_BLAS_LAPACK_SEARCH_PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 )
SET(TEST_ENV $ENV{LAPACK_DIR})
IF(NOT DEFINED LAPACK_DIR AND DEFINED TEST_ENV)
SET(LAPACK_DIR $ENV{LAPACK_DIR})
ENDIF()
SET( NATIVE_BLAS_LAPACK_SEARCH_PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
${LAPACK_DIR}/lib64
${LAPACK_DIR}/lib)
FIND_LIBRARY(NATIVE_BLAS NAMES blas PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})
FIND_LIBRARY(NATIVE_LAPACK NAMES lapack PATHS ${NATIVE_BLAS_LAPACK_SEARCH_PATHS})
......
......@@ -9,8 +9,7 @@
#If the user has not set BOOST_ROOT, look in a couple common places first.
MESSAGE(STATUS "Searching for Boost:")
SET(MIN_VER "1.56.0")
SET(NEEDED_BOOST_LIBS thread iostreams date_time filesystem system
program_options regex)
SET(NEEDED_BOOST_LIBS thread iostreams filesystem system program_options regex)
SET(Boost_DEBUG 0)
SET(Boost_NO_BOOST_CMAKE ON)
IF( BOOST_ROOT )
......
......@@ -162,13 +162,15 @@ possibly also Reynolds stresses) into single file;
\item \inltt{concatenate}: Concatenate a \nekpp binary output (.chk or .fld) field file into single file (deprecated);
\item \inltt{equispacedoutput}: Write data as equi-spaced output using simplices to represent the data for connecting points;
\item \inltt{extract}: Extract a boundary field;
\item \inltt{gradient}: Computes gradient of fields;
\item \inltt{homplane}: Extract a plane from 3DH1D expansions;
\item \inltt{homstretch}: Stretch a 3DH1D expansion by an integer factor;
\item \inltt{innerproduct}: take the inner product between one or a series of fields with another field (or series of fields).
\item \inltt{interpfield}: Interpolates one field to another, requires fromxml, fromfld to be defined;
\item \inltt{interppointdatatofld}: Interpolates given discrete data using a finite difference approximation to a fld file given an xml 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{interppoints}: Interpolates a field to a set of points. Requires fromfld, fromxml to be defined, and a topts, line, plane or box of target points;
\item \inltt{interpptstopts}: Interpolates a set of points to another. Requires a topts, line, plane or box of target points;
\item \inltt{isocontour}: Extract an isocontour of ``fieldid'' variable and at value ``fieldvalue''. Optionally ``fieldstr'' can be specified for a string definition 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;
......@@ -531,7 +533,7 @@ the second one contains the $a$-values, the third the $b$-values and so on.
In case of $n$-dimensional data, the $n$ coordinates are specified in the first $n$
columns accordingly.
%
An equivalant csv file is:
An equivalent csv file is:
\begin{lstlisting}[style=BashInputStyle]
# x, a, b, c
1.0000,-1.0000,1.0000,-0.7778
......@@ -633,6 +635,40 @@ and $cp0$ are not evaluated accordingly
\begin{notebox}
This module runs in parallel for the line, plane and box extraction of points.
\end{notebox}
%
%
%
\subsection{Interpolate a set of points to another: \textit{interpptstopts} module}
You can interpolate one set of points to another using the following command:
\begin{lstlisting}[style=BashInputStyle]
FieldConvert file1.pts -m interpptstopts:topts=file2.pts file2.dat
\end{lstlisting}
This command will interpolate the data in \inltt{file1.pts} to a new set
of points defined in \inltt{file2.pts} and output it to
\inltt{file2.dat}.
Similarly to the \textit{interppoints} module, the target point distribution
can also be specified using the \inltt{line}, \inltt{plane} or \inltt{box}
options. The optional arguments \inltt{clamptolowervalue},
\inltt{clamptouppervalue}, \inltt{defaultvalue} and \inltt{cp} are also
supported with the same meaning as in \textit{interppoints}.
One useful application for this module is with 3DH1D expansions, for which
currently the \textit{interppoints} module does not work. In this case, we can
use for example
\begin{lstlisting}[style=BashInputStyle]
FieldConvert file1.xml file1.fld -m interpptstopts:\
plane=npts1,npts2,x0,y0,z0,x1,y1,z1,x2,y2,z2,x3,y3,z3 \
file2.dat
\end{lstlisting}
With this usage, the \textit{equispacedoutput} module will be automatically
called to interpolate the field to a set of equispaced points in each element.
The result is then interpolated to a plane by the \textit{interpptstopts} module.
\begin{notebox}
This module does not work in parallel.
\end{notebox}
%
%
%
......
......@@ -938,10 +938,20 @@ range of geometrical features.
For a full description of the GEO format the user should refer to Gmsh's
documentation. The following commands are currently supported:
\begin{itemize}
\item \inltt{//} (comments)
\item \inltt{//} (i.e. comments)
\item \inltt{Point}
\item \inltt{Line}
\item \inltt{Spline}
\item \inltt{Spline} (through points)
\item \inltt{BSpline} (i.e. a B\'{e}zier curve)
\item \inltt{Ellipse} (arc): as defined in Gmsh's OpenCASCADE kernel, the first
point defines the start of the arc, the second point the centre and the fourth
point the end. The third point is not used. The start point along with the centre
point form the major axis and the minor axis is then computed so that the end
point falls onto the arc. The major axis must always be greater or equal to the
minor axis.
\item \inltt{Circle} (arc): the circle is a special case of the ellipse where the
third point is skipped. The distances between the start and end points and the
centre point must be equal or an error will be thrown.
\item \inltt{Line Loop}
\item \inltt{Plane Surface}
\end{itemize}
......@@ -950,7 +960,7 @@ At the present time, NekMesh does not support the full scripting capabilities of
GEO format. The used GEO files should be a straightforward succession of entity
creations (see list above). This should however allow for the creation of quite
a wide range of 2D geometries by transformation of arbitrary curves into generic
splines.
splines and arcs.
%%% Local Variables:
......
......@@ -72,7 +72,7 @@ class CoalescedGeomData
std::map<GeomData,Array<TwoD, NekDouble> > m_twoDGeomData;
};
typedef boost::shared_ptr<CoalescedGeomData> CoalescedGeomDataSharedPtr;
typedef std::shared_ptr<CoalescedGeomData> CoalescedGeomDataSharedPtr;
static CoalescedGeomDataSharedPtr GeomDataNull;
......
......@@ -48,8 +48,6 @@ Collection::Collection(
vector<StdRegions::StdExpansionSharedPtr> pCollExp,
OperatorImpMap &impTypes)
{
OperatorImpMap::iterator it;
// Initialise geometry data.
m_geomData = MemoryManager<CoalescedGeomData>::AllocateSharedPtr();
......@@ -59,7 +57,8 @@ Collection::Collection(
OperatorType opType = (OperatorType)i;
ImplementationType impType;
if ((it = impTypes.find(opType)) != impTypes.end())
auto it = impTypes.find(opType);
if (it != impTypes.end())
{
impType = it->second;
OperatorKey opKey(pCollExp[0]->DetShapeType(), opType, impType,
......
......@@ -38,18 +38,16 @@
#include <vector>
#include <LibUtilities/BasicUtils/HashUtils.hpp>
#include <StdRegions/StdExpansion.h>
#include <SpatialDomains/Geometry.h>
#include <Collections/CollectionsDeclspec.h>
#include <Collections/Operator.h>
#include <Collections/CoalescedGeomData.h>
#include <boost/unordered_map.hpp>
namespace Nektar {
namespace Collections {
/**
* @brief Collection
*/
......@@ -88,15 +86,15 @@ class Collection
inline bool HasOperator(const OperatorType &op);
protected:
StdRegions::StdExpansionSharedPtr m_stdExp;
std::vector<SpatialDomains::GeometrySharedPtr> m_geom;
boost::unordered_map<OperatorType, OperatorSharedPtr> m_ops;
CoalescedGeomDataSharedPtr m_geomData;
StdRegions::StdExpansionSharedPtr m_stdExp;
std::vector<SpatialDomains::GeometrySharedPtr> m_geom;
std::unordered_map<OperatorType, OperatorSharedPtr, EnumHash> m_ops;
CoalescedGeomDataSharedPtr m_geomData;
};
typedef std::vector<Collection> CollectionVector;
typedef boost::shared_ptr<CollectionVector> CollectionVectorSharedPtr;
typedef std::shared_ptr<CollectionVector> CollectionVectorSharedPtr;
/**
......
......@@ -51,9 +51,7 @@ CollectionOptimisation::CollectionOptimisation(
ImplementationType defaultType)
{
int i;
map<ElmtOrder, ImplementationType> defaults;
map<ElmtOrder, ImplementationType> defaultsPhysDeriv;
map<ElmtOrder, ImplementationType>::iterator it;
map<ElmtOrder, ImplementationType> defaults, defaultsPhysDeriv;
bool verbose = (pSession.get()) &&
(pSession->DefinesCmdLineArgument("verbose")) &&
(pSession->GetComm()->GetRank() == 0);
......@@ -64,7 +62,6 @@ CollectionOptimisation::CollectionOptimisation(
m_defaultType = defaultType == eNoImpType ? eIterPerExp : defaultType;
map<string, LibUtilities::ShapeType> elTypes;
map<string, LibUtilities::ShapeType>::iterator it2;
elTypes["S"] = LibUtilities::eSegment;
elTypes["T"] = LibUtilities::eTriangle;
elTypes["Q"] = LibUtilities::eQuadrilateral;
......@@ -74,29 +71,29 @@ CollectionOptimisation::CollectionOptimisation(
elTypes["H"] = LibUtilities::eHexahedron;
// Set defaults for all element types.
for (it2 = elTypes.begin(); it2 != elTypes.end(); ++it2)
for (auto &it2 : elTypes)
{
defaults [ElmtOrder(it2->second, -1)] = m_defaultType;
defaultsPhysDeriv [ElmtOrder(it2