Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
henry
2010-04-19 12:05:40 +01:00
277 changed files with 1742 additions and 700 deletions

View File

@ -1,25 +1,25 @@
XiModels/XiModel/XiModel.C XiModels/XiModel/XiModel.C
XiModels/XiModel/newXiModel.C XiModels/XiModel/XiModelNew.C
XiModels/fixed/fixed.C XiModels/fixed/fixed.C
XiModels/algebraic/algebraic.C XiModels/algebraic/algebraic.C
XiModels/transport/transport.C XiModels/transport/transport.C
XiModels/XiEqModels/XiEqModel/XiEqModel.C XiModels/XiEqModels/XiEqModel/XiEqModel.C
XiModels/XiEqModels/XiEqModel/newXiEqModel.C XiModels/XiEqModels/XiEqModel/XiEqModelNew.C
XiModels/XiEqModels/Gulder/Gulder.C XiModels/XiEqModels/Gulder/Gulder.C
XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C
XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C
XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C
XiModels/XiGModels/XiGModel/XiGModel.C XiModels/XiGModels/XiGModel/XiGModel.C
XiModels/XiGModels/XiGModel/newXiGModel.C XiModels/XiGModels/XiGModel/XiGModelNew.C
XiModels/XiGModels/KTS/KTS.C XiModels/XiGModels/KTS/KTS.C
XiModels/XiGModels/instabilityG/instabilityG.C XiModels/XiGModels/instabilityG/instabilityG.C
PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
PDRModels/dragModels/PDRDragModel/PDRDragModel.C PDRModels/dragModels/PDRDragModel/PDRDragModel.C
PDRModels/dragModels/PDRDragModel/newPDRDragModel.C PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C
PDRModels/dragModels/basic/basic.C PDRModels/dragModels/basic/basic.C
PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C

View File

@ -1,5 +1,5 @@
combustionModel/combustionModel.C combustionModel/combustionModel.C
combustionModel/newCombustionModel.C combustionModel/combustionModelNew.C
infinitelyFastChemistry/infinitelyFastChemistry.C infinitelyFastChemistry/infinitelyFastChemistry.C

View File

@ -1,6 +1,6 @@
interPhaseChangeFoam.C interPhaseChangeFoam.C
phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C
phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C
phaseChangeTwoPhaseMixtures/Kunz/Kunz.C phaseChangeTwoPhaseMixtures/Kunz/Kunz.C
phaseChangeTwoPhaseMixtures/Merkle/Merkle.C phaseChangeTwoPhaseMixtures/Merkle/Merkle.C
phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C

View File

@ -28,7 +28,7 @@ Description
SourceFiles SourceFiles
phaseChangeTwoPhaseMixture.C phaseChangeTwoPhaseMixture.C
newPhaseChangeModel.C phaseChangeModelNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -50,7 +50,7 @@ Istream& operator>>
alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
) )
{ {
is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_; is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
return is; return is;
} }

View File

@ -1,5 +1,5 @@
dragModels/dragModel/dragModel.C dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C dragModels/dragModel/dragModelNew.C
dragModels/Ergun/Ergun.C dragModels/Ergun/Ergun.C
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C

View File

@ -28,7 +28,7 @@ Description
SourceFiles SourceFiles
dragModel.C dragModel.C
newDragModel.C dragModelNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -1,32 +1,32 @@
kineticTheoryModel/kineticTheoryModel.C kineticTheoryModel/kineticTheoryModel.C
viscosityModel/viscosityModel/viscosityModel.C viscosityModel/viscosityModel/viscosityModel.C
viscosityModel/viscosityModel/newViscosityModel.C viscosityModel/viscosityModel/viscosityModelNew.C
viscosityModel/Gidaspow/GidaspowViscosity.C viscosityModel/Gidaspow/GidaspowViscosity.C
viscosityModel/Syamlal/SyamlalViscosity.C viscosityModel/Syamlal/SyamlalViscosity.C
viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C
viscosityModel/none/noneViscosity.C viscosityModel/none/noneViscosity.C
conductivityModel/conductivityModel/conductivityModel.C conductivityModel/conductivityModel/conductivityModel.C
conductivityModel/conductivityModel/newConductivityModel.C conductivityModel/conductivityModel/conductivityModelNew.C
conductivityModel/Gidaspow/GidaspowConductivity.C conductivityModel/Gidaspow/GidaspowConductivity.C
conductivityModel/Syamlal/SyamlalConductivity.C conductivityModel/Syamlal/SyamlalConductivity.C
conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
radialModel/radialModel/radialModel.C radialModel/radialModel/radialModel.C
radialModel/radialModel/newRadialModel.C radialModel/radialModel/radialModelNew.C
radialModel/CarnahanStarling/CarnahanStarlingRadial.C radialModel/CarnahanStarling/CarnahanStarlingRadial.C
radialModel/Gidaspow/GidaspowRadial.C radialModel/Gidaspow/GidaspowRadial.C
radialModel/LunSavage/LunSavageRadial.C radialModel/LunSavage/LunSavageRadial.C
radialModel/SinclairJackson/SinclairJacksonRadial.C radialModel/SinclairJackson/SinclairJacksonRadial.C
granularPressureModel/granularPressureModel/granularPressureModel.C granularPressureModel/granularPressureModel/granularPressureModel.C
granularPressureModel/granularPressureModel/newGranularPressureModel.C granularPressureModel/granularPressureModel/granularPressureModelNew.C
granularPressureModel/Lun/LunPressure.C granularPressureModel/Lun/LunPressure.C
granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C
frictionalStressModel/frictionalStressModel/frictionalStressModel.C frictionalStressModel/frictionalStressModel/frictionalStressModel.C
frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C
frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C
frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C

View File

@ -59,7 +59,7 @@ public:
friend Ostream& operator<<(Ostream& os, const ent& e) friend Ostream& operator<<(Ostream& os, const ent& e)
{ {
os << e.keyword_ << ' ' << e.i_ << endl; os << e.keyword_ << ' ' << e.i_ << endl;
return os; return os;
} }
}; };
@ -88,7 +88,7 @@ public:
friend Ostream& operator<<(Ostream& os, const Scalar& val) friend Ostream& operator<<(Ostream& os, const Scalar& val)
{ {
os << val.data_; os << val.data_;
return os; return os;
} }
}; };

View File

@ -38,7 +38,7 @@ public:
friend std::ostream& operator<<(std::ostream& os, const Vector<C>& v) friend std::ostream& operator<<(std::ostream& os, const Vector<C>& v)
{ {
os << v.X << '\t' << v.Y << '\n'; os << v.X << '\t' << v.Y << '\n';
return os; return os;
} }
}; };

View File

@ -89,7 +89,7 @@ int main()
{ {
OStringStream os; OStringStream os;
os << table1; os << table1;
HASHTABLE_CLASS<double> readTable(IStringStream(os.str())(), 100); HASHTABLE_CLASS<double> readTable(IStringStream(os.str())(), 100);
Info<< "Istream constructor:" << readTable << endl; Info<< "Istream constructor:" << readTable << endl;

View File

@ -54,7 +54,7 @@ public:
friend Ostream& operator<<(Ostream& os, const Scalar& s) friend Ostream& operator<<(Ostream& os, const Scalar& s)
{ {
os << s.data_; os << s.data_;
return os; return os;
} }

View File

@ -60,7 +60,7 @@ public:
friend Ostream& operator<<(Ostream& os, const Scalar& val) friend Ostream& operator<<(Ostream& os, const Scalar& val)
{ {
os << val.data_; os << val.data_;
return os; return os;
} }
}; };

