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

Merge branch 'fix/icc-warnings' into 'master'

Fix/icc warnings

See merge request !837
parents 0a82e8ac 429f230d
......@@ -69,6 +69,7 @@ v4.4.1
(!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:**
......
......@@ -87,39 +87,39 @@ namespace Nektar
}
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetRows() const
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetRows() const
{
return m_rows;
}
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetColumns() const
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetColumns() const
{
return m_cols;
}
/// number of rows at i-th submatrix
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetRows(int i) const
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetRows(int i) const
{
return m_submatrix[i]->GetRows();
}
/// number of columns at i-th submatrix
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetColumns(int i) const
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetColumns(int i) const
{
return m_submatrix[i]->GetColumns();
}
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetNumberOfMatrixBlocks() const
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetNumberOfMatrixBlocks() const
{
return m_submatrix.num_elements();
}
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetNumNonZeroEntries()
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetNumNonZeroEntries()
{
IndexType nnz = 0;
for (int i = 0; i < m_submatrix.num_elements(); i++)
......@@ -131,19 +131,19 @@ namespace Nektar
// nnz of i-th CSR matrix
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetNumNonZeroEntries(int i) const
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetNumNonZeroEntries(int i) const
{
return m_submatrix[i]->GetNumNonZeroEntries();
}
template<typename SparseStorageType>
const typename NekSparseDiagBlkMatrix<SparseStorageType>::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetFillInRatio(int i) const
typename NekSparseDiagBlkMatrix<SparseStorageType>::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetFillInRatio(int i) const
{
return m_submatrix[i]->GetFillInRatio();
}
template<typename SparseStorageType>
const typename NekSparseDiagBlkMatrix<SparseStorageType>::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetFillInRatio() const
typename NekSparseDiagBlkMatrix<SparseStorageType>::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetFillInRatio() const
{
IndexType stored = 0;
IndexType nnz = 0;
......@@ -221,7 +221,7 @@ namespace Nektar
}
template<typename SparseStorageType>
const size_t NekSparseDiagBlkMatrix<SparseStorageType>::GetMemoryFootprint()
size_t NekSparseDiagBlkMatrix<SparseStorageType>::GetMemoryFootprint()
{
size_t bytes =
sizeof(IndexType)*2 + // sizes
......@@ -241,7 +241,7 @@ namespace Nektar
}
template<typename SparseStorageType>
const size_t NekSparseDiagBlkMatrix<SparseStorageType>::GetMemoryFootprint(IndexType i) const
size_t NekSparseDiagBlkMatrix<SparseStorageType>::GetMemoryFootprint(IndexType i) const
{
return m_submatrix[i]->GetMemoryUsage(
m_submatrix[i]->GetNumNonZeroEntries(),
......@@ -250,13 +250,13 @@ namespace Nektar
}
template<typename SparseStorageType>
const unsigned long NekSparseDiagBlkMatrix<SparseStorageType>::GetMulCallsCounter() const
unsigned long NekSparseDiagBlkMatrix<SparseStorageType>::GetMulCallsCounter() const
{
return m_mulCallsCounter;
}
template<typename SparseStorageType>
const typename SparseStorageType::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetAvgRowDensity()
typename SparseStorageType::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetAvgRowDensity()
{
DataType avgRowDensity = 0.0;
for (int i = 0; i < m_submatrix.num_elements(); i++)
......@@ -268,14 +268,14 @@ namespace Nektar
}
template<typename SparseStorageType>
const typename SparseStorageType::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetAvgRowDensity(IndexType i) const
typename SparseStorageType::DataType NekSparseDiagBlkMatrix<SparseStorageType>::GetAvgRowDensity(IndexType i) const
{
return (DataType) m_submatrix[i]->GetNumNonZeroEntries() /
(DataType) m_submatrix[i]->GetRows();
}
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetBandwidth()
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetBandwidth()
{
IndexType bandwidth = 0;
for (int i = 0; i < m_submatrix.num_elements(); i++)
......@@ -291,7 +291,7 @@ namespace Nektar
}
template<typename SparseStorageType>
const IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetBandwidth(IndexType i)
IndexType NekSparseDiagBlkMatrix<SparseStorageType>::GetBandwidth(IndexType i)
{
IndexType bandwidth = 0;
typename SparseStorageType::const_iterator entry = m_submatrix[i]->begin();
......
......@@ -75,16 +75,16 @@ namespace Nektar
LIB_UTILITIES_EXPORT NekSparseDiagBlkMatrix(const NekSparseDiagBlkMatrix& src);
LIB_UTILITIES_EXPORT ~NekSparseDiagBlkMatrix();
LIB_UTILITIES_EXPORT const IndexType GetRows() const;
LIB_UTILITIES_EXPORT const IndexType GetColumns() const;
LIB_UTILITIES_EXPORT const IndexType GetNumNonZeroEntries();
LIB_UTILITIES_EXPORT const DataType GetFillInRatio() const;
LIB_UTILITIES_EXPORT IndexType GetRows() const;
LIB_UTILITIES_EXPORT IndexType GetColumns() const;
LIB_UTILITIES_EXPORT IndexType GetNumNonZeroEntries();
LIB_UTILITIES_EXPORT DataType GetFillInRatio() const;
LIB_UTILITIES_EXPORT const IndexType GetRows(int i) const;
LIB_UTILITIES_EXPORT const IndexType GetColumns(int i) const;
LIB_UTILITIES_EXPORT const IndexType GetNumberOfMatrixBlocks() const;
LIB_UTILITIES_EXPORT const IndexType GetNumNonZeroEntries(int i) const;
LIB_UTILITIES_EXPORT const DataType GetFillInRatio(int i) const;
LIB_UTILITIES_EXPORT IndexType GetRows(int i) const;
LIB_UTILITIES_EXPORT IndexType GetColumns(int i) const;
LIB_UTILITIES_EXPORT IndexType GetNumberOfMatrixBlocks() const;
LIB_UTILITIES_EXPORT IndexType GetNumNonZeroEntries(int i) const;
LIB_UTILITIES_EXPORT DataType GetFillInRatio(int i) const;
LIB_UTILITIES_EXPORT typename boost::call_traits<DataType>::const_reference
......@@ -103,14 +103,14 @@ namespace Nektar
DataType* in,
DataType* out);
LIB_UTILITIES_EXPORT const size_t GetMemoryFootprint();
LIB_UTILITIES_EXPORT const size_t GetMemoryFootprint(IndexType i) const;
LIB_UTILITIES_EXPORT size_t GetMemoryFootprint();
LIB_UTILITIES_EXPORT size_t GetMemoryFootprint(IndexType i) const;
LIB_UTILITIES_EXPORT const unsigned long GetMulCallsCounter() const;
LIB_UTILITIES_EXPORT const DataType GetAvgRowDensity();
LIB_UTILITIES_EXPORT const DataType GetAvgRowDensity(IndexType i) const;
LIB_UTILITIES_EXPORT const IndexType GetBandwidth();
LIB_UTILITIES_EXPORT const IndexType GetBandwidth(IndexType i);
LIB_UTILITIES_EXPORT unsigned long GetMulCallsCounter() const;
LIB_UTILITIES_EXPORT DataType GetAvgRowDensity();
LIB_UTILITIES_EXPORT DataType GetAvgRowDensity(IndexType i) const;
LIB_UTILITIES_EXPORT IndexType GetBandwidth();
LIB_UTILITIES_EXPORT IndexType GetBandwidth(IndexType i);
LIB_UTILITIES_EXPORT COOMatTypeSharedPtr GetCooStorage();
LIB_UTILITIES_EXPORT COOMatTypeSharedPtr GetCooStorage(IndexType i);
......
......@@ -177,13 +177,13 @@ namespace Nektar
}
template<typename DataType>
const bool StorageSmvBsr<DataType>::const_iterator::operator==(const const_iterator& rhs)
bool StorageSmvBsr<DataType>::const_iterator::operator==(const const_iterator& rhs)
{
return m_iter.nnzindex == rhs.m_iter.nnzindex;
}
template<typename DataType>
const bool StorageSmvBsr<DataType>::const_iterator::operator!=(const const_iterator& rhs)
bool StorageSmvBsr<DataType>::const_iterator::operator!=(const const_iterator& rhs)
{
return !(m_iter.nnzindex == rhs.m_iter.nnzindex);
}
......@@ -265,45 +265,45 @@ namespace Nektar
template<typename DataType>
const IndexType StorageSmvBsr<DataType>::GetRows() const
IndexType StorageSmvBsr<DataType>::GetRows() const
{
return m_blkRows*m_blkDim;
}
template<typename DataType>
const IndexType StorageSmvBsr<DataType>::GetColumns() const
IndexType StorageSmvBsr<DataType>::GetColumns() const
{
return m_blkCols*m_blkDim;
}
template<typename DataType>
const IndexType StorageSmvBsr<DataType>::GetNumNonZeroEntries() const
IndexType StorageSmvBsr<DataType>::GetNumNonZeroEntries() const
{
return m_nnz;
}
template<typename DataType>
const IndexType StorageSmvBsr<DataType>::GetBlkSize() const
IndexType StorageSmvBsr<DataType>::GetBlkSize() const
{
return m_blkDim;
}
template<typename DataType>
const IndexType StorageSmvBsr<DataType>::GetNumStoredDoubles() const
IndexType StorageSmvBsr<DataType>::GetNumStoredDoubles() const
{
return m_bnnz*m_blkDim*m_blkDim;
}
template<typename DataType>
const DataType StorageSmvBsr<DataType>::GetFillInRatio() const
DataType StorageSmvBsr<DataType>::GetFillInRatio() const
{
return (DataType)(m_bnnz*m_blkDim*m_blkDim)/(DataType)m_nnz;
}
template<typename DataType>
const size_t StorageSmvBsr<DataType>::GetMemoryUsage(IndexType nnz, IndexType nRows) const
size_t StorageSmvBsr<DataType>::GetMemoryUsage(IndexType nnz, IndexType nRows) const
{
return sizeof(DataType) *m_val.capacity() +
sizeof(IndexType)*m_indx.capacity() +
......
......@@ -101,8 +101,8 @@ namespace Nektar
const_iterator& operator++();
const IterType& operator*();
const IterType* operator->();
const bool operator==(const const_iterator& rhs);
const bool operator!=(const const_iterator& rhs);
bool operator==(const const_iterator& rhs);
bool operator!=(const const_iterator& rhs);
// one way conversion: iterator -> const_iterator
// operator const_iterator<T const, Tag>() const;
......@@ -135,13 +135,13 @@ namespace Nektar
LIB_UTILITIES_EXPORT ~StorageSmvBsr();
LIB_UTILITIES_EXPORT const IndexType GetRows() const;
LIB_UTILITIES_EXPORT const IndexType GetColumns() const;
LIB_UTILITIES_EXPORT const IndexType GetNumNonZeroEntries() const;
LIB_UTILITIES_EXPORT const IndexType GetNumStoredDoubles() const;
LIB_UTILITIES_EXPORT const IndexType GetBlkSize() const;
LIB_UTILITIES_EXPORT const DataType GetFillInRatio() const;
LIB_UTILITIES_EXPORT const size_t GetMemoryUsage(IndexType nnz, IndexType nRows) const;
LIB_UTILITIES_EXPORT IndexType GetRows() const;
LIB_UTILITIES_EXPORT IndexType GetColumns() const;
LIB_UTILITIES_EXPORT IndexType GetNumNonZeroEntries() const;
LIB_UTILITIES_EXPORT IndexType GetNumStoredDoubles() const;
LIB_UTILITIES_EXPORT IndexType GetBlkSize() const;
LIB_UTILITIES_EXPORT DataType GetFillInRatio() const;
LIB_UTILITIES_EXPORT size_t GetMemoryUsage(IndexType nnz, IndexType nRows) const;
LIB_UTILITIES_EXPORT const_iterator begin() const;
LIB_UTILITIES_EXPORT const_iterator end() const;
......
......@@ -1058,7 +1058,7 @@ namespace Polylib {
for (i = 0; i < np; i++)
for (i = 0; i < np; i++) {
for (j = 0; j < np; j++){
......@@ -1084,7 +1084,9 @@ namespace Polylib {
}
free(pd);
}
free(pd);
}
......@@ -1158,7 +1160,7 @@ namespace Polylib {
for (i = 0; i < np; i++)
for (i = 0; i < np; i++) {
for (j = 0; j < np; j++){
......@@ -1184,7 +1186,9 @@ namespace Polylib {
}
free(pd);
}
free(pd);
}
......@@ -1260,7 +1264,7 @@ namespace Polylib {
for (i = 0; i < np; i++)
for (i = 0; i < np; i++) {
for (j = 0; j < np; j++){
......@@ -1288,7 +1292,9 @@ namespace Polylib {
}
free(pd);
}
free(pd);
}
......
......@@ -75,7 +75,9 @@ namespace Nektar
const int nHomDofs = pNumRows - pNumDir;
DNekVec Vin (nHomDofs, pInput + pNumDir);
DNekVec Vout(nHomDofs, pOutput + pNumDir, eWrapper);
Array<OneD, NekDouble> tmp = pOutput + pNumDir;
DNekVec Vout(nHomDofs, tmp, eWrapper);
m_linSys->Solve(Vin, Vout);
}
......
......@@ -174,13 +174,13 @@ namespace Nektar
m_mulCallsCounter++;
}
const unsigned long GlobalMatrix::GetMulCallsCounter() const
unsigned long GlobalMatrix::GetMulCallsCounter() const
{
if (m_smvbsrmatrix) return m_smvbsrmatrix->GetMulCallsCounter();
return -1;
}
const unsigned int GlobalMatrix::GetNumNonZeroEntries() const
unsigned int GlobalMatrix::GetNumNonZeroEntries() const
{
if (m_smvbsrmatrix) return m_smvbsrmatrix->GetNumNonZeroEntries();
return -1;
......
......@@ -66,8 +66,8 @@ namespace Nektar
const Array<OneD,const NekDouble> &in,
Array<OneD, NekDouble> &out);
MULTI_REGIONS_EXPORT const unsigned long GetMulCallsCounter() const;
MULTI_REGIONS_EXPORT const unsigned int GetNumNonZeroEntries() const;
MULTI_REGIONS_EXPORT unsigned long GetMulCallsCounter() const;
MULTI_REGIONS_EXPORT unsigned int GetNumNonZeroEntries() const;
private:
/// Pointer to a double-precision Nektar++ sparse matrix.
......
......@@ -1005,8 +1005,8 @@ namespace Nektar
int nLocBndDofs = m_locToGloMap->GetNumLocalBndCoeffs();
//Non-dirichlet boundary dofs
NekVector<NekDouble> F_HomBnd(nGlobHomBndDofs,pInOut+offset,
eWrapper);
Array<OneD, NekDouble> tmpOffset = pInOut + offset;
NekVector<NekDouble> F_HomBnd(nGlobHomBndDofs, tmpOffset, eWrapper);
//Block transformation matrix
DNekScalBlkMat &R = *m_RBlk;
......@@ -1101,8 +1101,8 @@ namespace Nektar
//Block transposed transformation matrix
DNekScalBlkMat &RT = *m_RTBlk;
NekVector<NekDouble> V_GlobHomBnd(nGlobHomBndDofs,pInOut+nDirBndDofs,
eWrapper);
Array<OneD, NekDouble> tmpOffset = pInOut + nDirBndDofs;
NekVector<NekDouble> V_GlobHomBnd(nGlobHomBndDofs, tmpOffset, eWrapper);
Array<OneD, NekDouble> pLocal(nLocBndDofs, 0.0);
NekVector<NekDouble> V_LocBnd(nLocBndDofs,pLocal,eWrapper);
......
......@@ -219,14 +219,15 @@ void IterativeElasticSystem::WriteGeometry(const int i)
{
s << "_xml";
if(!fs::is_directory(s.str()))
string ss = s.str();
if(!fs::is_directory(ss))
{
fs::create_directory(s.str());
fs::create_directory(ss);
}
boost::format pad("P%1$07d.xml");
pad % m_session->GetComm()->GetRank();
filename = fs::path(s.str()) / fs::path(pad.str());
filename = fs::path(ss) / fs::path(pad.str());
}
else
{
......
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