blob: f9c3a518ffe792e6bd8a9238606e2768f8f4f641 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
------------------------------------------------------------------------
r31082 | whitlocb | 2017-06-16 00:19:15 +0200 (Fri, 16 Jun 2017) | 1 line
Fix for GCC 7
Index: databases/Vs/VsStaggeredField.C
===================================================================
--- databases/Vs/VsStaggeredField.C (revision 31081)
+++ databases/Vs/VsStaggeredField.C (revision 31082)
@@ -26,10 +26,13 @@
this->indexOrder = VsSchema::compMajorCKey;
this->centering = VsSchema::nodalCenteringKey;
+#if 0
+ // There is no clear method under GCC 7. What good would it do here anyway?
this->oriCellDims.clear();
this->oriCellDimProd.clear();
this->newCellDims.clear();
this->newCellDimProd.clear();
+#endif
}
template<class TYPE>
@@ -136,7 +139,7 @@
// iterate over subgrid
for (size_t subBigIndx = 0; subBigIndx < this->numNeighbors; ++subBigIndx) {
std::valarray<int> subCellInds = this->getSubCellIndexSet(subBigIndx);
- std::valarray<int> newCellInds = oriCellInds*this->numNeighbors + subCellInds;
+ std::valarray<int> newCellInds = oriCellInds*static_cast<TYPE>(this->numNeighbors) + subCellInds;
size_t newBigIndx = this->getNewBigIndex(newCellInds);
std::valarray<TYPE> xi = std::valarray<TYPE>(subCellInds) / this->twoPowSubRes;
this->setNewFieldVals(newBigIndx, xi, sigmaVals, neighVals, dataPtr);
@@ -147,7 +150,7 @@
template <class TYPE>
std::valarray<int>
VsStaggeredField<TYPE>::getOriCellIndexSet(size_t bigIndex) const {
- return (bigIndex / this->oriCellDimProd) % this->oriCellDims;
+ return (bigIndex / static_cast<TYPE>(this->oriCellDimProd)) % this->oriCellDims;
}
template <class TYPE>
------------------------------------------------------------------------
|