View File

@ -83,7 +83,7 @@ int main()
{ {
OStringStream os; OStringStream os;
os << table1; os << table1;
HASHTABLE_CLASS<double> readTable(IStringStream(os.str())(), 100); HASHTABLE_CLASS<double> readTable(IStringStream(os.str())(), 100);
Info<< "Istream constructor:" << readTable << endl; Info<< "Istream constructor:" << readTable << endl;

View File

@ -56,7 +56,7 @@ public:
friend Ostream& operator<<(Ostream& os, const ent& e) friend Ostream& operator<<(Ostream& os, const ent& e)
{ {
os << e.keyword_ << ' ' << e.i_ << endl; os << e.keyword_ << ' ' << e.i_ << endl;
return os; return os;
} }
}; };

View File

@ -176,8 +176,7 @@ int main(int argc, char *argv[])
forAll(patchField, patchFaceI) forAll(patchField, patchFaceI)
{ {
label meshFaceI = const label meshFaceI = patchField.patch().start() + patchFaceI;
patchField.patch().patch().start() + patchFaceI;
scalar dist = faceInfo[meshFaceI].distSqr(); scalar dist = faceInfo[meshFaceI].distSqr();
if (faceInfo[meshFaceI].valid()) if (faceInfo[meshFaceI].valid())

View File

@ -47,8 +47,7 @@ void writeObj(Ostream& os,const pointField& points)
{ {
const point& pt = points[pointI]; const point& pt = points[pointI];
os << "v " << pt.x() << ' ' << pt.y() os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
<< ' ' << pt.z() << endl;
} }
} }

View File

@ -92,14 +92,14 @@ int main(int argc, char * argv[])
{ {
OSHA1stream os; OSHA1stream os;
os << str; os << str;
Info<< os.digest() << endl; Info<< os.digest() << endl;
os << str; os << str;
Info<< os.digest() << endl; Info<< os.digest() << endl;
os.rewind(); os.rewind();
os << "The quick brown fox jumps over the lazy dog"; os << "The quick brown fox jumps over the lazy dog";
Info<< os.digest() << endl; Info<< os.digest() << endl;
} }

View File

@ -110,9 +110,9 @@ const labelListListList& block::boundaryPatches() const
Ostream& operator<<(Ostream& os, const block& b) Ostream& operator<<(Ostream& os, const block& b)
{ {
os << b.Vertices << nl os << b.Vertices << nl
<< b.Cells << nl << b.Cells << nl
<< b.BoundaryPatches << endl; << b.BoundaryPatches << endl;
return os; return os;
} }

View File

@ -57,7 +57,7 @@ void hexBlock::readPoints(Istream& is)
{ {
forAll(points_, i) forAll(points_, i)
{ {
is >> points_[i].x() >> points_[i].y() >> points_[i].z(); is >> points_[i].x() >> points_[i].y() >> points_[i].z();
} }
// Calculate the handedness of the block // Calculate the handedness of the block

View File

@ -128,13 +128,13 @@ void hexBlock::readPoints
Info<< "Reading " << nPoints << " x coordinates..." << endl; Info<< "Reading " << nPoints << " x coordinates..." << endl;
for (label i=0; i < nPoints; i++) for (label i=0; i < nPoints; i++)
{ {
is >> points_[i].x(); is >> points_[i].x();
} }
Info<< "Reading " << nPoints << " y coordinates..." << endl; Info<< "Reading " << nPoints << " y coordinates..." << endl;
for (label i=0; i < nPoints; i++) for (label i=0; i < nPoints; i++)
{ {
is >> points_[i].y(); is >> points_[i].y();
} }
if (twoDThicknes > 0) if (twoDThicknes > 0)
@ -156,7 +156,7 @@ void hexBlock::readPoints
Info<< "Reading " << nPoints << " z coordinates..." << endl; Info<< "Reading " << nPoints << " z coordinates..." << endl;
for (label i=0; i < nPoints; i++) for (label i=0; i < nPoints; i++)
{ {
is >> points_[i].z(); is >> points_[i].z();
} }
} }
@ -166,7 +166,7 @@ void hexBlock::readPoints
Info<< "Reading " << nPoints << " blanks..." << endl; Info<< "Reading " << nPoints << " blanks..." << endl;
for (label i=0; i < nPoints; i++) for (label i=0; i < nPoints; i++)
{ {
is >> iBlank; is >> iBlank;
} }
} }

View File

@ -51,7 +51,7 @@ using namespace Foam;
void writeOBJ(const point& pt, Ostream& os) void writeOBJ(const point& pt, Ostream& os)
{ {
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << nl; os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << nl;
} }
// All edges of mesh // All edges of mesh

View File

@ -1,5 +1,5 @@
extrudeModel/extrudeModel.C extrudeModel/extrudeModel.C
extrudeModel/newExtrudeModel.C extrudeModel/extrudeModelNew.C
linearNormal/linearNormal.C linearNormal/linearNormal.C
linearDirection/linearDirection.C linearDirection/linearDirection.C
linearRadial/linearRadial.C linearRadial/linearRadial.C

View File

@ -58,7 +58,7 @@ Foam::Ostream& Foam::operator<<
if (faceI != -1) if (faceI != -1)
{ {
os<< " fc:" << c.patch_.localFaces()[faceI].centre(pts); os << " fc:" << c.patch_.localFaces()[faceI].centre(pts);
} }
return os; return os;
} }

View File

@ -974,7 +974,7 @@ int main(int argc, char *argv[])
IStringStream is(rawLine + ' '); IStringStream is(rawLine + ' ');
// Type: cellSet, faceSet, pointSet, faceZoneSet // Type: cellSet, faceSet, pointSet, faceZoneSet
is >> setType; is >> setType;
stat = parseType(runTime, mesh, setType, is); stat = parseType(runTime, mesh, setType, is);

View File

@ -85,20 +85,20 @@ void Foam::writeFuns::write
fField.size()*sizeof(float) fField.size()*sizeof(float)
); );
os << std::endl; os << std::endl;
} }
else else
{ {
forAll(fField, i) forAll(fField, i)
{ {
os << fField[i] << ' '; os << fField[i] << ' ';
if (i > 0 && (i % 10) == 0) if (i > 0 && (i % 10) == 0)
{ {
os << std::endl; os << std::endl;
} }
} }
os << std::endl; os << std::endl;
} }
} }
@ -134,20 +134,20 @@ void Foam::writeFuns::write
elems.size()*sizeof(label) elems.size()*sizeof(label)
); );
os << std::endl; os << std::endl;
} }
else else
{ {
forAll(elems, i) forAll(elems, i)
{ {
os << elems[i] << ' '; os << elems[i] << ' ';
if (i > 0 && (i % 10) == 0) if (i > 0 && (i % 10) == 0)
{ {
os << std::endl; os << std::endl;
} }
} }
os << std::endl; os << std::endl;
} }
} }

View File

