Minimum changes to compile everything with gcc-4.3.0
This commit is contained in:
parent
f6107f4033
commit
0f687ccd76
Binary file not shown.
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
||||
<< "reactions" << cr.reactions() << ';' << endl;
|
||||
|
||||
OFstream thermoFile(FOAMThermodynamicsFileName);
|
||||
thermoFile<< cr.specieThermo() << endl;
|
||||
thermoFile<< cr.speciesThermo() << endl;
|
||||
|
||||
Info << "End\n" << endl;
|
||||
|
||||
|
@ -86,7 +86,14 @@ set WM_COMPILER_INST=OpenFOAM
|
||||
|
||||
switch ("$WM_COMPILER_INST")
|
||||
case OpenFOAM:
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc43:
|
||||
setenv WM_COMPILER_DIR $FOAM_INST_DIR/$WM_ARCH/gcc-4.3.0$WM_COMPILER_ARCH
|
||||
breaksw
|
||||
case Gcc:
|
||||
setenv WM_COMPILER_DIR $FOAM_INST_DIR/$WM_ARCH/gcc-4.2.2$WM_COMPILER_ARCH
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
# Check that the compiler directory can be found
|
||||
if ( ! -d "$WM_COMPILER_DIR" ) then
|
||||
|
@ -318,7 +318,8 @@ bool HashTable<T, Key, Hash>::erase(const iterator& cit)
|
||||
delete it.elmtPtr_;
|
||||
|
||||
// Search back for previous non-zero table entry
|
||||
while (--it.hashIndex_ >= 0 && !table_[it.hashIndex_]);
|
||||
while (--it.hashIndex_ >= 0 && !table_[it.hashIndex_])
|
||||
{}
|
||||
|
||||
if (it.hashIndex_ >= 0)
|
||||
{
|
||||
|
@ -220,7 +220,8 @@ HashTable<T, Key, Hash>::iterator::operator++()
|
||||
(
|
||||
++hashIndex_ < curHashTable_.tableSize_
|
||||
&& !(elmtPtr_ = curHashTable_.table_[hashIndex_])
|
||||
);
|
||||
)
|
||||
{}
|
||||
|
||||
if (hashIndex_ == curHashTable_.tableSize_)
|
||||
{
|
||||
@ -259,7 +260,8 @@ HashTable<T, Key, Hash>::begin()
|
||||
{
|
||||
label i = 0;
|
||||
|
||||
while (table_ && !table_[i] && ++i < tableSize_);
|
||||
while (table_ && !table_[i] && ++i < tableSize_)
|
||||
{}
|
||||
|
||||
if (i == tableSize_)
|
||||
{
|
||||
@ -396,7 +398,8 @@ HashTable<T, Key, Hash>::const_iterator::operator++()
|
||||
(
|
||||
++hashIndex_ < curHashTable_.tableSize_
|
||||
&& !(elmtPtr_ = curHashTable_.table_[hashIndex_])
|
||||
);
|
||||
)
|
||||
{}
|
||||
}
|
||||
|
||||
return *this;
|
||||
@ -430,7 +433,8 @@ HashTable<T, Key, Hash>::begin() const
|
||||
{
|
||||
label i = 0;
|
||||
|
||||
while (table_ && !table_[i] && ++i < tableSize_);
|
||||
while (table_ && !table_[i] && ++i < tableSize_)
|
||||
{}
|
||||
|
||||
if (i == tableSize_)
|
||||
{
|
||||
|
@ -34,6 +34,7 @@ License
|
||||
#include "JobInfo.H"
|
||||
#include "labelList.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -389,7 +390,8 @@ Foam::argList::argList
|
||||
rootPath_/globalCase_/"processor"
|
||||
+ name(++nProcDirs)
|
||||
)
|
||||
);
|
||||
)
|
||||
{}
|
||||
|
||||
if (nProcDirs != Pstream::nProcs())
|
||||
{
|
||||
|
@ -29,6 +29,7 @@ Description
|
||||
|
||||
#include <new>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
@ -64,7 +64,8 @@ Type interpolateXY
|
||||
label n = xOld.size();
|
||||
|
||||
label lo = 0;
|
||||
for (lo=0; lo<n && xOld[lo]>x; ++lo);
|
||||
for (lo=0; lo<n && xOld[lo]>x; ++lo)
|
||||
{}
|
||||
|
||||
label low = lo;
|
||||
if (low < n)
|
||||
@ -79,7 +80,8 @@ Type interpolateXY
|
||||
}
|
||||
|
||||
label hi = 0;
|
||||
for (hi=0; hi<n && xOld[hi]<x; ++hi);
|
||||
for (hi=0; hi<n && xOld[hi]<x; ++hi)
|
||||
{}
|
||||
|
||||
label high = hi;
|
||||
if (high < n)
|
||||
|
@ -397,7 +397,7 @@ inline pointHit triangle<Point, PointRef>::ray
|
||||
|
||||
bool eligible =
|
||||
alg == intersection::FULL_RAY
|
||||
|| alg == intersection::HALF_RAY && dist > -planarPointTol
|
||||
|| (alg == intersection::HALF_RAY && dist > -planarPointTol)
|
||||
|| (
|
||||
alg == intersection::VISIBLE
|
||||
&& ((q1 & normal()) < -VSMALL)
|
||||
|
@ -73,7 +73,8 @@ long long readLongLong(Istream& is)
|
||||
static const label zeroOffset = int('0');
|
||||
|
||||
// Get next non-whitespace character
|
||||
while (is.read(c) && isspace(c));
|
||||
while (is.read(c) && isspace(c))
|
||||
{}
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -49,6 +49,8 @@ SourceFiles
|
||||
#include "char.H"
|
||||
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -180,7 +180,7 @@ public:
|
||||
return meshInfo_;
|
||||
}
|
||||
|
||||
const label size() const
|
||||
label size() const
|
||||
{
|
||||
return IDLList<ParticleType>::size();
|
||||
};
|
||||
|
@ -1055,7 +1055,7 @@ pointIndexHit indexedOctree<Type>::findLine
|
||||
direction startBit = treeBb.posBits(start);
|
||||
direction endBit = treeBb.posBits(end);
|
||||
|
||||
if (startBit&endBit != 0)
|
||||
if ((startBit & endBit) != 0)
|
||||
{
|
||||
// Both start and end outside domain and in same block.
|
||||
return pointIndexHit(false, vector::zero, -1);
|
||||
|
@ -4,6 +4,7 @@
|
||||
# include <fstream>
|
||||
# include <cmath>
|
||||
# include <ctime>
|
||||
# include <cstring>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
virtual const speciesTable& species() const = 0;
|
||||
virtual const HashPtrTable<reactionThermo>& specieThermo() const = 0;
|
||||
virtual const HashPtrTable<reactionThermo>& speciesThermo() const = 0;
|
||||
virtual const SLPtrList<reaction>& reactions() const = 0;
|
||||
};
|
||||
|
||||
|
@ -607,15 +607,15 @@ bool finishReaction = false;
|
||||
|
||||
HashPtrTable<reactionThermo>::iterator specieThermoIter
|
||||
(
|
||||
specieThermo_.find(currentSpecieName)
|
||||
speciesThermo_.find(currentSpecieName)
|
||||
);
|
||||
|
||||
if (specieThermoIter != specieThermo_.end())
|
||||
if (specieThermoIter != speciesThermo_.end())
|
||||
{
|
||||
specieThermo_.erase(specieThermoIter);
|
||||
speciesThermo_.erase(specieThermoIter);
|
||||
}
|
||||
|
||||
specieThermo_.insert
|
||||
speciesThermo_.insert
|
||||
(
|
||||
currentSpecieName,
|
||||
new reactionThermo
|
||||
|
@ -182,7 +182,7 @@ void Foam::chemkinReader::addReactionType
|
||||
speciesTable_,
|
||||
lhs.shrink(),
|
||||
rhs.shrink(),
|
||||
specieThermo_
|
||||
speciesThermo_
|
||||
),
|
||||
rr
|
||||
)
|
||||
@ -201,7 +201,7 @@ void Foam::chemkinReader::addReactionType
|
||||
speciesTable_,
|
||||
lhs.shrink(),
|
||||
rhs.shrink(),
|
||||
specieThermo_
|
||||
speciesThermo_
|
||||
),
|
||||
rr
|
||||
)
|
||||
@ -500,7 +500,7 @@ void Foam::chemkinReader::addReaction
|
||||
speciesTable_,
|
||||
lhs.shrink(),
|
||||
rhs.shrink(),
|
||||
specieThermo_
|
||||
speciesThermo_
|
||||
),
|
||||
ArrheniusReactionRate
|
||||
(
|
||||
@ -553,7 +553,7 @@ void Foam::chemkinReader::addReaction
|
||||
speciesTable_,
|
||||
lhs.shrink(),
|
||||
rhs.shrink(),
|
||||
specieThermo_
|
||||
speciesThermo_
|
||||
),
|
||||
thirdBodyArrheniusReactionRate
|
||||
(
|
||||
@ -658,7 +658,7 @@ void Foam::chemkinReader::addReaction
|
||||
speciesTable_,
|
||||
lhs.shrink(),
|
||||
rhs.shrink(),
|
||||
specieThermo_
|
||||
speciesThermo_
|
||||
),
|
||||
LandauTellerReactionRate
|
||||
(
|
||||
@ -814,7 +814,8 @@ void Foam::chemkinReader::read
|
||||
yy_buffer_state* bufferPtr(yy_create_buffer(&thermoStream, yyBufSize));
|
||||
yy_switch_to_buffer(bufferPtr);
|
||||
|
||||
while(lex() != 0);
|
||||
while(lex() != 0)
|
||||
{}
|
||||
|
||||
yy_delete_buffer(bufferPtr);
|
||||
|
||||
@ -838,7 +839,8 @@ void Foam::chemkinReader::read
|
||||
|
||||
initReactionKeywordTable();
|
||||
|
||||
while(lex() != 0);
|
||||
while(lex() != 0)
|
||||
{}
|
||||
|
||||
yy_delete_buffer(bufferPtr);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ private:
|
||||
HashTable<phase> speciePhase_;
|
||||
|
||||
//- Table of the thermodynamic data given in the CHEMKIN file
|
||||
HashPtrTable<reactionThermo> specieThermo_;
|
||||
HashPtrTable<reactionThermo> speciesThermo_;
|
||||
|
||||
//- Table of species composition
|
||||
HashTable<List<specieElement> > specieComposition_;
|
||||
@ -363,9 +363,9 @@ public:
|
||||
}
|
||||
|
||||
//- Table of the thermodynamic data given in the CHEMKIN file
|
||||
const HashPtrTable<reactionThermo>& specieThermo() const
|
||||
const HashPtrTable<reactionThermo>& speciesThermo() const
|
||||
{
|
||||
return specieThermo_;
|
||||
return speciesThermo_;
|
||||
}
|
||||
|
||||
//- Table of species composition
|
||||
|
@ -45,12 +45,12 @@ Foam::foamChemistryReader::foamChemistryReader
|
||||
const fileName& thermoFileName
|
||||
)
|
||||
:
|
||||
specieThermo_(IFstream(thermoFileName)()),
|
||||
speciesThermo_(IFstream(thermoFileName)()),
|
||||
speciesTable_(dictionary(IFstream(reactionsFileName)()).lookup("species")),
|
||||
reactions_
|
||||
(
|
||||
dictionary(IFstream(reactionsFileName)()).lookup("reactions"),
|
||||
reaction::iNew(speciesTable_, specieThermo_)
|
||||
reaction::iNew(speciesTable_, speciesThermo_)
|
||||
)
|
||||
{}
|
||||
|
||||
@ -58,7 +58,7 @@ Foam::foamChemistryReader::foamChemistryReader
|
||||
// Construct from components
|
||||
Foam::foamChemistryReader::foamChemistryReader(const dictionary& thermoDict)
|
||||
:
|
||||
specieThermo_
|
||||
speciesThermo_
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
@ -84,7 +84,7 @@ Foam::foamChemistryReader::foamChemistryReader(const dictionary& thermoDict)
|
||||
fileName(thermoDict.lookup("foamChemistryFile")).expand()
|
||||
)()
|
||||
).lookup("reactions"),
|
||||
reaction::iNew(speciesTable_, specieThermo_)
|
||||
reaction::iNew(speciesTable_, speciesThermo_)
|
||||
)
|
||||
{}
|
||||
|
||||
|
@ -60,7 +60,7 @@ class foamChemistryReader
|
||||
public chemistryReader
|
||||
{
|
||||
//- Table of the thermodynamic data given in the foamChemistry file
|
||||
HashPtrTable<reactionThermo> specieThermo_;
|
||||
HashPtrTable<reactionThermo> speciesThermo_;
|
||||
|
||||
//- Table of species
|
||||
speciesTable speciesTable_;
|
||||
@ -113,9 +113,9 @@ public:
|
||||
}
|
||||
|
||||
//- Table of the thermodynamic data given in the foamChemistry file
|
||||
const HashPtrTable<reactionThermo>& specieThermo() const
|
||||
const HashPtrTable<reactionThermo>& speciesThermo() const
|
||||
{
|
||||
return specieThermo_;
|
||||
return speciesThermo_;
|
||||
}
|
||||
|
||||
//- List of the reactions
|
||||
|
@ -45,7 +45,7 @@ reactingMixture::reactingMixture
|
||||
(
|
||||
thermoDict,
|
||||
autoPtr<chemistryReader>::operator()().species(),
|
||||
autoPtr<chemistryReader>::operator()().specieThermo(),
|
||||
autoPtr<chemistryReader>::operator()().speciesThermo(),
|
||||
mesh
|
||||
),
|
||||
PtrList<chemistryReader::reaction>
|
||||
|
Loading…
Reference in New Issue
Block a user