Commit a599d84e authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

Merge branch 'master' into feature/FC-boolparams

# Conflicts:
#	CHANGELOG.md
parents f3d4bcc9 fc1ded97
......@@ -12,16 +12,26 @@ 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)
- 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)
- Remove StdExpansion use from MultiRegion (use Expansions instead). (!831)
- 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)
- Added support for using the distance to a specific region (e.g. outlet) in the
function definitions for the Absorption Forcing (!769)
**NekMesh**:
- Add feature to read basic 2D geo files as CAD (!731)
- Add periodic boundary condition meshing in 2D (!733)
- Adjust boundary layer thickness in corners in 2D (!739)
- Add non-O BL meshing in 2D (!757)
- Add ability to compile CCIO library but tar file is not yet openly
- Add ability to compile CCIO library but tar file is not yet openly
available whist we seek permission from Simens (!799)
- Fix issue with reading CCM files due to definition of default arrays
- 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)
......@@ -31,29 +41,16 @@ v5.0.0
- Fixed interppoints module (!760)
- Move StreamFunction utility to a FieldConvert module (!809)
- Allow explicitly setting bool options of FieldConvert modules as false (!811)
- Enable output to multiple files (!844)
- Allow using xml file without expansion tag in FieldConvert (!849)
**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**
- Remove m_offset_elmt_id and GetOffsetElmtId which fixed problems in 2D when
- Remove m_offset_elmt_id and GetOffsetElmtId which fixed problems in 2D when
quad elements are listed before tri elements (!758)
- Remove the duplicate output of errorutil (!756)
- Fix BLAS CMake dependencies (!763)
......@@ -67,6 +64,14 @@ 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)
- Fix Intel compiler warnings (!837)
- Fix overwriting and backup of chk/fld files on slow file systes (!741)
**FieldConvert:**
- Fix issue with field ordering in the interppointdatatofld module (!754)
......@@ -82,10 +87,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 )
......
......@@ -20,30 +20,57 @@ ELSE()
SET(BUILD_TINYXML ON)
ENDIF ()
OPTION(THIRDPARTY_BUILD_TINYXML
OPTION(THIRDPARTY_BUILD_TINYXML
"Build TinyXML library from ThirdParty." ${BUILD_TINYXML})
IF (THIRDPARTY_BUILD_TINYXML)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
tinyxml-2.6.2
PREFIX ${TPSRC}
URL ${TPURL}/tinyxml_2_6_2.tar.bz2
URL_MD5 240beaeb45f63b154c9801eef7561eac
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/tinyxml-2.6.2
BINARY_DIR ${TPBUILD}/tinyxml-2.6.2
TMP_DIR ${TPBUILD}/tinyxml-2.6.2-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/tinyxml-2.6.2
)
find_program(HAS_PATCH patch)
IF(HAS_PATCH)
EXTERNALPROJECT_ADD(
tinyxml-2.6.2
PREFIX ${TPSRC}
URL ${TPURL}/tinyxml_2_6_2.tar.bz2
URL_MD5 240beaeb45f63b154c9801eef7561eac
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/tinyxml-2.6.2
BINARY_DIR ${TPBUILD}/tinyxml-2.6.2
TMP_DIR ${TPBUILD}/tinyxml-2.6.2-tmp
INSTALL_DIR ${TPDIST}
PATCH_COMMAND patch -d ${TPSRC}/tinyxml-2.6.2 < ${CMAKE_SOURCE_DIR}/cmake/scripts/tinyxml.patch
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/tinyxml-2.6.2
)
ELSE()
MESSAGE(STATUS "patch utility not found, cannot apply patch to tinyxml, Nektar++ will still function")
EXTERNALPROJECT_ADD(
tinyxml-2.6.2
PREFIX ${TPSRC}
URL ${TPURL}/tinyxml_2_6_2.tar.bz2
URL_MD5 240beaeb45f63b154c9801eef7561eac
STAMP_DIR ${TPBUILD}/stamp
DOWNLOAD_DIR ${TPSRC}
SOURCE_DIR ${TPSRC}/tinyxml-2.6.2
BINARY_DIR ${TPBUILD}/tinyxml-2.6.2
TMP_DIR ${TPBUILD}/tinyxml-2.6.2-tmp
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/tinyxml-2.6.2
)
ENDIF()
THIRDPARTY_LIBRARY(TINYXML_LIBRARY STATIC tinyxml
DESCRIPTION "TinyXML library")
......
--- tinyxmlparser.cpp 2017-10-03 16:05:35.999295200 +0100
+++ 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;
......@@ -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}
%
%
%
......
......@@ -24,9 +24,17 @@ This force type allows the user to apply an absorption layer (essentially a poro
<COEFF> [FUNCTION NAME] <COEFF/>
<REFFLOW> [FUNCTION NAME] <REFFLOW/>
<REFFLOWTIME> [FUNCTION NAME] <REFFLOWTIME/>
<BOUNDARYREGIONS> 1,4 <BOUNDARYREGIONS/>
</FORCE>
\end{lstlisting}
If a list of \inltt{BOUNDARYREGIONS} is specified, the distance to these regions is available as additional variable \inltt{r} in the definition of the \inltt{COEFF} function:
\begin{lstlisting}[style=XMLStyle]
<FUNCTION NAME="AbsorptionCoefficient">
<E VAR="p" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
<E VAR="u" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
<E VAR="v" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
</FUNCTION>
\end{lstlisting}
\subsection{Body}
This force type specifies the name of a body forcing function expressed in the \inltt{CONDITIONS} section.
......
......@@ -36,6 +36,8 @@
#include <SpatialDomains/GeomFactors.h>
#include <Collections/CoalescedGeomData.h>
#include <LocalRegions/Expansion.h>
using namespace std;
namespace Nektar {
......@@ -73,11 +75,12 @@ const Array<OneD, const NekDouble> &CoalescedGeomData::GetJac(
int cnt = 0;
for(int i = 0; i < nElmts; ++i)
{
const Array<OneD, const NekDouble> jac =
pCollExp[i]->GetMetricInfo()->GetJac(ptsKeys);
const StdRegions::StdExpansion * sep = &(*pCollExp[i]);
const LocalRegions::Expansion * lep = dynamic_cast<const LocalRegions::Expansion*>( sep );
const Array<OneD, const NekDouble> jac = lep->GetMetricInfo()->GetJac( ptsKeys );
if (pCollExp[i]->GetMetricInfo()->GetGtype() ==
SpatialDomains::eDeformed)
if( lep->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed )
{
Vmath::Vcopy(npts, &jac[0], 1, &newjac[cnt], 1);
}
......@@ -119,11 +122,12 @@ const Array<OneD, const NekDouble> &CoalescedGeomData::GetJacWithStdWeights(
int cnt = 0;
for(int i = 0; i < nElmts; ++i)
{
const Array<OneD, const NekDouble> jac =
pCollExp[i]->GetMetricInfo()->GetJac(ptsKeys);
const StdRegions::StdExpansion * sep = &(*pCollExp[i]);
const LocalRegions::Expansion * lep = dynamic_cast<const LocalRegions::Expansion*>( sep );
const Array<OneD, const NekDouble> jac = lep->GetMetricInfo()->GetJac(ptsKeys);
if (pCollExp[i]->GetMetricInfo()->GetGtype() ==
SpatialDomains::eDeformed)
if( lep->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed )
{
Vmath::Vcopy(npts, &jac[0], 1, &newjac[cnt], 1);
}
......@@ -169,11 +173,12 @@ const Array<TwoD, const NekDouble> &CoalescedGeomData::GetDerivFactors(
int cnt = 0;
for(int i = 0; i < nElmts; ++i)
{
const Array<TwoD, const NekDouble> Dfac =
pCollExp[i]->GetMetricInfo()->GetDerivFactors(ptsKeys);
const StdRegions::StdExpansion * sep = &(*pCollExp[i]);
const LocalRegions::Expansion * lep = dynamic_cast<const LocalRegions::Expansion*>( sep );
const Array<TwoD, const NekDouble> Dfac = lep->GetMetricInfo()->GetDerivFactors( ptsKeys );
if (pCollExp[i]->GetMetricInfo()->GetGtype() ==
SpatialDomains::eDeformed)
if( lep->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed)
{
for (int j = 0; j < dim*coordim; ++j)
{
......
......@@ -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; i < SIZE_OperatorType; ++i)
......@@ -210,7 +207,7 @@ CollectionOptimisation::CollectionOptimisation(
ASSERTL0(attr, "Missing TYPE in ELEMENT tag.");
string elType(attr);
it2 = elTypes.find(elType);
auto it2 = elTypes.find(elType);
ASSERTL0(it2 != elTypes.end(),
"Unknown element type "+elType+" in ELEMENT "
"tag");
......@@ -233,7 +230,7 @@ CollectionOptimisation::CollectionOptimisation(
else
{
vector<unsigned int> orders;
ParseUtils::GenerateSeqVector(order.c_str(), orders);
ParseUtils::GenerateSeqVector(order, orders);
for (int i = 0; i < orders.size(); ++i)
{
......@@ -260,21 +257,17 @@ CollectionOptimisation::CollectionOptimisation(
if (m_setByXml)
{
map<OperatorType