@ -85,12 +85,12 @@ void writeBytes(char* start, int nBytes)
// Debug: write wall flags data // Debug: write wall flags data
void writeWallFlags(Ostream& os, label cellI, const labelList& wallFlags) void writeWallFlags(Ostream& os, label cellI, const labelList& wallFlags)
{ {
os << "cell " << cellI << " wallsFlags:"; os << "cell " << cellI << " wallsFlags:";
forAll(wallFlags, wallFaceI) forAll(wallFlags, wallFaceI)
{ {
os << wallFlags[wallFaceI] << " "; os << wallFlags[wallFaceI] << ' ';
} }
os << endl; os << endl;
} }

View File

@ -99,12 +99,12 @@ void print(const char* msg, Ostream& os, const PtrList<GeoField>& flds)
{ {
if (flds.size()) if (flds.size())
{ {
os << msg; os << msg;
forAll(flds, i) forAll(flds, i)
{ {
os<< ' ' << flds[i].name(); os << ' ' << flds[i].name();
} }
os << endl; os << endl;
} }
} }
@ -113,9 +113,9 @@ void print(Ostream& os, const wordList& flds)
{ {
forAll(flds, i) forAll(flds, i)
{ {
os<< ' ' << flds[i]; os << ' ' << flds[i];
} }
os << endl; os << endl;
} }

View File

@ -163,12 +163,12 @@ void print(const char* msg, Ostream& os, const PtrList<GeoField>& flds)
{ {
if (flds.size()) if (flds.size())
{ {
os << msg; os << msg;
forAll(flds, i) forAll(flds, i)
{ {
os<< ' ' << flds[i].name(); os << ' ' << flds[i].name();
} }
os << endl; os << endl;
} }
} }
@ -177,9 +177,9 @@ void print(Ostream& os, const wordList& flds)
{ {
forAll(flds, i) forAll(flds, i)
{ {
os<< ' ' << flds[i]; os << ' ' << flds[i];
} }
os << endl; os << endl;
} }

View File

@ -94,20 +94,20 @@ void Foam::writeFuns::write
fField.size()*sizeof(float) fField.size()*sizeof(float)
); );
os << std::endl; os << std::endl;
} }
else else
{ {
forAll(fField, i) forAll(fField, i)
{ {
os << fField[i] << ' '; os << fField[i] << ' ';
if (i > 0 && (i % 10) == 0) if (i > 0 && (i % 10) == 0)
{ {
os << std::endl; os << std::endl;
} }
} }
os << std::endl; os << std::endl;
} }
} }
@ -143,20 +143,20 @@ void Foam::writeFuns::write
elems.size()*sizeof(label) elems.size()*sizeof(label)
); );
os << std::endl; os << std::endl;
} }
else else
{ {
forAll(elems, i) forAll(elems, i)
{ {
os << elems[i] << ' '; os << elems[i] << ' ';
if (i > 0 && (i % 10) == 0) if (i > 0 && (i % 10) == 0)
{ {
os << std::endl; os << std::endl;
} }
} }
os << std::endl; os << std::endl;
} }
} }
@ -186,11 +186,11 @@ void Foam::writeFuns::writeHeader
if (binary) if (binary)
{ {
os << "BINARY" << std::endl; os << "BINARY" << std::endl;
} }
else else
{ {
os << "ASCII" << std::endl; os << "ASCII" << std::endl;
} }
} }

View File

@ -502,15 +502,14 @@ void vtkPV3FoamReader::PrintSelf(ostream& os, vtkIndent indent)
vtkDebugMacro(<<"PrintSelf"); vtkDebugMacro(<<"PrintSelf");
this->Superclass::PrintSelf(os,indent); this->Superclass::PrintSelf(os,indent);
os<< indent << "File name: " os << indent << "File name: "
<< (this->FileName ? this->FileName : "(none)") << "\n"; << (this->FileName ? this->FileName : "(none)") << "\n";
foamData_->PrintSelf(os, indent); foamData_->PrintSelf(os, indent);
os<< indent << "Time step range: " os << indent << "Time step range: "
<< this->TimeStepRange[0] << " - " << this->TimeStepRange[1] << this->TimeStepRange[0] << " - " << this->TimeStepRange[1] << "\n"
<< "\n"; << indent << "Time step: " << this->GetTimeStep() << endl;
os<< indent << "Time step: " << this->GetTimeStep() << endl;
} }

View File

@ -283,8 +283,8 @@ void vtkPV3blockMeshReader::PrintSelf(ostream& os, vtkIndent indent)
vtkDebugMacro(<<"PrintSelf"); vtkDebugMacro(<<"PrintSelf");
this->Superclass::PrintSelf(os,indent); this->Superclass::PrintSelf(os,indent);
os<< indent << "File name: " os << indent << "File name: "
<< (this->FileName ? this->FileName : "(none)") << "\n"; << (this->FileName ? this->FileName : "(none)") << "\n";
foamData_->PrintSelf(os, indent); foamData_->PrintSelf(os, indent);
} }

View File

@ -41,7 +41,7 @@ Foam::Ostream& Foam::operator<<
Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::sumData& wDist) Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::sumData& wDist)
{ {
return is >> wDist.oldFace_ >> wDist.sum_ >> wDist.count_; return is >> wDist.oldFace_ >> wDist.sum_ >> wDist.count_;
} }

View File

@ -1,5 +1,5 @@
tabulatedWallFunction/tabulatedWallFunction.C tabulatedWallFunction/tabulatedWallFunction.C
tabulatedWallFunction/newTabulatedWallFunction.C tabulatedWallFunction/tabulatedWallFunctionNew.C
SpaldingsLaw/SpaldingsLaw.C SpaldingsLaw/SpaldingsLaw.C
general/general.C general/general.C

View File

@ -65,7 +65,7 @@ void writeOBJ(Ostream& os, const pointField& pts)
{ {
const point& pt = pts[i]; const point& pt = pts[i];
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
} }
} }
@ -85,7 +85,7 @@ void dumpPoints(const triSurface& surf, const labelList& borderPoint)
{ {
const point& pt = surf.localPoints()[pointI]; const point& pt = surf.localPoints()[pointI];
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
} }
} }
} }
@ -108,7 +108,7 @@ void dumpEdges(const triSurface& surf, const boolList& borderEdge)
{ {
const edge& e = surf.edges()[edgeI]; const edge& e = surf.edges()[edgeI];
os << "l " << e.start()+1 << ' ' << e.end()+1 << endl; os << "l " << e.start()+1 << ' ' << e.end()+1 << endl;
} }
} }
} }

View File

@ -95,13 +95,13 @@ public:
friend Istream& operator>>(Istream& is, substance& s) friend Istream& operator>>(Istream& is, substance& s)
{ {
is >> s.name_ >> s.volFrac_; is >> s.name_ >> s.volFrac_;
return is; return is;
} }
friend Ostream& operator<<(Ostream& os, const substance& s) friend Ostream& operator<<(Ostream& os, const substance& s)
{ {
os << s.name_ << token::SPACE << s.volFrac_; os << s.name_ << token::SPACE << s.volFrac_;
return os; return os;
} }
}; };

View File

@ -2,9 +2,8 @@
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
set -x set -x
chmod a+rX $WM_PROJECT_DIR # fix permissions (NB: '+X' and not '+x'!)
chmod a+rX $WM_PROJECT_DIR/doc chmod a+rX $WM_PROJECT_DIR $WM_PROJECT_DIR/doc Doxygen
chmod -R a+rX Doxygen
Doxygen/Allwmake Doxygen/Allwmake

