Commit a6636258 authored by mike's avatar mike
Browse files

Merge remote-tracking branch 'origin/master' into fix/tinyxml

parents b4230c8b 56f554e3
......@@ -14,6 +14,13 @@ v5.0.0
functionality in FUNCTIONs defined for forcings (!759)
- Added native support for csv files in addititon to pts (!760)
- Add patch to tinyxml to fix size_t vs int bug (!820)
- Add ARPACK thirdparty build capabilities (!828)
- 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)
- Simplify RawType typedefs (!840)
- Remove unused files from BasicUtils (!841)
- Remove checks for old boost versions which are no longer supported (!841)
- Refactor ParseUtils to be more consistent (!843)
**NekMesh**:
- Add feature to read basic 2D geo files as CAD (!731)
......@@ -25,14 +32,18 @@ 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)
- Fixed interppoints module (!760)
- Move StreamFunction utility to a FieldConvert module (!809)
- Enable output to multiple files (!844)
**Documentation**:
- Added the developer-guide repository as a submodule (!751)
<<<<<<< CHANGELOG.md
v4.4.2
------
**NekMesh**:
......@@ -41,10 +52,15 @@ v4.4.2
**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)
=======
>>>>>>> CHANGELOG.md
v4.4.1
------
**Library**
......@@ -62,6 +78,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)
......@@ -77,10 +99,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,6 +9,8 @@
OPTION(NEKTAR_USE_ARPACK
"Use Arpack routines for evaluating eigenvalues and eigenvectors" OFF)
SET(BUILD_ARPACK OFF)
IF (NEKTAR_USE_ARPACK)
FIND_LIBRARY(ARPACK_LIBRARY NAMES "arpack.1" "arpack" PATHS /opt/local/lib)
......@@ -16,7 +18,50 @@ IF (NEKTAR_USE_ARPACK)
MESSAGE(STATUS "Found Arpack: ${ARPACK_LIBRARY}")
MARK_AS_ADVANCED(ARPACK_LIBRARY)
ELSE()
MESSAGE(FATAL_ERROR "Could not find Arpack")
IF(CMAKE_Fortran_COMPILER)
SET(BUILD_ARPACK ON)
ELSE()
MESSAGE(FATAL_ERROR "Could not find or build Arpack")
ENDIF()
ENDIF()
ENDIF()
OPTION(THIRDPARTY_BUILD_ARPACK "Build arpack libraries from ThirdParty."
${BUILD_ARPACK})
IF(THIRDPARTY_BUILD_ARPACK)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
arpack-ng-1.0
PREFIX ${TPSRC}
URL ${TPURL}/arpack-ng.tar.gz
URL_MD5 "26cb30275d24eb79c207ed403e794736"
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/arpack-ng-1.0
BINARY_DIR ${TPBUILD}/arpack-ng-1.0
TMP_DIR ${TPBUILD}/arpack-ng-1.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
${TPSRC}/arpack-ng-1.0
)
SET(ARPACK_LIBRARY arpack)
LINK_DIRECTORIES(${TPDIST}/lib)
LINK_DIRECTORIES(${TPDIST}/lib)
INCLUDE_DIRECTORIES(${TPDIST}/include)
MESSAGE(STATUS "Build arpack: ${TPDIST}/${LIB_DIR}/lib${ARPACK_LIBRARY}.so")
ELSE()
ADD_CUSTOM_TARGET(arpack-ng-1.0 ALL)
ENDIF()
......@@ -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 )
......
......@@ -60,8 +60,9 @@ IF (NEKTAR_USE_FFTW)
# Test if FFTW path is a system path. Only add to include path if not an
# implicitly defined CXX include path (due to GCC 6.x now providing its own
# version of some C header files and -isystem reorders include paths).
GET_FILENAME_COMPONENT(X ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ABSOLUTE)
GET_FILENAME_COMPONENT(X "${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}" ABSOLUTE)
GET_FILENAME_COMPONENT(Y ${FFTW_INCLUDE_DIR} ABSOLUTE)
IF (NOT Y MATCHES ".*${X}.*")
INCLUDE_DIRECTORIES(SYSTEM ${FFTW_INCLUDE_DIR})
ENDIF()
......
658c658
< int tagIndex = (int) tag->length();
---
> size_t tagIndex = tag->length();
961c961
< int tagIndex = (int) tag->length();
---
> size_t tagIndex = tag->length();
--- tinyxml_old/tinyxmlparser.cpp 2017-10-03 16:05:35.999295200 +0100
+++ tinyxml/tinyxmlparser.cpp 2017-10-03 16:05:58.556565300 +0100
@@ -655,7 +655,7 @@
while ( in->good() )
{
- int tagIndex = (int) tag->length();
+ size_t tagIndex = tag->length();
while ( in->good() && in->peek() != '>' )
{
int c = in->get();
@@ -958,7 +958,7 @@
// We should be at a "<", regardless.
if ( !in->good() ) return;
assert( in->peek() == '<' );
- int tagIndex = (int) tag->length();
+ size_t tagIndex = tag->length();
bool closingTag = false;
bool firstCharFound = false;
......@@ -475,3 +475,34 @@ volume = {163},
year = {2016}
}
@article{rospjo16,
title={Eigensolution analysis of spectral/hp continuous Galerkin approximations to advection--diffusion problems: Insights into spectral vanishing viscosity},
author={Moura, RC and Sherwin, SJ and Peir{\'o}, Joaquim},
journal={Journal of Computational Physics},
volume={307},
pages={401--422},
year={2016},
publisher={Elsevier}
}
@article{yvsiouei93,
title={Legendre pseudospectral viscosity method for nonlinear conservation laws},
author={Maday, Yvon and Kaber, Sidi M Ould and Tadmor, Eitan},
journal={SIAM Journal on Numerical Analysis},
volume={30},
number={2},
pages={321--342},
year={1993},
publisher={SIAM}
}
@article{rosh06,
title={Stabilisation of spectral/hp element methods through spectral vanishing viscosity: Application to fluid mechanics modelling},
author={Kirby, Robert M and Sherwin, Spencer J},
journal={Computer methods in applied mechanics and engineering},
volume={195},
number={23},
pages={3128--3144},
year={2006},
publisher={Elsevier}
}
\ No newline at end of file
......@@ -830,7 +830,6 @@ the advection term using the pressure inverse mass matrix. It can be used just i
<I PROPERTY="SmoothAdvection" VALUE="True"/>
\end{lstlisting}
\item \inltt{SpectralVanishingViscosity}: activates a stabilization technique
which increases the viscosity on the modes with the highest frequencies.
\begin{lstlisting}[style=XMLStyle]
......@@ -839,7 +838,34 @@ which increases the viscosity on the modes with the highest frequencies.
In a Quasi-3D simulation, this will affect both the Fourier and the spectral/hp expansions.
To activate them independently, use \inltt{SpectralVanishingViscositySpectralHP}
and \inltt{SpectralVanishingViscosityHomo1D}.
and \inltt{SpectralVanishingViscosityHomo1D}. \\
There are three spectral vanishing viscosity kernels available:
\begin{center}
\footnotesize
\begin{tabular}{lcc}
\toprule
{SVV Kernel} & {\texttt{SpectralVanishingViscosity}} \\
\midrule
Exponential Kernel & \texttt{True} \\
Power Kernel & \texttt{PowerKernel} \\
DG Kernel & \texttt{DGKernel} \\
\bottomrule
\end{tabular}
\end{center}
The Exponential kernel is based on the work of Maday et al. \cite{yvsiouei93},
its extension to 2D can be found in \cite{rosh06}. A diffusion coefficient can
be specified which defines the base magnitude of the viscosity; this parameter
is scaled by $h/p$. SVV viscosity is activated for expansion modes greater than
the product of the cut-off ratio and the expansion order. The Power kernel is a
smooth function with no cut-off frequency; it focusses on a narrower band of
higher expansion modes as the polynomial order increases. The cut-off ratio
parameter for the Power kernel corresponds to the power ratio, see Moura et al.
\cite{rospjo16}. The DG-Kernel is an attempt to match the dissipation of CG-SVV
to DG schemes of lower expansion orders. This kernel does not require any parameters
although the diffusion coefficient can still be modified.
\item \inltt{DEALIASING}: activates the 3/2 padding rule on the advection term
of a Quasi-3D simulation.
......@@ -856,7 +882,6 @@ stabilize the simulation. This method is based on the work of Kirby and Sherwin
\end{itemize}
\subsection{Parameters}
The following parameters can be specified in the \inltt{PARAMETERS} section of
the session file:
......@@ -869,7 +894,7 @@ the session file:
\item \inltt{MinSubSteps}: perform a minimum number of substeps in sub-stepping algorithm (default is 1)
\item \inltt{MaxSubSteps}: perform a maxmimum number of substeps in sub-stepping algorithm otherwise exit (default is 100)
\item \inltt{SVVCutoffRatio}: sets the ratio of Fourier frequency not affected by the SVV technique (default value = 0.75, i.e. the first 75\% of frequency are not damped)
\item \inltt{SVVDiffCoeff}: sets the SVV diffusion coefficient (default value = 0.1)
\item \inltt{SVVDiffCoeff}: sets the SVV diffusion coefficient (default value = 0.1 (Exponential and Power kernel), 1 (DG-Kernel))
\end{itemize}
\subsection{Womersley Boundary Condition}
......
......@@ -214,6 +214,7 @@ openany, % A chapter may start on either a recto or verso page.
}
\lstset{%
escapeinside={(*}{*)},%
breaklines=true,
}
\usepackage{tikz}
......
......@@ -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;
......@@ -178,6 +180,7 @@ possibly also Reynolds stresses) into single file;
\item \inltt{scalargrad}: Computes scalar gradient field;
\item \inltt{scaleinputfld}: Rescale input field by a constant factor;
\item \inltt{shear}: Computes time-averaged shear stress metrics: TAWSS, OSI, transWSS, TAAFI, TACFI, WSSG;
\item \inltt{streamfunction}: Calculates stream function of a 2D incompressible flow.
\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.
......@@ -530,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
......@@ -543,7 +546,7 @@ In order to interpolate 1D data to a $n$D field, specify the matching coordinate
the output field using the \inltt{interpcoord} argument:
%
\begin{lstlisting}[style=BashInputStyle]
FieldConvert -m interppointdatatofld:frompts=1D-file1.pts:interppointdatatofld=1 \
FieldConvert -m interppointdatatofld:frompts=1D-file1.pts:interpcoord=1 \
3D-file1.xml 3D-file1.fld
\end{lstlisting}
%
......@@ -632,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}
%
%
%
......@@ -873,6 +910,26 @@ The argument \inltt{N} and \inltt{fromfld} are compulsory arguments that respect
The input \inltt{.fld} files are the outputs of the \textit{wss} module. If they do not contain the surface normals (an optional output of the \textit{wss} modle), then the \textit{shear} module will not compute the last metric, |WSSG|.
%
%
%
\subsection{Stream function of a 2D incompressible flow: \textit{streamfunction} module}
The streamfunction module calculates the stream function of a 2D incompressible flow, by
solving the Poisson equation
\[
\nabla^2 \psi = -\omega
\]
where $\omega$ is the vorticity. Note that this module applies the same boundary conditions
specified for the y-direction velocity component \inltt{v} to the stream function,
what may not be the most appropriate choice.
To use this module, the user can run
\begin{lstlisting}[style=BashInputStyle]
FieldConvert -m streamfunction test.xml test.fld test-streamfunc.fld
\end{lstlisting}
where the file \inltt{test-streamfunc.fld} can be processed in a similar
way as described in section \ref{s:utilities:fieldconvert:sub:convert}.
%
%
......
......@@ -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;
/**
......
......@@ -34,7 +34,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <Collections/CollectionOptimisation.h>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <LibUtilities/BasicUtils/ParseUtils.h>
using namespace std;
......@@ -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->second, -1)] = m_defaultType;
defaults [ElmtOrder(it2.second, -1)] = m_defaultType;
defaultsPhysDeriv [ElmtOrder(it2.second, -1)] = m_defaultType;
}
if (defaultType == eNoImpType)
{
for (it2 = elTypes.begin(); it2 != elTypes.end(); ++it2)
for (auto &it2 : elTypes)
{
// For 1<=N<=5 use StdMat otherwise IterPerExp or given default type
for (int i = 1; i < 5; ++i)
{
defaults[ElmtOrder(it2->second, i)] = eStdMat;
defaults[ElmtOrder(it2.second, i)] = eStdMat;
}
// For 1<=N<=3 use SumFac otherwise NoCollection. Note that
// default is not currently overwritten by given default
// type
defaultsPhysDeriv [ElmtOrder(it2->second, -1)] = eNoCollection;
defaultsPhysDeriv [ElmtOrder(it2.second, -1)] = eNoCollection;
for (int i = 1; i < 3; ++i)
{
defaultsPhysDeriv[ElmtOrder(it2->second, i)] = eSumFac;
defaultsPhysDeriv[ElmtOrder(it2.second, i)] = eSumFac;
}
}
}
......@@ -164,9 +161,9 @@ CollectionOptimisation::CollectionOptimisation(
defaults.clear();
// Override default types
for (it2 = elTypes.begin(); it2 != elTypes.end(); ++it2)
for (auto &it2 : elTypes)
{
defaults[ElmtOrder(it2->second, -1)] = m_defaultType;
defaults[ElmtOrder(it2.second, -1)] = m_defaultType;
}
for (i = 0;