View File

@ -2,11 +2,21 @@
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
set -x set -x
rm -rf latex man
# remove html directory in background
mv html html-stagedRemove$$ 2> /dev/null
rm -rf html-stagedRemove$$ >/dev/null 2>&1 &
# ensure that created files are readable by everyone
umask 22 umask 22
rm -rf html latex man
doxygen doxygen
# fix permissions (NB: '+X' and not '+x'!) # fix permissions (NB: '+X' and not '+x'!)
chmod -R a+rX ./ chmod -R a+rX html latex man 2>/dev/null
echo
echo "Done doxygen"
echo
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -14,7 +14,9 @@
<body> <body>
<a id="openfoam"> </a> <a id="openfoam"> </a>
<!-- Top banner --> <!-- Top banner -->
<table style="border-width: 0px; width: 800px; background: #ddddff;" cellspacing=0 cellpadding=0> <table
style="border-width: 0px; width: 800px; background: #ddddff;"
cellspacing="0" cellpadding="0">
<tr> <tr>
<td style="width: 9px; height:54px"></td> <td style="width: 9px; height:54px"></td>
<td style="width: 250px; height:54px; vertical-align:middle; <td style="width: 250px; height:54px; vertical-align:middle;
@ -38,23 +40,23 @@ horizontal-align: left; ">
<td valign="top"> <td valign="top">
<table width="801" border="0" cellspacing="1" cellpadding="0" bgcolor="#ffffff"> <table width="801" border="0" cellspacing="1" cellpadding="0" bgcolor="#ffffff">
<tr> <tr>
<td class=leftmenu>&nbsp; <td class="leftmenu">&nbsp;
<a href="http://foam.sourceforge.net/doc/Doxygen/html" <a href="http://foam.sourceforge.net/doc/Doxygen/html"
class="menuLefton">Source Guide</a> class="menuLefton">Source Guide</a>
</td> </td>
<td class=topmenu> <td class="topmenu">
<a href="http://www.openfoam.com/about/" <a href="http://www.openfoam.com/about/"
class="menuTopoff">OpenCFD</a> class="menuTopoff">OpenCFD</a>
</td> </td>
<td class=topmenu> <td class="topmenu">
<a href="http://www.openfoam.com/features/" <a href="http://www.openfoam.com/features/"
class="menuTopoff">Features</a> class="menuTopoff">Features</a>
</td> </td>
<td class=topmenu> <td class="topmenu">
<a href="http://www.openfoam.com/contact/" <a href="http://www.openfoam.com/contact/"
class="menuTopoff">Contact</a> class="menuTopoff">Contact</a>
</td> </td>
<td class=topmenu> <td class="topmenu">
<a href="http://www.openfoam.com/" <a href="http://www.openfoam.com/"
class="menuTopoff">OpenFOAM</a> class="menuTopoff">OpenFOAM</a>
</td> </td>
@ -64,6 +66,8 @@ horizontal-align: left; ">
</td> </td>
</tr> </tr>
</table> </table>
<table style="border-width: 0px; width: 800px; background: #ffffff;" cellspacing=5 cellpadding=0> <table
style="border-width: 0px; width: 800px; background: #ffffff;"
cellspacing="5" cellpadding="0">
<tr> <tr>
<td> <td>

View File

@ -1,101 +1,100 @@
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ /* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
DIV.tabs div.tabs
{ {
float : left; float : left;
width : 100%; width : 100%;
margin-bottom : 2px; margin-bottom : 2px;
padding-bottom : 6px; padding-bottom : 6px;
} }
DIV.tabs UL div.tabs ul
{ {
margin : 0px; margin : 0px;
padding-left : 0px; padding-left : 0px;
border-right : 1px solid #84B0C7; border-right : 1px solid #84B0C7;
list-style : none; list-style : none;
} }
DIV.tabs LI, DIV.tabs FORM div.tabs li, div.tabs form
{ {
display : inline; display : inline;
margin : 0px; margin : 0px;
padding : 0px; padding : 0px;
} }
DIV.tabs FORM div.tabs form
{ {
float : left; float : left;
padding : 0px 9px; padding : 0px 9px;
} }
DIV.tabs A div.tabs a
{ {
float : left; float : left;
font-size : 12px; font-size : 12px;
font-weight : bold; font-weight : bold;
text-decoration : none; text-decoration : none;
border-right : 1px solid #000000; border-right : 1px solid #000000;
} }
DIV.tabs A:hover div.tabs a:hover
{ {
background-position: 100% -150px; background-position: 100% -150px;
} }
DIV.tabs A:link, DIV.tabs A:visited, div.tabs a:link, div.tabs a:visited, div.tabs a:active, div.tabs a:hover
DIV.tabs A:active, DIV.tabs A:hover
{ {
color: #000000; color : #000000;
} }
DIV.tabs SPAN div.tabs span
{ {
float : left; float : left;
display : block; display : block;
padding : 0px 9px; padding : 0px 9px;
white-space : nowrap; white-space : nowrap;
} }
DIV.tabs INPUT div.tabs input
{ {
float : right; float : right;
display : inline; display : inline;
font-size : 12px; font-size : 12px;
} }
DIV.tabs TD div.tabs td
{ {
font-size : 12px; font-size : 12px;
font-weight : bold; font-weight : bold;
text-decoration : none; text-decoration : none;
} }
/* Commented Backslash Hack hides rule from IE5-Mac \*/ /* Commented backslash hack hides rule from IE5-Mac \*/
DIV.tabs SPAN {float : none;} div.tabs span { float : none; }
/* End IE5-Mac hack */ /* End IE5-Mac hack */
DIV.tabs A:hover SPAN div.tabs a:hover span
{ {
background-position: 0% -150px; background-position: 0% -150px;
} }
DIV.tabs LI#current A div.tabs li#current a
{ {
border-width : 0px; border-width : 0px;
border-right : 1px solid #000000; border-right : 1px solid #000000;
color: #0000ff; color : #0000ff;
} }
DIV.tabs LI#current SPAN div.tabs li#current span
{ {
padding-bottom : 0px; padding-bottom : 0px;
} }
DIV.nav div.nav
{ {
background : none; background : none;
border : none; border : none;
border-bottom : 1px solid #000000; border-bottom : 1px solid #000000;
} }

View File

@ -1,48 +0,0 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-its
#
# Description
# Search for *.[CH] files with "it's"
# This contraction (== "it is") looks too much like "its" (possesive)
# and confuses non-native (and some native) English speakers.
#
# - print filename and lineNumber
#
# -----------------------------------------------------------------------------
my $re_filespec = qr{^.+\.[CH]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
local @ARGV = $_;
while (<>) {
if (m{it\'s}) {
print "$File::Find::name line=$.\n";
}
}
close ARGV;
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

17
doc/tools/find-its Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# -----------------------------------------------------------------------------
# Script
# find-its
#
# Description
# Search for files with "it's"
# This contraction (== "it is") looks too much like "its" (possesive)
# and confuses non-native (and some native) English speakers.
#
# -----------------------------------------------------------------------------
set -x
cd $WM_PROJECT_DIR || exit 1
git grep -e "it's"
#------------------------------------------------------------------ end-of-file

View File

@ -75,7 +75,7 @@ _foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_LIBBI
# Compiler settings # Compiler settings
# ~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~
unset gcc_version gmp_version mpfr_version unset gcc_version gmp_version mpfr_version mpc_version
unsetenv MPFR_ARCH_PATH unsetenv MPFR_ARCH_PATH
@ -92,25 +92,22 @@ case OpenFOAM:
set gmp_version=gmp-5.0.1 set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2 set mpfr_version=mpfr-2.4.2
breaksw breaksw
case Gcc45:
case Gcc442: set gcc_version=gcc-4.5.0
set gcc_version=gcc-4.4.2 set gmp_version=gmp-5.0.1
set gmp_version=gmp-4.2.4 set mpfr_version=mpfr-2.4.2
set mpfr_version=mpfr-2.4.1 set mpc_version=mpc-2.4.2
breaksw breaksw
case Gcc44: case Gcc44:
set gcc_version=gcc-4.4.2 set gcc_version=gcc-4.4.3
set gmp_version=gmp-4.2.4 set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.1 set mpfr_version=mpfr-2.4.2
breaksw breaksw
case Gcc43: case Gcc43:
set gcc_version=gcc-4.3.3 set gcc_version=gcc-4.3.3
set gmp_version=gmp-4.2.4 set gmp_version=gmp-4.2.4
set mpfr_version=mpfr-2.4.1 set mpfr_version=mpfr-2.4.1
breaksw breaksw
default: default:
echo echo
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
@ -118,13 +115,13 @@ case OpenFOAM:
echo " Please check your settings" echo " Please check your settings"
echo echo
breaksw breaksw
endsw endsw
if ( $?gcc_version ) then if ( $?gcc_version ) then
set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
# Check that the compiler directory can be found # Check that the compiler directory can be found
if ( ! -d "$gccDir" ) then if ( ! -d "$gccDir" ) then
@ -138,17 +135,30 @@ case OpenFOAM:
_foamAddMan $gccDir/man _foamAddMan $gccDir/man
_foamAddPath $gccDir/bin _foamAddPath $gccDir/bin
_foamAddLib $gccDir/lib${WM_COMPILER_LIB_ARCH}:$gccDir/lib
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
if ( "$WM_ARCH_OPTION" = 64 ) then
then
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
else
_foamAddLib $gccDir/lib
endif
# add in gmp/mpfr libraries # add in gmp/mpfr libraries
_foamAddLib $gmpDir/lib _foamAddLib $gmpDir/lib
_foamAddLib $mpfrDir/lib _foamAddLib $mpfrDir/lib
# add in mpc libraries (not need for older gcc)
if ( $?mpc_version ) then
then
_foamAddLib $mpcDir/lib
endif
# used by boost/CGAL: # used by boost/CGAL:
setenv MPFR_ARCH_PATH $mpfrDir setenv MPFR_ARCH_PATH $mpfrDir
endif endif
unset gcc_version gccDir gmp_version gmpDir mpfr_version mpfrDir unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
breaksw breaksw
endsw endsw

View File

@ -99,7 +99,8 @@ _foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_LIBBIN/dummy
# Compiler settings # Compiler settings
# ~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~
unset gcc_version gmp_version mpfr_version MPFR_ARCH_PATH unset gcc_version gmp_version mpfr_version mpc_version
unset MPFR_ARCH_PATH
# Select compiler installation # Select compiler installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -114,15 +115,16 @@ OpenFOAM)
gmp_version=gmp-5.0.1 gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2 mpfr_version=mpfr-2.4.2
;; ;;
Gcc442) Gcc45)
gcc_version=gcc-4.4.2 gcc_version=gcc-4.5.0
gmp_version=gmp-4.2.4 gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.1 mpfr_version=mpfr-2.4.2
mpc_version=mpc-0.8.1
;; ;;
Gcc44) Gcc44)
gcc_version=gcc-4.4.2 gcc_version=gcc-4.4.3
gmp_version=gmp-4.2.4 gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.1 mpfr_version=mpfr-2.4.2
;; ;;
Gcc43) Gcc43)
gcc_version=gcc-4.3.3 gcc_version=gcc-4.3.3
@ -143,6 +145,7 @@ OpenFOAM)
gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
# Check that the compiler directory can be found # Check that the compiler directory can be found
[ -d "$gccDir" ] || { [ -d "$gccDir" ] || {
@ -156,22 +159,30 @@ OpenFOAM)
_foamAddMan $gccDir/man _foamAddMan $gccDir/man
_foamAddPath $gccDir/bin _foamAddPath $gccDir/bin
_foamAddLib $gccDir/lib
# 64-bit needs lib64, but 32-bit needs lib (not lib32) # 64-bit needs lib64, but 32-bit needs lib (not lib32)
if [ "$WM_ARCH_OPTION" = 64 ] if [ "$WM_ARCH_OPTION" = 64 ]
then then
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH _foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
else
_foamAddLib $gccDir/lib
fi fi
# add in gmp/mpfr libraries # add in gmp/mpfr libraries
_foamAddLib $gmpDir/lib _foamAddLib $gmpDir/lib
_foamAddLib $mpfrDir/lib _foamAddLib $mpfrDir/lib
# add in mpc libraries (not need for older gcc)
if [ -n "$mpc_version" ]
then
_foamAddLib $mpcDir/lib
fi
# used by boost/CGAL: # used by boost/CGAL:
export MPFR_ARCH_PATH=$mpfrDir export MPFR_ARCH_PATH=$mpfrDir
fi fi
unset gcc_version gccDir gmp_version gmpDir mpfr_version mpfrDir unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
;; ;;
esac esac

View File

@ -6,7 +6,7 @@ ODESolversRK = ODESolvers/RK
ODESolversSIBS = ODESolvers/SIBS ODESolversSIBS = ODESolvers/SIBS
$(ODESolversODESolver)/ODESolver.C $(ODESolversODESolver)/ODESolver.C
$(ODESolversODESolver)/newODESolver.C $(ODESolversODESolver)/ODESolverNew.C
$(ODESolversRK)/RK.C $(ODESolversRK)/RK.C

View File

@ -122,19 +122,18 @@ void printSourceFileAndLine
if (line == "") if (line == "")
{ {
os << " addr2line failed"; os << " addr2line failed";
} }
else if (line == "??:0") else if (line == "??:0")
{ {
os << " in " << filename; os << " in " << filename;
} }
else else
{ {
string cwdLine(line.replaceAll(cwd() + '/', "")); string cwdLine(line.replaceAll(cwd() + '/', ""));
string homeLine(cwdLine.replaceAll(home(), '~')); string homeLine(cwdLine.replaceAll(home(), '~'));
os << " at " << homeLine.c_str(); os << " at " << homeLine.c_str();
} }
} }
} }
@ -160,11 +159,11 @@ void getSymbolForRaw
if (fcnt != "") if (fcnt != "")
{ {
os << fcnt.c_str(); os << fcnt.c_str();
return; return;
} }
} }
os << "Uninterpreted: " << raw.c_str(); os << "Uninterpreted: " << raw.c_str();
} }
@ -210,8 +209,8 @@ void error::printStack(Ostream& os)
fileName programFile; fileName programFile;
word address; word address;
os << '#' << label(i) << " "; os << '#' << label(i) << " ";
//os << "Raw : " << msg << "\n\t"; //os << "Raw : " << msg << "\n\t";
{ {
string::size_type lPos = msg.find('['); string::size_type lPos = msg.find('[');
string::size_type rPos = msg.find(']'); string::size_type rPos = msg.find(']');
@ -263,12 +262,12 @@ void error::printStack(Ostream& os)
if (status == 0 && cplusNamePtr) if (status == 0 && cplusNamePtr)
{ {
os << cplusNamePtr; os << cplusNamePtr;
free(cplusNamePtr); free(cplusNamePtr);
} }
else else
{ {
os << cName.c_str(); os << cName.c_str();
} }
} }
else else
@ -279,7 +278,7 @@ void error::printStack(Ostream& os)
{ {
string fullName(msg.substr(start, endBracketPos-start)); string fullName(msg.substr(start, endBracketPos-start));
os << fullName.c_str() << nl; os << fullName.c_str() << nl;
} }
else else
{ {
@ -296,7 +295,7 @@ void error::printStack(Ostream& os)
printSourceFileAndLine(os, addressMap, programFile, address); printSourceFileAndLine(os, addressMap, programFile, address);
os << nl; os << nl;
} }
free(strings); free(strings);

View File

@ -258,13 +258,13 @@ $(GAMG)/GAMGSolverSolve.C
GAMGInterfaces = $(GAMG)/interfaces GAMGInterfaces = $(GAMG)/interfaces
$(GAMGInterfaces)/GAMGInterface/GAMGInterface.C $(GAMGInterfaces)/GAMGInterface/GAMGInterface.C
$(GAMGInterfaces)/GAMGInterface/newGAMGInterface.C $(GAMGInterfaces)/GAMGInterface/GAMGInterfaceNew.C
$(GAMGInterfaces)/processorGAMGInterface/processorGAMGInterface.C $(GAMGInterfaces)/processorGAMGInterface/processorGAMGInterface.C
$(GAMGInterfaces)/cyclicGAMGInterface/cyclicGAMGInterface.C $(GAMGInterfaces)/cyclicGAMGInterface/cyclicGAMGInterface.C
GAMGInterfaceFields = $(GAMG)/interfaceFields GAMGInterfaceFields = $(GAMG)/interfaceFields
$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C $(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C
$(GAMGInterfaceFields)/GAMGInterfaceField/newGAMGInterfaceField.C $(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceFieldNew.C
$(GAMGInterfaceFields)/processorGAMGInterfaceField/processorGAMGInterfaceField.C $(GAMGInterfaceFields)/processorGAMGInterfaceField/processorGAMGInterfaceField.C
$(GAMGInterfaceFields)/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C $(GAMGInterfaceFields)/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C
@ -328,7 +328,7 @@ polyMesh = meshes/polyMesh
polyPatches = $(polyMesh)/polyPatches polyPatches = $(polyMesh)/polyPatches
$(polyPatches)/polyPatch/polyPatch.C $(polyPatches)/polyPatch/polyPatch.C
$(polyPatches)/polyPatch/newPolyPatch.C $(polyPatches)/polyPatch/polyPatchNew.C
basicPolyPatches = $(polyPatches)/basic basicPolyPatches = $(polyPatches)/basic
$(basicPolyPatches)/coupled/coupledPolyPatch.C $(basicPolyPatches)/coupled/coupledPolyPatch.C
@ -362,15 +362,15 @@ $(zone)/zone.C
cellZone = $(polyMesh)/zones/cellZone cellZone = $(polyMesh)/zones/cellZone
$(cellZone)/cellZone.C $(cellZone)/cellZone.C
$(cellZone)/newCellZone.C $(cellZone)/cellZoneNew.C
faceZone = $(polyMesh)/zones/faceZone faceZone = $(polyMesh)/zones/faceZone
$(faceZone)/faceZone.C $(faceZone)/faceZone.C
$(faceZone)/newFaceZone.C $(faceZone)/faceZoneNew.C
pointZone = $(polyMesh)/zones/pointZone pointZone = $(polyMesh)/zones/pointZone
$(pointZone)/pointZone.C $(pointZone)/pointZone.C
$(pointZone)/newPointZone.C $(pointZone)/pointZoneNew.C
$(polyMesh)/polyMesh.C $(polyMesh)/polyMesh.C
$(polyMesh)/polyMeshFromShapeMesh.C $(polyMesh)/polyMeshFromShapeMesh.C
@ -438,7 +438,7 @@ $(pointMeshMapper)/pointPatchMapper.C
pointPatches = $(pointMesh)/pointPatches pointPatches = $(pointMesh)/pointPatches
$(pointPatches)/pointPatch/pointPatch.C $(pointPatches)/pointPatch/pointPatch.C
$(pointPatches)/facePointPatch/facePointPatch.C $(pointPatches)/facePointPatch/facePointPatch.C
$(pointPatches)/facePointPatch/newFacePointPatch.C $(pointPatches)/facePointPatch/facePointPatchNew.C
basicPointPatches = $(pointPatches)/basic basicPointPatches = $(pointPatches)/basic
$(basicPointPatches)/coupled/coupledPointPatch.C $(basicPointPatches)/coupled/coupledPointPatch.C

View File

@ -61,9 +61,9 @@ Foam::IOstream::compressionType
Foam::IOstream::compressionEnum(const word& compression) Foam::IOstream::compressionEnum(const word& compression)
{ {
// get Switch (bool) value, but allow it to fail // get Switch (bool) value, but allow it to fail
Switch::switchType sw = Switch::asEnum(compression, true); Switch sw(compression, true);
if (sw != Switch::INVALID) if (sw.valid())
{ {
return sw ? IOstream::COMPRESSED : IOstream::UNCOMPRESSED; return sw ? IOstream::COMPRESSED : IOstream::UNCOMPRESSED;
} }

View File

@ -346,6 +346,6 @@ Ostream& operator<<
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "newPointPatchField.C" #include "pointPatchFieldNew.C"
// ************************************************************************* // // ************************************************************************* //

View File

@ -40,8 +40,8 @@ License
OpenFOAM comes with full commercial support from OpenCFD, including OpenFOAM comes with full commercial support from OpenCFD, including
<a href="http://www.openfoam.com/support/software.php">software support</a>, <a href="http://www.openfoam.com/support/software.php">software support</a>,
<a href="http://www.openfoam.com/support/development.php">contracted developments</a> <a href="http://www.openfoam.com/support/development.php">contracted developments</a>
and a programme of <a href="http://www.openfoam.com/training">training courses</a>. and a programme of <a href="http://www.openfoam.com/training/">training courses</a>.
These activities fund the development, maintenance and release of These activities fund the development, maintenance and release of
OpenFOAM to make it an extremely viable commercial open source product. OpenFOAM to make it an extremely viable commercial open source product.

View File

@ -577,21 +577,56 @@ Foam::polyMesh::polyMesh
<< "Found " << nFaces - defaultPatchStart << "Found " << nFaces - defaultPatchStart
<< " undefined faces in mesh; adding to default patch." << endl; << " undefined faces in mesh; adding to default patch." << endl;
boundary_.set // Check if there already exists a defaultFaces patch as last patch
( // and reuse it.
nAllPatches, label patchI = findIndex(boundaryPatchNames, defaultBoundaryPatchName);
polyPatch::New
(
defaultBoundaryPatchType,
defaultBoundaryPatchName,
nFaces - defaultPatchStart,
defaultPatchStart,
boundary_.size() - 1,
boundary_
)
);
nAllPatches++; if (patchI != -1)
{
if (patchI != boundaryFaces.size()-1 || boundary_[patchI].size())
{
FatalErrorIn("polyMesh::polyMesh(... construct from shapes...)")
<< "Default patch " << boundary_[patchI].name()
<< " already has faces in it or is not"
<< " last in list of patches." << exit(FatalError);
}
WarningIn("polyMesh::polyMesh(... construct from shapes...)")
<< "Reusing existing patch " << patchI
<< " for undefined faces." << endl;
boundary_.set
(
patchI,
polyPatch::New
(
boundaryPatchTypes[patchI],
boundaryPatchNames[patchI],
nFaces - defaultPatchStart,
defaultPatchStart,
patchI,
boundary_
)
);
}
else
{
boundary_.set
(
nAllPatches,
polyPatch::New
(
defaultBoundaryPatchType,
defaultBoundaryPatchName,
nFaces - defaultPatchStart,
defaultPatchStart,
boundary_.size() - 1,
boundary_
)
);
nAllPatches++;
}
} }
// Reset the size of the boundary // Reset the size of the boundary

View File

@ -71,7 +71,7 @@ void Foam::coupledPolyPatch::writeOBJ
writeOBJ(os, p1); writeOBJ(os, p1);
vertI++; vertI++;
os<< "l " << vertI-1 << ' ' << vertI << nl; os << "l " << vertI-1 << ' ' << vertI << nl;
} }

View File

@ -32,7 +32,7 @@ Description
SourceFiles SourceFiles
polyPatch.C polyPatch.C
newPolyPatch.C polyPatchNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -34,7 +34,7 @@ Description
SourceFiles SourceFiles
cellZone.C cellZone.C
newCellZone.C cellZoneNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -33,7 +33,7 @@ Description
SourceFiles SourceFiles
faceZone.C faceZone.C
newFaceZone.C faceZoneNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -35,7 +35,7 @@ Description
SourceFiles SourceFiles
pointZone.C pointZone.C
newPointZone.C pointZoneNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,23 +44,17 @@ const char* Foam::Switch::names[Foam::Switch::INVALID+1] =
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
Foam::Switch::switchType Foam::Switch::asEnum(const bool b)
{
return b ? Switch::TRUE : Switch::FALSE;
}
Foam::Switch::switchType Foam::Switch::asEnum Foam::Switch::switchType Foam::Switch::asEnum
( (
const std::string& str, const std::string& str,
const bool allowInvalid const bool allowInvalid
) )
{ {
for (int sw = 0; sw < Switch::INVALID; sw++) for (int sw = 0; sw < Switch::INVALID; ++sw)
{ {
if (str == names[sw]) if (str == names[sw])
{ {
// convert n/y to no/yes (perhaps should deprecate y/n) // convert n/y to no/yes - perhaps should deprecate y/n
if (sw == Switch::NO_1 || sw == Switch::NONE) if (sw == Switch::NO_1 || sw == Switch::NONE)
{ {
return Switch::NO; return Switch::NO;
@ -78,57 +72,12 @@ Foam::Switch::switchType Foam::Switch::asEnum
if (!allowInvalid) if (!allowInvalid)
{ {
FatalErrorIn("Switch::asEnum(const std::string&)") FatalErrorIn("Switch::asEnum(const std::string&, const bool)")
<< "unknown switch word " << str << nl << "unknown switch word " << str << nl
<< abort(FatalError); << abort(FatalError);
} }
return INVALID; return Switch::INVALID;
}
bool Foam::Switch::asBool(const switchType sw)
{
// relies on (INVALID & 0x1) evaluating to false
return (sw & 0x1);
}
bool Foam::Switch::asBool
(
const std::string& str,
const bool allowInvalid
)
{
// allow invalid values, but catch after for correct error message
switchType sw = asEnum(str, true);
if (sw == Switch::INVALID)
{
if (!allowInvalid)
{
FatalErrorIn("Switch::asBool(const std::string&)")
<< "unknown switch word " << str << nl
<< abort(FatalError);
}
return false;
}
return (sw & 0x1);
}
const char* Foam::Switch::asText(const bool b)
{
return b ? names[Switch::TRUE] : names[Switch::FALSE];
}
const char* Foam::Switch::asText(const switchType sw)
{
return names[sw];
} }
@ -145,6 +94,18 @@ Foam::Switch Foam::Switch::lookupOrAddToDict
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
bool Foam::Switch::valid() const
{
return switch_ <= Switch::NONE;
}
const char* Foam::Switch::asText() const
{
return names[switch_];
}
bool Foam::Switch::readIfPresent(const word& name, const dictionary& dict) bool Foam::Switch::readIfPresent(const word& name, const dictionary& dict)
{ {
return dict.readIfPresent<Switch>(name, *this); return dict.readIfPresent<Switch>(name, *this);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,11 +48,11 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
class Switch; class Switch;
class dictionary;
Istream& operator>>(Istream&, Switch&); Istream& operator>>(Istream&, Switch&);
Ostream& operator<<(Ostream&, const Switch&); Ostream& operator<<(Ostream&, const Switch&);
class dictionary;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class Switch Declaration Class Switch Declaration
@ -60,8 +60,6 @@ class dictionary;
class Switch class Switch
{ {
private:
// Private data // Private data
//- The logic and enumerated text representation stored as a single byte //- The logic and enumerated text representation stored as a single byte
@ -71,19 +69,21 @@ public:
// Public data types // Public data types
// avoid issues with pre-processor defines
#undef FALSE
#undef TRUE
#undef OFF
#undef ON
#undef NO
#undef YES
#undef NO_1
#undef YES_1
#undef NONE
#undef PLACEHOLDER
#undef INVALID
//- The various text representations for a switch value. //- The various text representations for a switch value.
// These also correspond to the entries in names. // These also correspond to the entries in names.
# undef FALSE
# undef TRUE
# undef OFF
# undef ON
# undef NO
# undef YES
# undef NO_1
# undef YES_1
# undef NONE
# undef PLACEHOLDER
# undef INVALID
enum switchType enum switchType
{ {
FALSE = 0, TRUE = 1, FALSE = 0, TRUE = 1,
@ -94,7 +94,6 @@ public:
INVALID INVALID
}; };
// Static data members // Static data members
//- The set of names corresponding to the switchType enumeration //- The set of names corresponding to the switchType enumeration
@ -102,36 +101,15 @@ public:
static const char* names[INVALID+1]; static const char* names[INVALID+1];
private:
// Static Member Functions // Static Member Functions
//- Return a switchType representation of a bool
static switchType asEnum(const bool);
//- Return a switchType representation of a word //- Return a switchType representation of a word
// Optionally allow bad words, and catch the error elsewhere static switchType asEnum(const std::string&, const bool allowInvalid);
static switchType asEnum
(
const std::string&,
const bool allowInvalid=false
);
//- Return a bool representation of a switchType
static bool asBool(const switchType);
//- Return a bool representation of a word
// Optionally allow bad words, and catch the error elsewhere
static bool asBool
(
const std::string&,
const bool allowInvalid=false
);
//- Return a text representation of a bool value
static const char* asText(const bool);
//- Return a text representation of a switchType
static const char* asText(const switchType);
public:
// Constructors // Constructors
@ -141,28 +119,36 @@ public:
switch_(Switch::FALSE) switch_(Switch::FALSE)
{} {}
//- Construct from bool //- Construct from enumerated value
Switch(const bool value) Switch(const switchType sw)
: :
switch_(asEnum(value)) switch_(sw)
{}
//- Construct from bool
Switch(const bool b)
:
switch_(b ? Switch::TRUE : Switch::FALSE)
{} {}
//- Construct from integer values (treats integer as bool value) //- Construct from integer values (treats integer as bool value)
Switch(const int value) Switch(const int i)
: :
switch_(asEnum(bool(value))) switch_(i ? Switch::TRUE : Switch::FALSE)
{} {}
//- Construct from std::string, string, word //- Construct from std::string, string, word
Switch(const std::string& value) // Optionally allow bad words, and catch the error elsewhere
Switch(const std::string& str, const bool allowInvalid=false)
: :
switch_(asEnum(value)) switch_(asEnum(str, allowInvalid))
{} {}
//- Construct from character array //- Construct from character array
Switch(const char* value) // Optionally allow bad words, and catch the error elsewhere
Switch(const char* str, const bool allowInvalid=false)
: :
switch_(asEnum(std::string(value))) switch_(asEnum(std::string(str), allowInvalid))
{} {}
//- Construct from Istream //- Construct from Istream
@ -178,6 +164,18 @@ public:
); );
// Member Functions
//- Return true if the Switch has a valid value
bool valid() const;
//- Return a text representation of the Switch
const char* asText() const;
//- Update the value of the Switch if it is found in the dictionary
bool readIfPresent(const word&, const dictionary&);
// Member Operators // Member Operators
//- Conversion to bool //- Conversion to bool
@ -186,6 +184,13 @@ public:
return (switch_ & 0x1); return (switch_ & 0x1);
} }
//- Assignment from enumerated value
const Switch& operator=(const switchType sw)
{
switch_ = sw;
return *this;
}
//- Assignment from bool //- Assignment from bool
const Switch& operator=(const bool b) const Switch& operator=(const bool b)
{ {
@ -194,12 +199,6 @@ public:
} }
// Member fuctions
//- Update the value of the Switch if it is found in the dictionary
bool readIfPresent(const word&, const dictionary&);
// IOstream Operators // IOstream Operators
friend Istream& operator>>(Istream&, Switch&); friend Istream& operator>>(Istream&, Switch&);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,26 +48,26 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s)
if (t.isLabel()) if (t.isLabel())
{ {
s.switch_ = Switch::asEnum(bool(t.labelToken())); s = bool(t.labelToken());
} }
else if (t.isWord()) else if (t.isWord())
{ {
// allow invalid values, but catch after for correct error message // allow invalid values, but catch after for correct error message
Switch::switchType sw = Switch::asEnum(t.wordToken(), true); Switch sw(t.wordToken(), true);
if (sw == Switch::INVALID) if (sw.valid())
{
s = sw;
}
else
{ {
is.setBad(); is.setBad();
FatalIOErrorIn("operator>>(Istream&, Switch&)", is) FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is)
<< "expected 'true/false', 'on/off' ... found " << t.wordToken() << "expected 'true/false', 'on/off' ... found " << t.wordToken()
<< exit(FatalIOError); << exit(FatalIOError);
return is; return is;
} }
else
{
s.switch_ = sw;
}
} }
else else
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ Foam::Istream& Foam::operator>>(Istream& is, bool& b)
Foam::Ostream& Foam::operator<<(Ostream& os, const bool b) Foam::Ostream& Foam::operator<<(Ostream& os, const bool b)
{ {
// we could also write as text string without any difficulty // we could also write as text string without any difficulty
// os << Switch::asText(b); // os << (b ? "true" : "false");
os.write(label(b)); os.write(label(b));
os.check("Ostream& operator<<(Ostream&, const bool)"); os.check("Ostream& operator<<(Ostream&, const bool)");
return os; return os;
@ -59,10 +59,10 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const bool b)
bool Foam::readBool(Istream& is) bool Foam::readBool(Istream& is)
{ {
bool val; bool b;
is >> val; is >> b;
return val; return b;
} }

View File

@ -1,5 +1,5 @@
dynamicFvMesh/dynamicFvMesh.C dynamicFvMesh/dynamicFvMesh.C
dynamicFvMesh/newDynamicFvMesh.C dynamicFvMesh/dynamicFvMeshNew.C
staticFvMesh/staticFvMesh.C staticFvMesh/staticFvMesh.C
dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C
dynamicInkJetFvMesh/dynamicInkJetFvMesh.C dynamicInkJetFvMesh/dynamicInkJetFvMesh.C
@ -8,7 +8,7 @@ dynamicRefineFvMesh/dynamicRefineFvMesh.C
solidBodyMotionFvMesh/solidBodyMotionFvMesh.C solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions
$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C $(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C
$(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C $(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunctionNew.C
$(solidBodyMotionFunctions)/SDA/SDA.C $(solidBodyMotionFunctions)/SDA/SDA.C
$(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C $(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C
$(solidBodyMotionFunctions)/linearMotion/linearMotion.C $(solidBodyMotionFunctions)/linearMotion/linearMotion.C

View File

@ -29,7 +29,7 @@ Description
SourceFiles SourceFiles
dynamicFvMesh.C dynamicFvMesh.C
newDynamicFvMesh.C dynamicFvMeshNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -332,7 +332,7 @@ Foam::dynamicRefineFvMesh::refine
const fvsPatchScalarField& patchPhiU = const fvsPatchScalarField& patchPhiU =
phiU.boundaryField()[patchI]; phiU.boundaryField()[patchI];
label faceI = patchPhi.patch().patch().start(); label faceI = patchPhi.patch().start();
forAll(patchPhi, i) forAll(patchPhi, i)
{ {

View File

@ -36,7 +36,7 @@ Description
SourceFiles SourceFiles
solidBodyMotionFunction.C solidBodyMotionFunction.C
newDynamicFvMesh.C dynamicFvMeshNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -19,7 +19,7 @@ $(enrichedPatch)/enrichedPatchMasterPoints.C
polyMeshModifier = polyTopoChange/polyMeshModifier polyMeshModifier = polyTopoChange/polyMeshModifier
$(polyMeshModifier)/polyMeshModifier.C $(polyMeshModifier)/polyMeshModifier.C
$(polyMeshModifier)/newPolyMeshModifier.C $(polyMeshModifier)/polyMeshModifierNew.C
polyTopoChange/polyTopoChange/topoAction/topoActions.C polyTopoChange/polyTopoChange/topoAction/topoActions.C
polyTopoChange/polyTopoChanger/polyTopoChanger.C polyTopoChange/polyTopoChanger/polyTopoChanger.C

View File

@ -186,7 +186,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
forAll(bfld, patchI) forAll(bfld, patchI)
{ {
fvsPatchField<T>& patchFld = bfld[patchI]; fvsPatchField<T>& patchFld = bfld[patchI];
label faceI = patchFld.patch().patch().start(); label faceI = patchFld.patch().start();
forAll(patchFld, i) forAll(patchFld, i)
{ {

Some files were not shown because too many files have changed in this diff Show More