mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'olesenm' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev into olesenm
This commit is contained in:
6
Allwmake
6
Allwmake
@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||||
|
echo "Error: FOAM_EXT_LIBBIN not set"
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# wmake is required for subsequent targets
|
# wmake is required for subsequent targets
|
||||||
( cd wmake/src && make )
|
( cd wmake/src && make )
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||||
|
echo "Error: FOAM_EXT_LIBBIN not set"
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake all utilities
|
wmake all utilities
|
||||||
|
|||||||
@ -34,8 +34,8 @@ namespace XiGModels
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(basicSubGrid, 0);
|
defineTypeNameAndDebug(basicSubGrid, 0);
|
||||||
addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary);
|
addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(PDRDragModel, 0);
|
defineTypeNameAndDebug(PDRDragModel, 0);
|
||||||
defineRunTimeSelectionTable(PDRDragModel, dictionary);
|
defineRunTimeSelectionTable(PDRDragModel, dictionary);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -34,8 +34,8 @@ namespace PDRDragModels
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(basic, 0);
|
defineTypeNameAndDebug(basic, 0);
|
||||||
addToRunTimeSelectionTable(PDRDragModel, basic, dictionary);
|
addToRunTimeSelectionTable(PDRDragModel, basic, dictionary);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -34,8 +34,8 @@ namespace XiEqModels
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(SCOPEBlend, 0);
|
defineTypeNameAndDebug(SCOPEBlend, 0);
|
||||||
addToRunTimeSelectionTable(XiEqModel, SCOPEBlend, dictionary);
|
addToRunTimeSelectionTable(XiEqModel, SCOPEBlend, dictionary);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(XiEqModel, 0);
|
defineTypeNameAndDebug(XiEqModel, 0);
|
||||||
defineRunTimeSelectionTable(XiEqModel, dictionary);
|
defineRunTimeSelectionTable(XiEqModel, dictionary);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(XiGModel, 0);
|
defineTypeNameAndDebug(XiGModel, 0);
|
||||||
defineRunTimeSelectionTable(XiGModel, dictionary);
|
defineRunTimeSelectionTable(XiGModel, dictionary);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -34,8 +34,8 @@ namespace XiGModels
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(instabilityG, 0);
|
defineTypeNameAndDebug(instabilityG, 0);
|
||||||
addToRunTimeSelectionTable(XiGModel, instabilityG, dictionary);
|
addToRunTimeSelectionTable(XiGModel, instabilityG, dictionary);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(XiModel, 0);
|
defineTypeNameAndDebug(XiModel, 0);
|
||||||
defineRunTimeSelectionTable(XiModel, dictionary);
|
defineRunTimeSelectionTable(XiModel, dictionary);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -34,8 +34,8 @@ namespace XiModels
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(fixed, 0);
|
defineTypeNameAndDebug(fixed, 0);
|
||||||
addToRunTimeSelectionTable(XiModel, fixed, dictionary);
|
addToRunTimeSelectionTable(XiModel, fixed, dictionary);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -39,8 +39,8 @@ namespace combustionModels
|
|||||||
infinitelyFastChemistry,
|
infinitelyFastChemistry,
|
||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -39,8 +39,8 @@ namespace combustionModels
|
|||||||
noCombustion,
|
noCombustion,
|
||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -217,7 +217,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchScalarField,
|
fvPatchScalarField,
|
||||||
smoluchowskiJumpTFvPatchScalarField
|
smoluchowskiJumpTFvPatchScalarField
|
||||||
|
|||||||
@ -198,7 +198,7 @@ void maxwellSlipUFvPatchVectorField::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchVectorField,
|
fvPatchVectorField,
|
||||||
maxwellSlipUFvPatchVectorField
|
maxwellSlipUFvPatchVectorField
|
||||||
|
|||||||
@ -112,7 +112,7 @@ void fixedRhoFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchScalarField,
|
fvPatchScalarField,
|
||||||
fixedRhoFvPatchScalarField
|
fixedRhoFvPatchScalarField
|
||||||
|
|||||||
@ -203,7 +203,7 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::write
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchScalarField,
|
fvPatchScalarField,
|
||||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void Foam::adjointOutletPressureFvPatchScalarField::write(Ostream& os) const
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchScalarField,
|
fvPatchScalarField,
|
||||||
adjointOutletPressureFvPatchScalarField
|
adjointOutletPressureFvPatchScalarField
|
||||||
|
|||||||
@ -119,7 +119,7 @@ void Foam::adjointOutletVelocityFvPatchVectorField::write(Ostream& os) const
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchVectorField,
|
fvPatchVectorField,
|
||||||
adjointOutletVelocityFvPatchVectorField
|
adjointOutletVelocityFvPatchVectorField
|
||||||
|
|||||||
@ -133,7 +133,7 @@ void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchScalarField,
|
fvPatchScalarField,
|
||||||
alphaContactAngleFvPatchScalarField
|
alphaContactAngleFvPatchScalarField
|
||||||
|
|||||||
@ -207,7 +207,7 @@ void tractionDisplacementFvPatchVectorField::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchVectorField,
|
fvPatchVectorField,
|
||||||
tractionDisplacementFvPatchVectorField
|
tractionDisplacementFvPatchVectorField
|
||||||
|
|||||||
@ -194,7 +194,7 @@ void tractionDisplacementCorrectionFvPatchVectorField::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeNonTemplatedPatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
fvPatchVectorField,
|
fvPatchVectorField,
|
||||||
tractionDisplacementCorrectionFvPatchVectorField
|
tractionDisplacementCorrectionFvPatchVectorField
|
||||||
|
|||||||
@ -9,7 +9,7 @@ set -x
|
|||||||
$WM_THIRD_PARTY_DIR/AllwmakeLibccmio
|
$WM_THIRD_PARTY_DIR/AllwmakeLibccmio
|
||||||
|
|
||||||
# if the library built properly, the headers should exist too
|
# if the library built properly, the headers should exist too
|
||||||
if [ -e $FOAM_LIBBIN/libccmio.so ]
|
if [ -e $FOAM_EXT_LIBBIN/libccmio.so ]
|
||||||
then
|
then
|
||||||
wmake ccm26ToFoam
|
wmake ccm26ToFoam
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
|
LIBCCMIO_DIR = $(WM_THIRD_PARTY_DIR)/libccmio-2.6.1
|
||||||
|
|
||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I${WM_THIRD_PARTY_DIR}/libccmio-2.6.1 \
|
-I$(LIBCCMIO_DIR) \
|
||||||
-I${WM_THIRD_PARTY_DIR}/libccmio-2.6.1/lnInclude
|
-I$(LIBCCMIO_DIR)/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lccmio
|
-L$(FOAM_EXT_LIBBIN) -lccmio
|
||||||
|
|||||||
@ -53,6 +53,7 @@ Description
|
|||||||
#include "fvMeshDistribute.H"
|
#include "fvMeshDistribute.H"
|
||||||
#include "mapDistributePolyMesh.H"
|
#include "mapDistributePolyMesh.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
|
#include "globalIndex.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -107,7 +108,9 @@ autoPtr<fvMesh> createMesh
|
|||||||
fvMesh& mesh = meshPtr();
|
fvMesh& mesh = meshPtr();
|
||||||
|
|
||||||
|
|
||||||
// Determine patches.
|
// Sync patches
|
||||||
|
// ~~~~~~~~~~~~
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// Send patches
|
// Send patches
|
||||||
@ -118,14 +121,14 @@ autoPtr<fvMesh> createMesh
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
OPstream toSlave(Pstream::blocking, slave);
|
OPstream toSlave(Pstream::scheduled, slave);
|
||||||
toSlave << mesh.boundaryMesh();
|
toSlave << mesh.boundaryMesh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Receive patches
|
// Receive patches
|
||||||
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
PtrList<entry> patchEntries(fromMaster);
|
PtrList<entry> patchEntries(fromMaster);
|
||||||
|
|
||||||
if (haveMesh)
|
if (haveMesh)
|
||||||
@ -224,6 +227,58 @@ autoPtr<fvMesh> createMesh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Determine zones
|
||||||
|
// ~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
wordList pointZoneNames(mesh.pointZones().names());
|
||||||
|
Pstream::scatter(pointZoneNames);
|
||||||
|
wordList faceZoneNames(mesh.faceZones().names());
|
||||||
|
Pstream::scatter(faceZoneNames);
|
||||||
|
wordList cellZoneNames(mesh.cellZones().names());
|
||||||
|
Pstream::scatter(cellZoneNames);
|
||||||
|
|
||||||
|
if (!haveMesh)
|
||||||
|
{
|
||||||
|
// Add the zones
|
||||||
|
List<pointZone*> pz(pointZoneNames.size());
|
||||||
|
forAll(pointZoneNames, i)
|
||||||
|
{
|
||||||
|
pz[i] = new pointZone
|
||||||
|
(
|
||||||
|
pointZoneNames[i],
|
||||||
|
labelList(0),
|
||||||
|
i,
|
||||||
|
mesh.pointZones()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
List<faceZone*> fz(faceZoneNames.size());
|
||||||
|
forAll(faceZoneNames, i)
|
||||||
|
{
|
||||||
|
fz[i] = new faceZone
|
||||||
|
(
|
||||||
|
faceZoneNames[i],
|
||||||
|
labelList(0),
|
||||||
|
boolList(0),
|
||||||
|
i,
|
||||||
|
mesh.faceZones()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
List<cellZone*> cz(cellZoneNames.size());
|
||||||
|
forAll(cellZoneNames, i)
|
||||||
|
{
|
||||||
|
cz[i] = new cellZone
|
||||||
|
(
|
||||||
|
cellZoneNames[i],
|
||||||
|
labelList(0),
|
||||||
|
i,
|
||||||
|
mesh.cellZones()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
mesh.addZones(pz, fz, cz);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!haveMesh)
|
if (!haveMesh)
|
||||||
{
|
{
|
||||||
// We created a dummy mesh file above. Delete it.
|
// We created a dummy mesh file above. Delete it.
|
||||||
@ -236,6 +291,21 @@ autoPtr<fvMesh> createMesh
|
|||||||
mesh.clearOut();
|
mesh.clearOut();
|
||||||
mesh.globalData();
|
mesh.globalData();
|
||||||
|
|
||||||
|
|
||||||
|
// Do some checks.
|
||||||
|
|
||||||
|
// Check if the boundary definition is unique
|
||||||
|
mesh.boundaryMesh().checkDefinition(true);
|
||||||
|
// Check if the boundary processor patches are correct
|
||||||
|
mesh.boundaryMesh().checkParallelSync(true);
|
||||||
|
// Check names of zones are equal
|
||||||
|
mesh.cellZones().checkDefinition(true);
|
||||||
|
mesh.cellZones().checkParallelSync(true);
|
||||||
|
mesh.faceZones().checkDefinition(true);
|
||||||
|
mesh.faceZones().checkParallelSync(true);
|
||||||
|
mesh.pointZones().checkDefinition(true);
|
||||||
|
mesh.pointZones().checkParallelSync(true);
|
||||||
|
|
||||||
return meshPtr;
|
return meshPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,6 +362,59 @@ void printMeshData(Ostream& os, const polyMesh& mesh)
|
|||||||
<< " face zones: " << mesh.faceZones().size() << nl
|
<< " face zones: " << mesh.faceZones().size() << nl
|
||||||
<< " cell zones: " << mesh.cellZones().size() << nl;
|
<< " cell zones: " << mesh.cellZones().size() << nl;
|
||||||
}
|
}
|
||||||
|
void printMeshData(const polyMesh& mesh)
|
||||||
|
{
|
||||||
|
// Collect all data on master
|
||||||
|
|
||||||
|
globalIndex globalCells(mesh.nCells());
|
||||||
|
labelListList patchNeiProcNo(Pstream::nProcs());
|
||||||
|
labelListList patchSize(Pstream::nProcs());
|
||||||
|
const labelList& pPatches = mesh.globalData().processorPatches();
|
||||||
|
patchNeiProcNo[Pstream::myProcNo()].setSize(pPatches.size());
|
||||||
|
patchSize[Pstream::myProcNo()].setSize(pPatches.size());
|
||||||
|
forAll(pPatches, i)
|
||||||
|
{
|
||||||
|
const processorPolyPatch& ppp = refCast<const processorPolyPatch>
|
||||||
|
(
|
||||||
|
mesh.boundaryMesh()[pPatches[i]]
|
||||||
|
);
|
||||||
|
patchNeiProcNo[Pstream::myProcNo()][i] = ppp.neighbProcNo();
|
||||||
|
patchSize[Pstream::myProcNo()][i] = ppp.size();
|
||||||
|
}
|
||||||
|
Pstream::gatherList(patchNeiProcNo);
|
||||||
|
Pstream::gatherList(patchSize);
|
||||||
|
|
||||||
|
|
||||||
|
// Print stats
|
||||||
|
|
||||||
|
globalIndex globalBoundaryFaces(mesh.nFaces()-mesh.nInternalFaces());
|
||||||
|
|
||||||
|
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||||
|
{
|
||||||
|
Info<< endl
|
||||||
|
<< "Processor " << procI << nl
|
||||||
|
<< " Number of cells = " << globalCells.localSize(procI)
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
label nProcFaces = 0;
|
||||||
|
|
||||||
|
const labelList& nei = patchNeiProcNo[procI];
|
||||||
|
|
||||||
|
forAll(patchNeiProcNo[procI], i)
|
||||||
|
{
|
||||||
|
Info<< " Number of faces shared with processor "
|
||||||
|
<< patchNeiProcNo[procI][i] << " = " << patchSize[procI][i]
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
nProcFaces += patchSize[procI][i];
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< " Number of processor patches = " << nei.size() << nl
|
||||||
|
<< " Number of processor faces = " << nProcFaces << nl
|
||||||
|
<< " Number of boundary faces = "
|
||||||
|
<< globalBoundaryFaces.localSize(procI) << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Debugging: write volScalarField with decomposition for post processing.
|
// Debugging: write volScalarField with decomposition for post processing.
|
||||||
@ -507,6 +630,7 @@ void compareFields
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
# include "addOverwriteOption.H"
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"mergeTol",
|
"mergeTol",
|
||||||
@ -539,6 +663,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
Info<< "Using mesh subdirectory " << meshSubDir << nl << endl;
|
Info<< "Using mesh subdirectory " << meshSubDir << nl << endl;
|
||||||
|
|
||||||
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
|
|
||||||
// Get time instance directory. Since not all processors have meshes
|
// Get time instance directory. Since not all processors have meshes
|
||||||
// just use the master one everywhere.
|
// just use the master one everywhere.
|
||||||
@ -573,9 +699,11 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
fvMesh& mesh = meshPtr();
|
fvMesh& mesh = meshPtr();
|
||||||
|
|
||||||
Pout<< "Read mesh:" << endl;
|
//Pout<< "Read mesh:" << endl;
|
||||||
printMeshData(Pout, mesh);
|
//printMeshData(Pout, mesh);
|
||||||
Pout<< endl;
|
//Pout<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IOdictionary decompositionDict
|
IOdictionary decompositionDict
|
||||||
(
|
(
|
||||||
@ -618,7 +746,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Dump decomposition to volScalarField
|
// Dump decomposition to volScalarField
|
||||||
writeDecomposition("decomposition", mesh, finalDecomp);
|
if (!overwrite)
|
||||||
|
{
|
||||||
|
writeDecomposition("decomposition", mesh, finalDecomp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create 0 sized mesh to do all the generation of zero sized
|
// Create 0 sized mesh to do all the generation of zero sized
|
||||||
@ -796,12 +927,20 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Print a bit
|
// Print a bit
|
||||||
Pout<< "After distribution mesh:" << endl;
|
// Print some statistics
|
||||||
printMeshData(Pout, mesh);
|
Info<< "After distribution:" << endl;
|
||||||
Pout<< endl;
|
printMeshData(mesh);
|
||||||
|
|
||||||
runTime++;
|
|
||||||
Pout<< "Writing redistributed mesh to " << runTime.timeName() << nl << endl;
|
if (!overwrite)
|
||||||
|
{
|
||||||
|
runTime++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mesh.setInstance(masterInstDir);
|
||||||
|
}
|
||||||
|
Info<< "Writing redistributed mesh to " << runTime.timeName() << nl << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@ EXE_INC = \
|
|||||||
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ltecio \
|
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
-lmeshTools
|
-lmeshTools \
|
||||||
|
-L$(FOAM_EXT_LIBBIN) -ltecio
|
||||||
|
|||||||
@ -13,6 +13,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ensure CMake gets the correct C++ compiler
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
wmake libso vtkPV3Readers
|
wmake libso vtkPV3Readers
|
||||||
PV3blockMeshReader/Allwmake
|
PV3blockMeshReader/Allwmake
|
||||||
PV3FoamReader/Allwmake
|
PV3FoamReader/Allwmake
|
||||||
|
|||||||
@ -14,6 +14,7 @@ INCLUDE(${PARAVIEW_USE_FILE})
|
|||||||
|
|
||||||
LINK_DIRECTORIES(
|
LINK_DIRECTORIES(
|
||||||
$ENV{FOAM_LIBBIN}
|
$ENV{FOAM_LIBBIN}
|
||||||
|
$ENV{FOAM_EXT_LIBBIN}
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
|
|||||||
@ -9,4 +9,4 @@ vtkPV3FoamMeshZone.C
|
|||||||
vtkPV3FoamUpdateInfo.C
|
vtkPV3FoamUpdateInfo.C
|
||||||
vtkPV3FoamUtils.C
|
vtkPV3FoamUtils.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libvtkPV3Foam
|
LIB = $(FOAM_EXT_LIBBIN)/libvtkPV3Foam
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* Note: enable vtkPolyhedron when available */
|
/* Note: enable vtkPolyhedron when available */
|
||||||
|
|
||||||
PARAVIEW_INC=$(ParaView_DIR)/include/paraview-$(ParaView_MAJOR)
|
PARAVIEW_INC = $(ParaView_DIR)/include/paraview-$(ParaView_MAJOR)
|
||||||
|
|
||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
@ -15,9 +15,9 @@ EXE_INC = \
|
|||||||
)
|
)
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lvtkPV3Readers \
|
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
|
-L$(FOAM_EXT_LIBBIN) -lvtkPV3Readers \
|
||||||
$(GLIBS)
|
$(GLIBS)
|
||||||
|
|||||||
@ -14,6 +14,7 @@ INCLUDE(${PARAVIEW_USE_FILE})
|
|||||||
|
|
||||||
LINK_DIRECTORIES(
|
LINK_DIRECTORIES(
|
||||||
$ENV{FOAM_LIBBIN}
|
$ENV{FOAM_LIBBIN}
|
||||||
|
$ENV{FOAM_EXT_LIBBIN}
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
@ -36,7 +37,8 @@ SET(
|
|||||||
#
|
#
|
||||||
# Define combined plugin
|
# Define combined plugin
|
||||||
#
|
#
|
||||||
# Try to extend the auto-generated panel
|
|
||||||
|
# Extend the auto-generated panel
|
||||||
QT4_WRAP_CPP(MOC_SRCS pqPV3blockMeshReaderPanel.h)
|
QT4_WRAP_CPP(MOC_SRCS pqPV3blockMeshReaderPanel.h)
|
||||||
|
|
||||||
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
|
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
|
||||||
|
|||||||
@ -2,4 +2,4 @@ vtkPV3blockMesh.C
|
|||||||
vtkPV3blockMeshConvert.C
|
vtkPV3blockMeshConvert.C
|
||||||
vtkPV3blockMeshUtils.C
|
vtkPV3blockMeshUtils.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libvtkPV3blockMesh
|
LIB = $(FOAM_EXT_LIBBIN)/libvtkPV3blockMesh
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
|
PARAVIEW_INC = $(ParaView_DIR)/include/paraview-$(ParaView_MAJOR)
|
||||||
|
|
||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
|
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
|
||||||
-I$(ParaView_DIR)/include/paraview-$(ParaView_MAJOR) \
|
-I$(PARAVIEW_INC) \
|
||||||
-I../../vtkPV3Readers/lnInclude \
|
-I../../vtkPV3Readers/lnInclude \
|
||||||
-I../PV3blockMeshReader
|
-I../PV3blockMeshReader
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lvtkPV3Readers \
|
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lblockMesh \
|
-lblockMesh \
|
||||||
|
-L$(FOAM_EXT_LIBBIN) -lvtkPV3Readers \
|
||||||
$(GLIBS)
|
$(GLIBS)
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
vtkPV3Readers.C
|
vtkPV3Readers.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libvtkPV3Readers
|
LIB = $(FOAM_EXT_LIBBIN)/libvtkPV3Readers
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
|
PARAVIEW_INC = $(ParaView_DIR)/include/paraview-$(ParaView_MAJOR)
|
||||||
|
|
||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(ParaView_DIR)/include/paraview-$(ParaView_MAJOR)
|
-I$(PARAVIEW_INC)
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
$(GLIBS)
|
$(GLIBS)
|
||||||
|
|||||||
@ -392,13 +392,17 @@ int main(int argc, char *argv[])
|
|||||||
problemFaces.append(faceI);
|
problemFaces.append(faceI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OFstream str("badFaces");
|
|
||||||
|
|
||||||
Info<< "Dumping bad quality faces to " << str.name() << endl
|
if (!problemFaces.empty())
|
||||||
<< "Paste this into the input for surfaceSubset" << nl
|
{
|
||||||
<< nl << endl;
|
OFstream str("badFaces");
|
||||||
|
|
||||||
str << problemFaces;
|
Info<< "Dumping bad quality faces to " << str.name() << endl
|
||||||
|
<< "Paste this into the input for surfaceSubset" << nl
|
||||||
|
<< nl << endl;
|
||||||
|
|
||||||
|
str << problemFaces;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,60 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#---------------------------------*- sh -*-------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Script
|
|
||||||
# foamBinDirs <packDir> <arch>
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Returns all directories containing binary files of OpenFOAM
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
if [ $# -ne 2 ]
|
|
||||||
then
|
|
||||||
echo "Error: architecture type expected, exiting"
|
|
||||||
echo
|
|
||||||
echo "Usage : ${0##*/} <packDir> <arch>"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
packDir=$1
|
|
||||||
arch=$2
|
|
||||||
|
|
||||||
# base arch (w/o precision, optimization, etc)
|
|
||||||
baseArch=$(echo "$arch" | sed -e 's@[DS]P.*$@@')
|
|
||||||
|
|
||||||
# get list of directories
|
|
||||||
(
|
|
||||||
for dir in \
|
|
||||||
$packDir/lib/$arch \
|
|
||||||
$packDir/applications/bin/$arch \
|
|
||||||
$packDir/wmake/rules \
|
|
||||||
$packDir/wmake/bin/$baseArch \
|
|
||||||
;
|
|
||||||
do
|
|
||||||
[ -d $dir ] && echo $dir
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
123
bin/foamPack
123
bin/foamPack
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#---------------------------------*- sh -*-------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -23,47 +23,102 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# foamPack [outputDir]
|
# foamPack [OPTION]
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Packs and compresses the OpenFOAM directory for release
|
# Pack and compress the OpenFOAM directory for release
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
timeStamp=$(date +%Y-%m-%d)
|
|
||||||
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||||
packFile=${packDir}_${timeStamp}.gtgz
|
toolsDir="${0%/*}/tools" # this script is located in the tools/ parent dir
|
||||||
|
|
||||||
if [ ! -d $packDir ]
|
usage() {
|
||||||
then
|
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||||
echo "Error: directory $packDir does not exist"
|
cat <<USAGE 1>&2
|
||||||
|
Usage: ${0##*/} [OPTION]
|
||||||
|
options:
|
||||||
|
-o <dir> specify alternative output directory
|
||||||
|
-nogit bypass using 'git archive'
|
||||||
|
|
||||||
|
* Pack and compress OpenFOAM directory for release
|
||||||
|
|
||||||
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
# add optional output directory
|
unset prefix outputDir nogit
|
||||||
if [ -d "$1" ]
|
# parse options
|
||||||
then
|
while [ "$#" -gt 0 ]
|
||||||
packFile="$1/$packFile"
|
do
|
||||||
fi
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
-nogit)
|
||||||
|
nogit=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-o | -output)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
|
outputDir=${2%%/}
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
usage "unknown option: '$*'"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
if [ -f $packFile ]
|
# check for essential directories
|
||||||
then
|
for dir in $packDir
|
||||||
echo "Error: $packFile already exists"
|
do
|
||||||
exit 1
|
[ -d $dir ] || {
|
||||||
fi
|
echo "Error: directory $dir does not exist" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
# Create time stamp file
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
#------------------------------------------------------------------------------
|
||||||
|
timeStamp=$(date +%Y-%m-%d)
|
||||||
echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
packExt=tgz
|
||||||
|
packBase=${packDir}_${timeStamp}
|
||||||
# Pack and compress the packFile
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# add optional output directory
|
||||||
|
[ -d "$outputDir" ] && packBase="$outputDir/$packBase"
|
||||||
echo
|
packFile=$packBase.$packExt
|
||||||
echo "Packing $packDir source files into $packFile"
|
|
||||||
echo
|
# avoid overwriting old pack file
|
||||||
|
if [ -f $packFile ]
|
||||||
foamPackSource $packDir $packFile
|
then
|
||||||
|
echo "Error: $packFile already exists" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# add time-stamp file before packing
|
||||||
|
echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
||||||
|
|
||||||
|
# check for git (program and .git directory)
|
||||||
|
(cd $packDir && git branch) > /dev/null 2>&1 || nogit=true
|
||||||
|
|
||||||
|
if [ "$nogit" = true ]
|
||||||
|
then
|
||||||
|
echo "pack manually" 1>&2
|
||||||
|
$toolsDir/foamPackSource $packDir $packFile
|
||||||
|
else
|
||||||
|
echo "pack with git-archive" 1>&2
|
||||||
|
( cd $packDir && git archive --format=tar --prefix=$packDir/ HEAD) > $packBase.tar
|
||||||
|
|
||||||
|
echo "add in time-stamp and lnInclude directories" 1>&2
|
||||||
|
tar cf $packBase.tar2 $packDir/.timeStamp $packDir/.build `find -H $packDir -type d -name lnInclude`
|
||||||
|
tar Af $packBase.tar $packBase.tar2
|
||||||
|
|
||||||
|
echo "gzip tar file" 1>&2
|
||||||
|
gzip -c9 $packBase.tar > $packFile
|
||||||
|
rm -f $packBase.tar $packBase.tar2 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
139
bin/foamPackBin
139
bin/foamPackBin
@ -3,7 +3,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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -23,66 +23,119 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# foamPackBin <arch> [outputDir]
|
# foamPackBin [OPTION] <archOptions>
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Packs and compresses binary version of OpenFOAM for release
|
# Pack and compress binary version of OpenFOAM for release
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# foamPackThirdPartyBin [OPTION] <archOptions>
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Pack and compress binary version of OpenFOAM ThirdParty for release
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
toolsDir="${0%/*}/tools" # this script is located in the tools/ parent dir
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
case "${0##*/}" in
|
||||||
then
|
*ThirdParty*)
|
||||||
echo "Error: architecture type expected, exiting"
|
# for ThirdParty
|
||||||
echo
|
codeBase="OpenFOAM ThirdParty"
|
||||||
echo "Usage : ${0##*/} <arch> [outputDir]"
|
packDir=ThirdParty-$WM_PROJECT_VERSION
|
||||||
echo
|
listBinDirs=$toolsDir/foamListThirdPartyBinDirs
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# regular
|
||||||
|
codeBase="OpenFOAM ThirdParty"
|
||||||
|
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||||
|
listBinDirs=$toolsDir/foamListBinDirs
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||||
|
cat <<USAGE 1>&2
|
||||||
|
Usage: ${0##*/} [OPTION] <archOptions>
|
||||||
|
options:
|
||||||
|
-o <dir> specify alternative output directory
|
||||||
|
|
||||||
|
* Pack and compress binary version of $codeBase for release
|
||||||
|
|
||||||
|
The value of 'archOptions' normally corresponds to \$WM_OPTIONS
|
||||||
|
The current value of \$WM_OPTIONS = $WM_OPTIONS
|
||||||
|
|
||||||
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
arch=$1
|
|
||||||
|
|
||||||
# base arch (w/o precision, optimization, etc)
|
|
||||||
baseArch=$(echo "$arch" | sed -e 's@[DS]P.*$@@')
|
|
||||||
|
|
||||||
timeStamp=$(date +%Y-%m-%d)
|
unset prefix outputDir
|
||||||
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
# parse options
|
||||||
packFile=${packDir}.${arch}_${timeStamp}.gtgz
|
while [ "$#" -gt 0 ]
|
||||||
|
|
||||||
# add optional output directory
|
|
||||||
if [ -d "$2" ]
|
|
||||||
then
|
|
||||||
packFile="$2/$packFile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f $packFile ]
|
|
||||||
then
|
|
||||||
echo "Error: $packFile already exists"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check for essential directories
|
|
||||||
for dir in $packDir $packDir/lib/$arch $packDir/applications/bin/$arch
|
|
||||||
do
|
do
|
||||||
if [ ! -d $dir ]
|
case "$1" in
|
||||||
then
|
-h | -help)
|
||||||
echo "Error: directory $dir does not exist"
|
usage
|
||||||
exit 1
|
;;
|
||||||
fi
|
-o | -output)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
|
outputDir=${2%%/}
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
usage "unknown option: '$*'"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ $# -eq 1 ] || usage "Error: specify architecture"
|
||||||
|
|
||||||
|
# same as $WM_OPTIONS - eg, 'linux64GccDPOpt'
|
||||||
|
archOptions="$1"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
timeStamp=$(date +%Y-%m-%d)
|
||||||
|
packExt=tgz
|
||||||
|
packBase=${packDir}.${archOptions}_${timeStamp}
|
||||||
|
|
||||||
|
# add optional output directory
|
||||||
|
[ -d "$outputDir" ] && packBase="$outputDir/$packBase"
|
||||||
|
packFile=$packBase.$packExt
|
||||||
|
|
||||||
|
# avoid overwriting old pack file
|
||||||
|
if [ -f $packFile ]
|
||||||
|
then
|
||||||
|
echo "Error: $packFile already exists" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# get list of directories
|
# get list of directories
|
||||||
dirList=`foamBinDirs $packDir $arch`
|
dirList=$( $listBinDirs $packDir $archOptions )
|
||||||
|
if [ $? -eq 0 -a -n "$dirList" ]
|
||||||
|
then
|
||||||
|
echo "Pack into $packFile" 1>&2
|
||||||
|
echo 1>&2
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Packing $arch ($baseArch) port of $packDir into $packFile"
|
|
||||||
echo
|
|
||||||
|
|
||||||
tar czpf $packFile $dirList
|
# Clean up on Ctrl-C
|
||||||
|
trap 'rm -f $packFile 2>/dev/null' INT
|
||||||
|
|
||||||
|
tar cpzf $packFile $dirList
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing and compressing file $packFile"
|
echo "Finished packing file $packFile" 1>&2
|
||||||
else
|
else
|
||||||
echo "Error: failure packing $packFile"
|
echo "Error: failure packing $packFile" 1>&2
|
||||||
rm -f $packFile 2>/dev/null
|
rm -f $packFile 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -23,24 +23,44 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# foamPackBinAll [outputDir]
|
# foamPackBinAll [OPTION]
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Packs and compresses all binary versions of foam for release
|
# Pack and compress all binary versions of OpenFOAM for release
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# foamPackThirdPartyBinAll [OPTION]
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Pack and compress all binary versions of OpenFOAM ThirdParty for release
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
binDir="${0%/*}" # this script is located in the bin/ dir
|
||||||
|
|
||||||
if [ ! -d $packDir ]
|
case "${0##*/}" in
|
||||||
then
|
*ThirdParty*)
|
||||||
echo "Error: directory $packDir does not exist"
|
# for ThirdParty
|
||||||
|
packDir=ThirdParty-$WM_PROJECT_VERSION
|
||||||
|
packBin=foamPackThirdPartyBin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# regular
|
||||||
|
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||||
|
packBin=foamPackBin
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
[ -d $packDir ] || {
|
||||||
|
echo "Error: directory $packDir does not exist" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
# obtain arch types from lib/
|
|
||||||
for bin in $packDir/lib/*
|
# obtain archOptions types from lib/
|
||||||
|
for archOptions in $packDir/lib/*
|
||||||
do
|
do
|
||||||
foamPackBin ${bin##*/} $@
|
$binDir/$packBin $@ ${archOptions##*/}
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -3,7 +3,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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -26,39 +26,44 @@
|
|||||||
# foamPackDoxygen [-prefix DIR] [-o outputDir]
|
# foamPackDoxygen [-prefix DIR] [-o outputDir]
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Packs and compresses the OpenFOAM doxygen html for release
|
# Pack and compress the OpenFOAM doxygen html for release
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||||
packTag=_Doxygen.gtgz
|
htmlDir=doc/Doxygen/html
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||||
cat <<USAGE 1>&2
|
cat <<USAGE 1>&2
|
||||||
Usage: ${0##*/} [-prefix DIR] [-o outputDir]
|
Usage: ${0##*/} [OPTION]
|
||||||
|
options:
|
||||||
|
-prefix <dir> use alternative prefix
|
||||||
|
-o <dir> specify alternative output directory
|
||||||
|
|
||||||
Packs and compresses the OpenFOAM doxygen html for release
|
* Pack and compress the OpenFOAM doxygen html for release
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
unset prefix outputDir
|
unset prefix outputDir
|
||||||
|
# parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
-prefix | --prefix )
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
-prefix | --prefix)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
prefix=${2%%/}
|
prefix=${2%%/}
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-o | -output )
|
-o | -output)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
outputDir=${2%%/}
|
outputDir=${2%%/}
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-h | -help )
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
-*)
|
-*)
|
||||||
usage "unknown option: '$*'"
|
usage "unknown option: '$*'"
|
||||||
;;
|
;;
|
||||||
@ -81,41 +86,44 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#------------------------------------------------------------------------------
|
||||||
|
packExt=tgz
|
||||||
|
packName=${packDir}_Doxygen
|
||||||
|
|
||||||
# add optional output directory
|
# add optional output directory
|
||||||
#
|
[ -d "$outputDir" ] && packName="$outputDir/$packName"
|
||||||
if [ -d "$outputDir" ]
|
packFile=$packName.$packExt
|
||||||
then
|
|
||||||
packFile="$outputDir/$packDir$packTag"
|
|
||||||
else
|
|
||||||
packFile="$packDir$packTag"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [ -f $packFile ]
|
if [ -f $packFile ]
|
||||||
then
|
then
|
||||||
echo "Error: $packFile already exists"
|
echo "Error: $packFile already exists" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pack and compress the packFile using GNU tar
|
cat <<INFO 1>&2
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
-------------------------------------------------------------------------------
|
||||||
echo
|
Packing doxygen html into $packFile
|
||||||
echo "Packing doxygen html into $packFile"
|
|
||||||
echo
|
INFO
|
||||||
|
|
||||||
|
# Clean up on Ctrl-C
|
||||||
|
trap 'rm -f $packFile 2>/dev/null' INT
|
||||||
|
|
||||||
if [ -n "$prefix" ]
|
if [ -n "$prefix" ]
|
||||||
then
|
then
|
||||||
tar czpf $packFile --transform="s@^@$prefix/@" doc/Doxygen/html
|
# requires GNU tar
|
||||||
|
tar cpzf $packFile --transform="s@^@$prefix/@" $htmlDir
|
||||||
else
|
else
|
||||||
tar czpf $packFile $packDir/doc/Doxygen/html
|
tar cpzf $packFile $packDir/$htmlDir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing doxygen html into file $packFile"
|
echo "Finished packing doxygen html into file $packFile" 1>&2
|
||||||
else
|
else
|
||||||
echo "Error: failure packing doxygen html file $packFile"
|
echo "Error: failure packing doxygen html file $packFile" 1>&2
|
||||||
|
rm -f $packFile 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#---------------------------------*- sh -*-------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -23,48 +23,86 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# foamPackThirdParty [outputDir]
|
# foamPackThirdParty [OPTION]
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Packs and compresses the OpenFOAM ThirdParty directory for release
|
# Pack and compress the OpenFOAM ThirdParty directory for release
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
packDir=ThirdParty-$WM_PROJECT_VERSION
|
||||||
|
toolsDir="${0%/*}/tools" # this script is located in the tools/ parent dir
|
||||||
|
|
||||||
timeStamp=$(date +%Y-%m-%d)
|
usage() {
|
||||||
packDir=${WM_THIRD_PARTY_DIR:-ThirdParty}
|
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||||
packDir=${packDir##*/}
|
cat <<USAGE 1>&2
|
||||||
packFile=${packDir}_${timeStamp}.gtgz
|
Usage: ${0##*/} [OPTION]
|
||||||
|
options:
|
||||||
|
-o <dir> specify alternative output directory
|
||||||
|
|
||||||
if [ ! -d $packDir ]
|
* Pack and compress ThirdParty directory for release
|
||||||
then
|
|
||||||
echo "Error: directory $packDir does not exist"
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
unset prefix outputDir nogit
|
||||||
|
# parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
-nogit)
|
||||||
|
nogit=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-o | -output)
|
||||||
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
|
outputDir=${2%%/}
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
usage "unknown option: '$*'"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# check for essential directories
|
||||||
|
for dir in $packDir
|
||||||
|
do
|
||||||
|
[ -d $dir ] || {
|
||||||
|
echo "Error: directory $dir does not exist" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
timeStamp=$(date +%Y-%m-%d)
|
||||||
|
packExt=tgz
|
||||||
|
packBase=${packDir}_${timeStamp}
|
||||||
|
|
||||||
# add optional output directory
|
# add optional output directory
|
||||||
if [ -d "$1" ]
|
[ -d "$outputDir" ] && packBase="$outputDir/$packBase"
|
||||||
then
|
packFile=$packBase.$packExt
|
||||||
packFile="$1/$packFile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
# avoid overwriting old pack file
|
||||||
if [ -f $packFile ]
|
if [ -f $packFile ]
|
||||||
then
|
then
|
||||||
echo "Error: $packFile already exists"
|
echo "Error: $packFile already exists"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create time stamp file
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
# add time-stamp file before packing
|
||||||
|
echo $timeStamp 2>/dev/null > $packDir/.timeStamp
|
||||||
# Pack and compress the packFile
|
echo "pack manually" 1>&2
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
$toolsDir/foamPackSource $packDir $packFile
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Packing $packDir source files into $packFile"
|
|
||||||
echo
|
|
||||||
|
|
||||||
foamPackSource $packDir $packFile
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,88 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Script
|
|
||||||
# foamPackThirdPartyBin <archOptions> [outputDir]
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Packs and compresses binary version of OpenFOAM ThirdParty for release
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "Error: archOptions type expected, exiting"
|
|
||||||
echo
|
|
||||||
echo "Usage : ${0##*/} <archOptions> [outputDir]"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
archOptions=$1
|
|
||||||
arch=${archOptions%%G*} # TODO: works for Gcc only
|
|
||||||
arch3264=$(echo "$arch" | sed -e 's@64@-64@')
|
|
||||||
|
|
||||||
echo "archOptions=$archOptions"
|
|
||||||
echo "arch=$arch"
|
|
||||||
echo "arch3264=$arch3264"
|
|
||||||
|
|
||||||
timeStamp=$(date +%Y-%m-%d)
|
|
||||||
packDir=${WM_THIRD_PARTY_DIR:-ThirdParty}
|
|
||||||
packDir=${packDir##*/}
|
|
||||||
packFile=${packDir}.${archOptions}_${timeStamp}.gtgz
|
|
||||||
|
|
||||||
if [ ! -d $packDir ]
|
|
||||||
then
|
|
||||||
echo "Error: directory $packDir does not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# add optional output directory
|
|
||||||
if [ -d "$2" ]
|
|
||||||
then
|
|
||||||
packFile="$2/$packFile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f $packFile ]
|
|
||||||
then
|
|
||||||
echo "Error: $packFile already exists"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# get list of directories
|
|
||||||
dirList=`find $packDir -type d -name $arch -o -type d -name $archOptions'*' -o -type l -name $arch3264`
|
|
||||||
echo
|
|
||||||
echo "Packing $archOptions port of $packDir into $packFile"
|
|
||||||
echo
|
|
||||||
|
|
||||||
tar czpf $packFile $dirList
|
|
||||||
|
|
||||||
if [ $? -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "Finished packing and compressing file $packFile"
|
|
||||||
else
|
|
||||||
echo "Error: failure packing $packFile"
|
|
||||||
rm -f $packFile 2>/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
1
bin/foamPackThirdPartyBin
Symbolic link
1
bin/foamPackThirdPartyBin
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
foamPackBin
|
||||||
1
bin/foamPackThirdPartyBinAll
Symbolic link
1
bin/foamPackThirdPartyBinAll
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
foamPackBinAll
|
||||||
@ -1,81 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#---------------------------------*- sh -*-------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Script
|
|
||||||
# foamSourceFiles <directory>
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Returns all the .C and .H files and Make/options
|
|
||||||
# and Make/files in a given directory.
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
if [ $# -ne 1 ]
|
|
||||||
then
|
|
||||||
echo "Usage : ${0##*/} directory"
|
|
||||||
echo ""
|
|
||||||
echo "Returns all .C and .H files and Make/options and Make/files."
|
|
||||||
echo ""
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# canonical form (no double and no trailing dashes)
|
|
||||||
packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
|
|
||||||
|
|
||||||
if [ ! -d $packDir ]
|
|
||||||
then
|
|
||||||
echo "Error: directory $packDir does not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
find -H $packDir \
|
|
||||||
! -type d \
|
|
||||||
\( -type f -o -type l \) \
|
|
||||||
! -name "*~" \
|
|
||||||
-a ! -name ".*~" \
|
|
||||||
-a ! -name "*.orig" \
|
|
||||||
-a ! -name "*.dep" \
|
|
||||||
-a ! -name "*.o" \
|
|
||||||
-a ! -name "*.so" \
|
|
||||||
-a ! -name "*.a" \
|
|
||||||
-a ! -name "*.tgz" \
|
|
||||||
-a ! -name "core" \
|
|
||||||
-a ! -name "core.[1-9]*" \
|
|
||||||
-a ! -name "libccmio*" \
|
|
||||||
| sed \
|
|
||||||
-e "\@$packDir/lib/@d" \
|
|
||||||
-e '\@/\.git/@d' \
|
|
||||||
-e '\@/\.gitignore@d' \
|
|
||||||
-e '\@/\.tags/@d' \
|
|
||||||
-e '\@/\README\.org@d' \
|
|
||||||
-e '\@applications/bin/@d' \
|
|
||||||
-e '\@wmake/bin/@d' \
|
|
||||||
-e '\@/t/@d' \
|
|
||||||
-e '\@/Make[.A-Za-z]*/[^/]*/@d'\
|
|
||||||
-e '\@/platforms/@d' \
|
|
||||||
-e '\@/download/@d' \
|
|
||||||
-e '\@/libccmio-.*/@d' \
|
|
||||||
-e '\@/debian/@d'
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
@ -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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -25,7 +25,7 @@
|
|||||||
# CleanFunctions
|
# CleanFunctions
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
#
|
# Miscellaneous cleanup functions for tutorial cases
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#cleanTimeDirectories()
|
#cleanTimeDirectories()
|
||||||
@ -46,15 +46,12 @@
|
|||||||
cleanTimeDirectories()
|
cleanTimeDirectories()
|
||||||
{
|
{
|
||||||
echo "Cleaning $PWD case"
|
echo "Cleaning $PWD case"
|
||||||
nZeros=0
|
|
||||||
zeros=""
|
zeros=""
|
||||||
while [ $nZeros -lt 8 ]
|
while [ ${#zeros} -lt 8 ]
|
||||||
do
|
do
|
||||||
timeDir="0.${zeros}[1-9]*"
|
timeDir="0.${zeros}[1-9]*"
|
||||||
rm -rf ${timeDir} > /dev/null 2>&1
|
rm -rf ./${timeDir} ./-${timeDir} > /dev/null 2>&1
|
||||||
rm -rf ./-${timeDir} > /dev/null 2>&1
|
zeros="0$zeros"
|
||||||
zeros=`printf %0${nZeros}d 0`
|
|
||||||
nZeros=$(($nZeros + 1))
|
|
||||||
done
|
done
|
||||||
rm -rf ./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* ./.fxLock ./*.xml ./ParaView* ./paraFoam* ./*.OpenFOAM > /dev/null 2>&1
|
rm -rf ./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* ./.fxLock ./*.xml ./ParaView* ./paraFoam* ./*.OpenFOAM > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -25,23 +25,23 @@
|
|||||||
# RunFunctions
|
# RunFunctions
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
#
|
# Miscellaneous functions for running tutorial cases
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
getApplication()
|
getApplication()
|
||||||
{
|
{
|
||||||
grep application system/controlDict | sed "s/application *\([a-zA-Z]*\);/\1/"
|
sed -ne 's/^ *application *\([a-zA-Z]*\) *;.*$/\1/p' system/controlDict
|
||||||
}
|
}
|
||||||
|
|
||||||
runApplication()
|
runApplication()
|
||||||
{
|
{
|
||||||
APP_RUN=$1
|
APP_RUN=$1
|
||||||
|
APP_NAME=${1##*/}
|
||||||
shift
|
shift
|
||||||
APP_NAME=${APP_RUN##*/}
|
|
||||||
|
|
||||||
if [ -f log.$APP_NAME ]
|
if [ -f log.$APP_NAME ]
|
||||||
then
|
then
|
||||||
echo "$APP_NAME already run on $PWD: remove log file to run"
|
echo "$APP_NAME already run on $PWD: remove log file to re-run"
|
||||||
else
|
else
|
||||||
echo "Running $APP_RUN on $PWD"
|
echo "Running $APP_RUN on $PWD"
|
||||||
$APP_RUN $* > log.$APP_NAME 2>&1
|
$APP_RUN $* > log.$APP_NAME 2>&1
|
||||||
@ -51,16 +51,17 @@ runApplication()
|
|||||||
runParallel()
|
runParallel()
|
||||||
{
|
{
|
||||||
APP_RUN=$1
|
APP_RUN=$1
|
||||||
|
APP_NAME=${1##*/}
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if [ -f $log.$APP_RUN ]
|
if [ -f log.$APP_NAME ]
|
||||||
then
|
then
|
||||||
echo "$APP_RUN already run on $PWD: remove log file to run"
|
echo "$APP_NAME already run on $PWD: remove log file to re-run"
|
||||||
else
|
else
|
||||||
nProcs=$1
|
nProcs=$1
|
||||||
shift
|
shift
|
||||||
echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"
|
echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"
|
||||||
( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_RUN 2>&1 )
|
( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -50,15 +50,30 @@ USAGE
|
|||||||
# inlineSed <file> <sedCommand> <description>
|
# inlineSed <file> <sedCommand> <description>
|
||||||
_inlineSed()
|
_inlineSed()
|
||||||
{
|
{
|
||||||
backup=`tempfile`
|
[ -f "$1" ] || {
|
||||||
|
echo "Missing file: $1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
backup="temp.$$"
|
||||||
cp $1 $backup
|
cp $1 $backup
|
||||||
sed -i -e "$2" $1
|
sed -i -e "$2" $1
|
||||||
cmp --quiet $1 $backup && usage "Failed : $3"
|
|
||||||
|
if cmp $1 $backup > /dev/null 2>&1
|
||||||
|
then
|
||||||
|
echo "Failed: $3 in $1"
|
||||||
|
rm $backup 2>/dev/null
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Okay: $3 in $1"
|
||||||
|
rm $backup 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[ -f etc/bashrc -a -f etc/settings.sh ] || usage "Please run from top-level directory of installation"
|
[ -f etc/bashrc ] || usage "Please run from top-level directory of installation"
|
||||||
|
|
||||||
unset foamInstall projectName archOption paraviewInstall
|
unset foamInstall projectName archOption paraviewInstall
|
||||||
|
|
||||||
@ -66,43 +81,47 @@ unset foamInstall projectName archOption paraviewInstall
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | --help)
|
-h | -help | --help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
--foamInstall)
|
-foamInstall | --foamInstall)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
foamInstall="$2"
|
foamInstall="$2"
|
||||||
|
# replace foamInstall=...
|
||||||
_inlineSed \
|
_inlineSed \
|
||||||
etc/bashrc \
|
etc/bashrc \
|
||||||
'/^[^#]/s@foamInstall=.*@foamInstall='"$foamInstall@" \
|
'/^[^#]/s@foamInstall=.*@foamInstall='"$foamInstall@" \
|
||||||
"Replacing foamInstall setting by $foamInstall"
|
"Replacing foamInstall setting by '$foamInstall'"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--projectName)
|
-projectName | --projectName)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
projectName="$2"
|
projectName="$2"
|
||||||
|
# replace WM_PROJECT_DIR=...
|
||||||
_inlineSed \
|
_inlineSed \
|
||||||
etc/bashrc \
|
etc/bashrc \
|
||||||
'/^[^#]/s@WM_PROJECT_DIR=.*@WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/'"$projectName@" \
|
'/^[^#]/s@WM_PROJECT_DIR=.*@WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/'"$projectName@" \
|
||||||
"Replacing WM_PROJECT_DIR setting by $projectName"
|
"Replacing WM_PROJECT_DIR setting by '$projectName'"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--archOption)
|
-archOption | --archOption)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
archOption="$2"
|
archOption="$2"
|
||||||
|
# replace WM_ARCH_OPTION=...
|
||||||
_inlineSed \
|
_inlineSed \
|
||||||
etc/bashrc \
|
etc/bashrc \
|
||||||
'/^[^#]/s@: ${WM_ARCH_OPTION:=64}@WM_ARCH_OPTION='"$archOption@" \
|
'/^[^#]/s@WM_ARCH_OPTION=.*@WM_ARCH_OPTION='"$archOption@" \
|
||||||
"Replacing WM_ARCH_OPTION setting by $archOption"
|
"Replacing WM_ARCH_OPTION setting by '$archOption'"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--paraviewInstall)
|
-paraviewInstall | --paraviewInstall)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||||
paraviewInstall="$2"
|
paraviewInstall="$2"
|
||||||
|
# replace ParaView_DIR=...
|
||||||
_inlineSed \
|
_inlineSed \
|
||||||
etc/apps/paraview3/bashrc \
|
etc/apps/paraview3/bashrc \
|
||||||
'/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" \
|
'/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" \
|
||||||
"Replacing ParaView_DIR setting by $paraviewInstall"
|
"Replacing ParaView_DIR setting by '$paraviewInstall'"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -113,18 +132,19 @@ done
|
|||||||
|
|
||||||
[ -n "$foamInstall" -o -n "$projectName" -o -n "$archOption" -o -n "$paraviewInstall" ] || usage "Please specify at least one configure option"
|
[ -n "$foamInstall" -o -n "$projectName" -o -n "$archOption" -o -n "$paraviewInstall" ] || usage "Please specify at least one configure option"
|
||||||
|
|
||||||
#echo "Replacing WM_PROJECT setting by $projectName"
|
#echo "Replacing WM_PROJECT setting by '$projectName'"
|
||||||
#sed -i -e 's@WM_PROJECT=.*@WM_PROJECT='"$projectName@" etc/bashrc
|
#sed -i -e 's@WM_PROJECT=.*@WM_PROJECT='"$projectName@" etc/bashrc
|
||||||
|
|
||||||
# Replace the WM_MPLIB always
|
# Set WM_MPLIB=SYSTEMOPENMPI always
|
||||||
_inlineSed \
|
_inlineSed \
|
||||||
etc/bashrc \
|
etc/bashrc \
|
||||||
'/^[^#]/s@: ${WM_MPLIB:=.*}@WM_MPLIB=SYSTEMOPENMPI@' \
|
'/^[^#]/s@export WM_MPLIB=.*@export WM_MPLIB=SYSTEMOPENMPI@' \
|
||||||
"Replacing WM_MPLIB setting by SYSTEMOPENMPI"
|
"Replacing WM_MPLIB setting by 'SYSTEMOPENMPI'"
|
||||||
# Replace the compilerInstall always
|
|
||||||
|
# set foamCompiler=system always
|
||||||
_inlineSed \
|
_inlineSed \
|
||||||
etc/settings.sh \
|
etc/bashrc \
|
||||||
'/^[^#]/s@: ${compilerInstall:=.*}@compilerInstall=system@' \
|
'/^[^#]/s@foamCompiler=.*@foamCompiler=system@' \
|
||||||
"Replacing compilerInstall setting by system"
|
"Replacing foamCompiler setting by 'system'"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
121
bin/tools/foamListBinDirs
Executable file
121
bin/tools/foamListBinDirs
Executable file
@ -0,0 +1,121 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# foamListBinDirs <directory> <archOptions>
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Lists directories containing binary files of OpenFOAM
|
||||||
|
#
|
||||||
|
# Note
|
||||||
|
# Not normally called directly by the user.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
toolsDir="${0%/*}" # this script is already located in the tools/ directory
|
||||||
|
|
||||||
|
[ $# -eq 2 ] || {
|
||||||
|
cat <<USAGE 1>&2
|
||||||
|
Usage : ${0##*/} <packDir> <archOptions>
|
||||||
|
|
||||||
|
* Lists directories containing binary files for OpenFOAM
|
||||||
|
|
||||||
|
The value of 'archOptions' normally corresponds to \$WM_OPTIONS
|
||||||
|
The current value of \$WM_OPTIONS = $WM_OPTIONS
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
packDir="$1"
|
||||||
|
|
||||||
|
# same as $WM_OPTIONS - eg, 'linux64GccDPOpt'
|
||||||
|
archOptions="$2"
|
||||||
|
|
||||||
|
# base arch (w/o precision, optimization, etc)
|
||||||
|
# same as "$WM_ARCH$WM_COMPILER"
|
||||||
|
archCompiler=$(echo "$archOptions" | sed -e 's@[DS]P.*$@@')
|
||||||
|
|
||||||
|
# same as $WM_ARCH - eg, 'linux64'
|
||||||
|
# TODO: only works for Gcc, Icc, Clang
|
||||||
|
archOS=$(echo "$archOptions" | sed -e 's@[GI]cc.*$@@' -e 's@Clang.*$@@')
|
||||||
|
|
||||||
|
# links for 32-bit version, eg convert linux64 -> linux-64
|
||||||
|
arch3264=$(echo "$archOS" | sed -e 's@64@-64@')
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# check for essential directories
|
||||||
|
for dir in $packDir $packDir/lib/$archOptions
|
||||||
|
do
|
||||||
|
[ -d $dir ] || {
|
||||||
|
echo "Error: directory $dir does not exist" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
|
# check new/old places for executables - same as $FOAM_APPBIN
|
||||||
|
[ -d $packDir/bin/$archOptions -o -d $packDir/applications/bin/$archOptions ] || {
|
||||||
|
cat <<BIN_CHECK 1>&2
|
||||||
|
Error: no directory for executables exists:
|
||||||
|
$packDir/bin/$archOptions
|
||||||
|
$packDir/applications/bin/$archOptions
|
||||||
|
BIN_CHECK
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# list of directories
|
||||||
|
dirList=$(
|
||||||
|
for dir in \
|
||||||
|
$packDir/bin/$archOptions \
|
||||||
|
$packDir/lib/$archOptions \
|
||||||
|
$packDir/applications/bin/$archOptions \
|
||||||
|
$packDir/wmake/bin/$archCompiler \
|
||||||
|
$packDir/wmake/bin/$archOS \
|
||||||
|
$packDir/wmake/rules/General \
|
||||||
|
$packDir/wmake/rules/$archCompiler \
|
||||||
|
$packDir/wmake/rules/$archOS \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
[ -d $dir ] && echo $dir
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
cat <<INFO 1>&2
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Packing $archOptions ($archCompiler) port of $packDir
|
||||||
|
archOS = $archOS
|
||||||
|
32bit archOS = $arch3264
|
||||||
|
|
||||||
|
dirs:
|
||||||
|
$(echo ${dirList:-NONE})
|
||||||
|
|
||||||
|
INFO
|
||||||
|
|
||||||
|
echo "$dirList"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
93
bin/tools/foamListSourceFiles
Executable file
93
bin/tools/foamListSourceFiles
Executable file
@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# foamListSourceFiles <directory>
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Lists source files and Make/{files,options} in given directory
|
||||||
|
#
|
||||||
|
# Note
|
||||||
|
# Not normally called directly by the user.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ $# -eq 1 ] || {
|
||||||
|
cat <<USAGE 1>&2
|
||||||
|
Usage : ${0##*/} directory
|
||||||
|
|
||||||
|
* Lists source files and Make/{files,options} in given directory
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# canonical form (no double and no trailing dashes)
|
||||||
|
packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
|
||||||
|
|
||||||
|
# check for essential directories
|
||||||
|
[ -d $packDir ] || {
|
||||||
|
echo "Error: directory $packDir does not exist" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# list of files but excluding
|
||||||
|
# - dependent files (dep, obj, lib), archives
|
||||||
|
# - exclude Doxygen documentation etc
|
||||||
|
#
|
||||||
|
|
||||||
|
find -H $packDir \
|
||||||
|
! -type d \
|
||||||
|
\( -type f -o -type l \) \
|
||||||
|
! -name "*~" \
|
||||||
|
-a ! -name ".*~" \
|
||||||
|
-a ! -name "*.orig" \
|
||||||
|
-a ! -name "*.dep" \
|
||||||
|
-a ! -name "*.o" \
|
||||||
|
-a ! -name "*.so" \
|
||||||
|
-a ! -name "*.a" \
|
||||||
|
-a ! -name "*.tar" \
|
||||||
|
-a ! -name "*.tar.gz" \
|
||||||
|
-a ! -name "*.tgz" \
|
||||||
|
-a ! -name "core" \
|
||||||
|
-a ! -name "core.[1-9]*" \
|
||||||
|
-a ! -name "libccmio*" \
|
||||||
|
| sed \
|
||||||
|
-e "\@$packDir/lib/@d" \
|
||||||
|
-e '\@/\.git/@d' \
|
||||||
|
-e '\@/\.tags/@d' \
|
||||||
|
-e '\@/README\.org@d' \
|
||||||
|
-e '\@/bin/[^/]*/@{ \@/bin/tools/@!d }' \
|
||||||
|
-e '\@/lib/@d' \
|
||||||
|
-e '\@/platforms/@d' \
|
||||||
|
-e '\@/t/@d' \
|
||||||
|
-e '\@/Make[.A-Za-z]*/[^/]*/@d' \
|
||||||
|
-e '\@/[Dd]oxygen/html/@d' \
|
||||||
|
-e '\@/download/@d' \
|
||||||
|
-e '\@/libccmio-.*/@d' \
|
||||||
|
-e '\@/debian/@d'
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
121
bin/tools/foamListThirdPartyBinDirs
Executable file
121
bin/tools/foamListThirdPartyBinDirs
Executable file
@ -0,0 +1,121 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# foamListThirdPartyBinDirs <directory> <archOptions>
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Lists directories containing binary files for OpenFOAM ThirdParty
|
||||||
|
#
|
||||||
|
# Note
|
||||||
|
# Not normally called directly by the user.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
toolsDir="${0%/*}" # this script is already located in the tools/ directory
|
||||||
|
|
||||||
|
[ $# -eq 2 ] || {
|
||||||
|
cat <<USAGE 1>&2
|
||||||
|
Usage : ${0##*/} <packDir> <archOptions>
|
||||||
|
|
||||||
|
* List directories containing binary files for OpenFOAM ThirdParty
|
||||||
|
|
||||||
|
The value of 'archOptions' normally corresponds to \$WM_OPTIONS
|
||||||
|
The current value of \$WM_OPTIONS = $WM_OPTIONS
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
packDir="$1"
|
||||||
|
|
||||||
|
# same as $WM_OPTIONS - eg, 'linux64GccDPOpt'
|
||||||
|
archOptions="$2"
|
||||||
|
|
||||||
|
# base arch (w/o precision, optimization, etc)
|
||||||
|
# same as "$WM_ARCH$WM_COMPILER"
|
||||||
|
archCompiler=$(echo "$archOptions" | sed -e 's@[DS]P.*$@@')
|
||||||
|
|
||||||
|
# same as $WM_ARCH - eg, 'linux64'
|
||||||
|
# TODO: only works for Gcc, Icc, Clang
|
||||||
|
archOS=$(echo "$archOptions" | sed -e 's@[GI]cc.*$@@' -e 's@Clang.*$@@')
|
||||||
|
|
||||||
|
# links for 32-bit version, eg convert linux64 -> linux-64
|
||||||
|
arch3264=$(echo "$archOS" | sed -e 's@64@-64@')
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# check for essential directories
|
||||||
|
for dir in $packDir $packDir/lib/$archOptions
|
||||||
|
do
|
||||||
|
[ -d $dir ] || {
|
||||||
|
echo "Error: directory $dir does not exist" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# list of directories
|
||||||
|
dirList=$(
|
||||||
|
for dir in \
|
||||||
|
$packDir/bin/$archOptions \
|
||||||
|
$packDir/bin/$archCompiler \
|
||||||
|
$packDir/bin/$archOS \
|
||||||
|
$packDir/lib/$archOptions \
|
||||||
|
$packDir/lib/$archCompiler \
|
||||||
|
$packDir/lib/$archOS \
|
||||||
|
$packDir/platforms/$archOptions \
|
||||||
|
$packDir/platforms/$archCompiler \
|
||||||
|
$packDir/platforms/$archOS \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
[ -d $dir ] && echo $dir
|
||||||
|
done
|
||||||
|
|
||||||
|
# add in links for 32-bit version
|
||||||
|
if [ "$archOS" != "$arch3264" ]
|
||||||
|
then
|
||||||
|
for dir in \
|
||||||
|
$packDir/platforms/$arch3264 \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
[ -d $dir -a -L $dir ] && echo $dir
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
cat <<INFO 1>&2
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Packing $archOptions ($archCompiler) port of $packDir
|
||||||
|
archOS = $archOS
|
||||||
|
32bit archOS = $arch3264
|
||||||
|
|
||||||
|
dirs:
|
||||||
|
$(echo ${dirList:-NONE})
|
||||||
|
|
||||||
|
INFO
|
||||||
|
|
||||||
|
echo "$dirList"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -3,7 +3,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-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -26,54 +26,67 @@
|
|||||||
# foamPackSource <directory> <tarFile>
|
# foamPackSource <directory> <tarFile>
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Packs and compresses the .C and .H files and Make/options
|
# Pack and compress all source files from a given directory.
|
||||||
# and Make/files in a given directory.
|
|
||||||
#
|
#
|
||||||
|
# Note
|
||||||
|
# Not normally called directly by the user
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
tmpFile=${TMPDIR:-/tmp}/foamPackFiles.$$
|
tmpFile=${TMPDIR:-/tmp}/foamPackFiles.$$
|
||||||
|
toolsDir="${0%/*}" # this script is already located in the tools/ directory
|
||||||
|
|
||||||
if [ $# -ne 2 ]
|
[ $# -eq 2 ] || {
|
||||||
then
|
cat <<USAGE 1>&2
|
||||||
echo "Usage : ${0##*/} directory tarFile"
|
Usage : ${0##*/} directory tarFile
|
||||||
echo ""
|
|
||||||
echo "Packs all .C and .H files and Make/options and Make/files into"
|
* Pack and compress all source files from a given directory into <tarFile>
|
||||||
echo "<tarFile>"
|
|
||||||
echo ""
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
# canonical form (no double and no trailing dashes)
|
# canonical form (no double and no trailing dashes)
|
||||||
packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
|
packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
|
||||||
packFile=$2
|
packFile=$2
|
||||||
|
|
||||||
if [ ! -d $packDir ]
|
# check for essential directories
|
||||||
then
|
[ -d $packDir ] || {
|
||||||
echo "Error: directory $packDir does not exist"
|
echo "Error: directory $packDir does not exist" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# avoid overwriting old pack file
|
||||||
if [ -f $packFile ]
|
if [ -f $packFile ]
|
||||||
then
|
then
|
||||||
echo "Error: $packFile already exists"
|
echo "Error: $packFile already exists" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up on termination and on Ctrl-C
|
# Clean up on termination and on Ctrl-C
|
||||||
trap 'rm -f $tmpFile 2>/dev/null; exit 0' EXIT TERM INT
|
trap 'rm -f $tmpFile 2>/dev/null; exit 0' EXIT TERM INT
|
||||||
|
|
||||||
foamSourceFiles $packDir > $tmpFile
|
# get all names
|
||||||
|
$toolsDir/foamListSourceFiles $packDir > $tmpFile
|
||||||
|
|
||||||
|
|
||||||
# provide some feedback
|
# provide some feedback
|
||||||
wc $tmpFile | awk '{print "Packing",$1,"files - this could take some time ..."}'
|
cat <<INFO 1>&2
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Packing $packDir source files into $packFile
|
||||||
|
|
||||||
tar czpf $packFile --files-from $tmpFile
|
INFO
|
||||||
|
wc $tmpFile | awk '{print "Packing",$1,"files - this could take some time ..."}' 1>&2
|
||||||
|
|
||||||
|
|
||||||
|
# Clean up on Ctrl-C
|
||||||
|
trap 'rm -f $packFile $tmpFile 2>/dev/null' INT
|
||||||
|
|
||||||
|
tar cpzf $packFile --files-from $tmpFile
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing and compressing $packDir into file $packFile"
|
echo "Finished packing $packDir into file $packFile" 1>&2
|
||||||
else
|
else
|
||||||
echo "Error: failure packing $packDir into file $packFile"
|
echo "Error: failure packing $packDir into file $packFile" 1>&2
|
||||||
rm -f $packFile 2>/dev/null
|
rm -f $packFile 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -11,7 +11,8 @@ div.navigation
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
div.tabs
|
div.tabs,
|
||||||
|
div.tabs2
|
||||||
{
|
{
|
||||||
width : 100%;
|
width : 100%;
|
||||||
padding-top : 5px;
|
padding-top : 5px;
|
||||||
@ -20,7 +21,8 @@ div.tabs
|
|||||||
border-bottom: 1px solid rgb(175,175,175);
|
border-bottom: 1px solid rgb(175,175,175);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs ul
|
div.tabs ul,
|
||||||
|
div.tabs2 ul
|
||||||
{
|
{
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
@ -30,26 +32,30 @@ div.tabs ul
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
div.tabs li, div.tabs form
|
div.tabs li, div.tabs form,
|
||||||
|
div.tabs2 li, div.tabs2 form
|
||||||
{
|
{
|
||||||
display : inline;
|
display : inline;
|
||||||
margin : 0px;
|
margin : 0px;
|
||||||
padding : 0px;
|
padding : 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs ul li
|
div.tabs ul li,
|
||||||
|
div.tabs2 ul li
|
||||||
{
|
{
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs form
|
div.tabs form,
|
||||||
|
div.tabs2 form
|
||||||
{
|
{
|
||||||
padding : 0px 9px;
|
padding : 0px 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs a
|
div.tabs a,
|
||||||
|
div.tabs2 a
|
||||||
{
|
{
|
||||||
font-size : 12px;
|
font-size : 12px;
|
||||||
font-weight : normal;
|
font-weight : normal;
|
||||||
@ -58,7 +64,8 @@ div.tabs a
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* not needed - no image */
|
/* not needed - no image */
|
||||||
div.tabs a:hover
|
div.tabs a:hover,
|
||||||
|
div.tabs2 a:hover
|
||||||
{
|
{
|
||||||
background-position: 100% -150px;
|
background-position: 100% -150px;
|
||||||
}
|
}
|
||||||
@ -66,13 +73,18 @@ div.tabs a:hover
|
|||||||
div.tabs a:link,
|
div.tabs a:link,
|
||||||
div.tabs a:visited,
|
div.tabs a:visited,
|
||||||
div.tabs a:active,
|
div.tabs a:active,
|
||||||
div.tabs a:hover
|
div.tabs a:hover,
|
||||||
|
div.tabs2 a:link,
|
||||||
|
div.tabs2 a:visited,
|
||||||
|
div.tabs2 a:active,
|
||||||
|
div.tabs2 a:hover
|
||||||
{
|
{
|
||||||
color : #000000;
|
color : #000000;
|
||||||
color:#555;
|
color:#555;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs span
|
div.tabs span,
|
||||||
|
div.tabs2 span
|
||||||
{
|
{
|
||||||
display : inline;
|
display : inline;
|
||||||
padding : 0px 9px;
|
padding : 0px 9px;
|
||||||
@ -80,7 +92,8 @@ div.tabs span
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* client-side search */
|
/* client-side search */
|
||||||
div.tabs #MSearchBox
|
div.tabs #MSearchBox,
|
||||||
|
div.tabs2 #MSearchBox
|
||||||
{
|
{
|
||||||
float : right;
|
float : right;
|
||||||
background : white;
|
background : white;
|
||||||
@ -88,7 +101,8 @@ div.tabs #MSearchBox
|
|||||||
font-size : 1em;
|
font-size : 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs #MSearchSelect
|
div.tabs #MSearchSelect,
|
||||||
|
div.tabs2 #MSearchSelect
|
||||||
{
|
{
|
||||||
float : left;
|
float : left;
|
||||||
display : inline;
|
display : inline;
|
||||||
@ -96,14 +110,16 @@ div.tabs #MSearchSelect
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* old name? */
|
/* old name? */
|
||||||
div.tabs input
|
div.tabs input,
|
||||||
|
div.tabs2 input
|
||||||
{
|
{
|
||||||
float : right;
|
float : right;
|
||||||
display : inline;
|
display : inline;
|
||||||
font-size : 1em;
|
font-size : 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs td
|
div.tabs td,
|
||||||
|
div.tabs2 td
|
||||||
{
|
{
|
||||||
font-size : 80%;
|
font-size : 80%;
|
||||||
font-weight : bold;
|
font-weight : bold;
|
||||||
@ -120,14 +136,16 @@ div.tabs a:hover span
|
|||||||
background-position: 0% -150px;
|
background-position: 0% -150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs li.current a
|
div.tabs li.current a,
|
||||||
|
div.tabs2 li.current a
|
||||||
{
|
{
|
||||||
border-width : 0px;
|
border-width : 0px;
|
||||||
border-right: 1px solid rgb(175,175,175);
|
border-right: 1px solid rgb(175,175,175);
|
||||||
color : #555;
|
color : #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tabs li.current span
|
div.tabs li.current span,
|
||||||
|
div.tabs2 li.current span
|
||||||
{
|
{
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for paraview-3.x
|
# Setup file for paraview-3.x
|
||||||
# Sourced from OpenFOAM-*/etc/bashrc or from foamPV alias
|
# Sourced from OpenFOAM-<VERSION>/etc/bashrc or from foamPV alias
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
|
# The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
|
||||||
@ -38,7 +38,7 @@ cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platform
|
|||||||
|
|
||||||
# determine the cmake to be used
|
# determine the cmake to be used
|
||||||
unset CMAKE_HOME
|
unset CMAKE_HOME
|
||||||
for cmake in cmake-2.8.3 cmake-2.8.1 cmake-2.8.0 cmake-2.6.4
|
for cmake in cmake-2.8.3 cmake-2.8.1
|
||||||
do
|
do
|
||||||
cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
|
cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
|
||||||
if [ -r $cmake ]
|
if [ -r $cmake ]
|
||||||
@ -51,8 +51,14 @@ done
|
|||||||
|
|
||||||
|
|
||||||
# set VERSION and MAJOR (version) variables
|
# set VERSION and MAJOR (version) variables
|
||||||
ParaView_VERSION=3.8.0
|
if [ -z "$ParaView_VERSION" ]
|
||||||
ParaView_MAJOR=unknown
|
then
|
||||||
|
ParaView_VERSION=3.8.0
|
||||||
|
ParaView_MAJOR=unknown
|
||||||
|
echo "Warning in app/paraview3/bashrc:" 1>&2
|
||||||
|
echo " ParaView_VERSION not set, using '$ParaView_VERSION'" 1>&2
|
||||||
|
fi
|
||||||
|
[ -n "$ParaView_MAJOR" ] || ParaView_MAJOR=unknown
|
||||||
|
|
||||||
# if needed, set MAJOR version to correspond to VERSION
|
# if needed, set MAJOR version to correspond to VERSION
|
||||||
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
|
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
|
||||||
@ -76,7 +82,7 @@ if [ -r $ParaView_DIR -o -r $paraviewInstDir ]
|
|||||||
then
|
then
|
||||||
export PATH=$ParaView_DIR/bin:$PATH
|
export PATH=$ParaView_DIR/bin:$PATH
|
||||||
export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-$ParaView_MAJOR:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$ParaView_DIR/lib/paraview-$ParaView_MAJOR:$LD_LIBRARY_PATH
|
||||||
export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR
|
export PV_PLUGIN_PATH=$FOAM_EXT_LIBBIN/paraview-$ParaView_MAJOR
|
||||||
|
|
||||||
# add in python libraries if required
|
# add in python libraries if required
|
||||||
paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Setup file for paraview-3.x
|
# Setup file for paraview-3.x
|
||||||
# Sourced from OpenFOAM-*/etc/cshrc or from foamPV alias
|
# Sourced from OpenFOAM-<VERSION>/etc/cshrc or from foamPV alias
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
|
# The env. variables 'ParaView_DIR' and 'ParaView_MAJOR'
|
||||||
@ -39,7 +39,7 @@ if ( $status == 0 ) setenv PATH $cleaned
|
|||||||
|
|
||||||
# determine the cmake to be used
|
# determine the cmake to be used
|
||||||
unsetenv CMAKE_HOME
|
unsetenv CMAKE_HOME
|
||||||
foreach cmake ( cmake-2.8.3 cmake-2.8.1 cmake-2.8.0 cmake-2.6.4 )
|
foreach cmake ( cmake-2.8.3 cmake-2.8.1 )
|
||||||
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
|
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
|
||||||
if ( -r $cmake ) then
|
if ( -r $cmake ) then
|
||||||
setenv CMAKE_HOME $cmake
|
setenv CMAKE_HOME $cmake
|
||||||
@ -49,8 +49,14 @@ foreach cmake ( cmake-2.8.3 cmake-2.8.1 cmake-2.8.0 cmake-2.6.4 )
|
|||||||
end
|
end
|
||||||
|
|
||||||
# set VERSION and MAJOR (version) variables
|
# set VERSION and MAJOR (version) variables
|
||||||
setenv ParaView_VERSION 3.8.0
|
if ( ! $?ParaView_VERSION )
|
||||||
setenv ParaView_MAJOR unknown
|
then
|
||||||
|
setenv ParaView_VERSION 3.8.0
|
||||||
|
setenv ParaView_MAJOR unknown
|
||||||
|
echo "Warning in app/paraview3/cshrc:"
|
||||||
|
echo " ParaView_VERSION not set, using '$ParaView_VERSION'"
|
||||||
|
fi
|
||||||
|
if ( ! $?ParaView_MAJOR ) setenv ParaView_MAJOR unknown
|
||||||
|
|
||||||
# if needed, set MAJOR version to correspond to VERSION
|
# if needed, set MAJOR version to correspond to VERSION
|
||||||
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
|
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
|
||||||
@ -74,7 +80,7 @@ setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-
|
|||||||
if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
|
if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
|
||||||
setenv PATH ${ParaView_DIR}/bin:${PATH}
|
setenv PATH ${ParaView_DIR}/bin:${PATH}
|
||||||
setenv LD_LIBRARY_PATH "${ParaView_DIR}/lib/paraview-${ParaView_MAJOR}:${LD_LIBRARY_PATH}"
|
setenv LD_LIBRARY_PATH "${ParaView_DIR}/lib/paraview-${ParaView_MAJOR}:${LD_LIBRARY_PATH}"
|
||||||
setenv PV_PLUGIN_PATH $FOAM_LIBBIN/paraview-${ParaView_MAJOR}
|
setenv PV_PLUGIN_PATH $FOAM_EXT_LIBBIN/paraview-${ParaView_MAJOR}
|
||||||
|
|
||||||
# add in python libraries if required
|
# add in python libraries if required
|
||||||
set paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
set paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -33,7 +33,13 @@
|
|||||||
# during the wmake process
|
# during the wmake process
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
export SCOTCH_VERSION=scotch_5.1.10b
|
export SCOTCH_VERSION=scotch_5.1.11
|
||||||
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION
|
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION
|
||||||
|
|
||||||
|
# mpi-qualified include directory
|
||||||
|
export SCOTCH_MPI_INCLUDE=$SCOTCH_ARCH_PATH/include/${FOAM_MPI_LIBBIN##*/}
|
||||||
|
|
||||||
|
# mpi-qualified lib directory
|
||||||
|
export SCOTCH_MPI_LIBBIN=$SCOTCH_ARCH_PATH/lib/${FOAM_MPI_LIBBIN##*/}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
99
etc/bashrc
99
etc/bashrc
@ -35,24 +35,73 @@ export WM_PROJECT=OpenFOAM
|
|||||||
export WM_PROJECT_VERSION=dev
|
export WM_PROJECT_VERSION=dev
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# USER EDITABLE PART. Note changes made here may be lost with the next upgrade
|
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
|
||||||
#
|
#
|
||||||
# either set $FOAM_INST_DIR before sourcing this file or set
|
# either set $FOAM_INST_DIR before sourcing this file or set
|
||||||
# $foamInstall below to where OpenFOAM is installed
|
# 'foamInstall' below to where OpenFOAM is installed
|
||||||
#
|
#
|
||||||
# Location of the OpenFOAM installation
|
# Location of the OpenFOAM installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
foamInstall=$HOME/$WM_PROJECT
|
foamInstall=$HOME/$WM_PROJECT
|
||||||
# foamInstall=~$WM_PROJECT
|
# foamInstall=~$WM_PROJECT
|
||||||
# foamInstall=/usr/local/$WM_PROJECT
|
|
||||||
# foamInstall=/opt/$WM_PROJECT
|
# foamInstall=/opt/$WM_PROJECT
|
||||||
|
# foamInstall=/usr/local/$WM_PROJECT
|
||||||
#
|
#
|
||||||
# END OF (NORMAL) USER EDITABLE PART
|
# END OF (NORMAL) USER EDITABLE PART
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# note the location for later use (eg, in job scripts)
|
#
|
||||||
|
# These are the defaults for this version which should generally be
|
||||||
|
# overridden from the prefs.sh file or from command-line specification
|
||||||
|
#
|
||||||
|
#- note the location for later use (eg, in job scripts)
|
||||||
: ${FOAM_INST_DIR:=$foamInstall}; export FOAM_INST_DIR
|
: ${FOAM_INST_DIR:=$foamInstall}; export FOAM_INST_DIR
|
||||||
|
|
||||||
|
#- ParaView version, automatically determine major version:
|
||||||
|
export ParaView_VERSION=3.8.0
|
||||||
|
export ParaView_MAJOR=unknown
|
||||||
|
|
||||||
|
#- Compiler location:
|
||||||
|
# foamCompiler= system | ThirdParty (OpenFOAM)
|
||||||
|
foamCompiler=system
|
||||||
|
|
||||||
|
#- Compiler:
|
||||||
|
# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc)
|
||||||
|
export WM_COMPILER=Gcc
|
||||||
|
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH
|
||||||
|
|
||||||
|
#- Architecture:
|
||||||
|
# WM_ARCH_OPTION = 32 | 64
|
||||||
|
export WM_ARCH_OPTION=64
|
||||||
|
|
||||||
|
#- Precision:
|
||||||
|
# WM_PRECISION_OPTION = DP | SP
|
||||||
|
export WM_PRECISION_OPTION=DP
|
||||||
|
|
||||||
|
#- Optimised, debug, profiling:
|
||||||
|
# WM_COMPILE_OPTION = Opt | Debug | Prof
|
||||||
|
export WM_COMPILE_OPTION=Opt
|
||||||
|
|
||||||
|
#- MPI implementation:
|
||||||
|
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI
|
||||||
|
# | GAMMA | MPI | QSMPI
|
||||||
|
export WM_MPLIB=OPENMPI
|
||||||
|
|
||||||
|
#- Operating System:
|
||||||
|
# WM_OSTYPE = POSIX | ???
|
||||||
|
export WM_OSTYPE=POSIX
|
||||||
|
|
||||||
|
#- Floating-point signal handling:
|
||||||
|
# set or unset
|
||||||
|
export FOAM_SIGFPE=
|
||||||
|
|
||||||
|
#- memory initialisation:
|
||||||
|
# set or unset
|
||||||
|
#export FOAM_SETNAN=
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
# The old dirs to be cleaned from the various environment variables
|
# The old dirs to be cleaned from the various environment variables
|
||||||
# - remove anything under top-level directory.
|
# - remove anything under top-level directory.
|
||||||
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
|
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
|
||||||
@ -90,6 +139,7 @@ _foamSource()
|
|||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
|
||||||
|
|
||||||
# Evaluate command-line parameters and record settings for later
|
# Evaluate command-line parameters and record settings for later
|
||||||
|
# these can be used to set/unset values, or specify prefs files
|
||||||
export FOAM_SETTINGS="$@"
|
export FOAM_SETTINGS="$@"
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
@ -116,41 +166,6 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# Operating System/Platform
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# WM_OSTYPE = POSIX | ????
|
|
||||||
: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler: set to Gcc, Gcc43, Gcc44, or Icc (for Intel's icc)
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
: ${WM_COMPILER:=Gcc}; export WM_COMPILER
|
|
||||||
|
|
||||||
unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH
|
|
||||||
|
|
||||||
|
|
||||||
# Compilation options (architecture, precision, optimised, debug or profiling)
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# WM_ARCH_OPTION = 32 | 64
|
|
||||||
: ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION
|
|
||||||
|
|
||||||
# WM_PRECISION_OPTION = DP | SP
|
|
||||||
: ${WM_PRECISION_OPTION:=DP}; export WM_PRECISION_OPTION
|
|
||||||
|
|
||||||
# WM_COMPILE_OPTION = Opt | Debug | Prof
|
|
||||||
: ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION
|
|
||||||
|
|
||||||
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA
|
|
||||||
# | MPI | QSMPI
|
|
||||||
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
|
|
||||||
|
|
||||||
|
|
||||||
# Run options (floating-point signal handling and memory initialisation)
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
export FOAM_SIGFPE=
|
|
||||||
# export FOAM_SETNAN=
|
|
||||||
|
|
||||||
|
|
||||||
# Detect system type and set environment variables appropriately
|
# Detect system type and set environment variables appropriately
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
export WM_ARCH=`uname -s`
|
export WM_ARCH=`uname -s`
|
||||||
@ -165,7 +180,7 @@ Linux)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
x86_64)
|
x86_64)
|
||||||
case $WM_ARCH_OPTION in
|
case "$WM_ARCH_OPTION" in
|
||||||
32)
|
32)
|
||||||
export WM_COMPILER_ARCH='-64'
|
export WM_COMPILER_ARCH='-64'
|
||||||
export WM_CC='gcc'
|
export WM_CC='gcc'
|
||||||
@ -196,13 +211,13 @@ Linux)
|
|||||||
|
|
||||||
mips64)
|
mips64)
|
||||||
WM_ARCH=SiCortex64
|
WM_ARCH=SiCortex64
|
||||||
|
WM_MPLIB=MPI
|
||||||
export WM_COMPILER_LIB_ARCH=64
|
export WM_COMPILER_LIB_ARCH=64
|
||||||
export WM_CC='gcc'
|
export WM_CC='gcc'
|
||||||
export WM_CXX='g++'
|
export WM_CXX='g++'
|
||||||
export WM_CFLAGS='-mabi=64 -fPIC'
|
export WM_CFLAGS='-mabi=64 -fPIC'
|
||||||
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
||||||
export WM_LDFLAGS='-mabi=64 -G0'
|
export WM_LDFLAGS='-mabi=64 -G0'
|
||||||
export WM_MPLIB=MPI
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
ppc64)
|
ppc64)
|
||||||
@ -223,13 +238,13 @@ Linux)
|
|||||||
|
|
||||||
SunOS)
|
SunOS)
|
||||||
WM_ARCH=SunOS64
|
WM_ARCH=SunOS64
|
||||||
|
WM_MPLIB=FJMPI
|
||||||
export WM_COMPILER_LIB_ARCH=64
|
export WM_COMPILER_LIB_ARCH=64
|
||||||
export WM_CC='gcc'
|
export WM_CC='gcc'
|
||||||
export WM_CXX='g++'
|
export WM_CXX='g++'
|
||||||
export WM_CFLAGS='-mabi=64 -fPIC'
|
export WM_CFLAGS='-mabi=64 -fPIC'
|
||||||
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
export WM_CXXFLAGS='-mabi=64 -fPIC'
|
||||||
export WM_LDFLAGS='-mabi=64 -G0'
|
export WM_LDFLAGS='-mabi=64 -G0'
|
||||||
export WM_MPLIB=FJMPI
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) # an unsupported operating system
|
*) # an unsupported operating system
|
||||||
|
|||||||
@ -3,7 +3,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) 2010-2010 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
100
etc/cshrc
100
etc/cshrc
@ -34,24 +34,74 @@ setenv WM_PROJECT OpenFOAM
|
|||||||
setenv WM_PROJECT_VERSION dev
|
setenv WM_PROJECT_VERSION dev
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# USER EDITABLE PART. Note changes made here may be lost with the next upgrade
|
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
|
||||||
#
|
#
|
||||||
# either setenv FOAM_INST_DIR before sourcing this file or set
|
# either setenv FOAM_INST_DIR before sourcing this file or set
|
||||||
# foamInstall below to where OpenFOAM is installed
|
# 'foamInstall' below to where OpenFOAM is installed
|
||||||
#
|
#
|
||||||
# Location of the OpenFOAM installation
|
# Location of the OpenFOAM installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
set foamInstall = $HOME/$WM_PROJECT
|
set foamInstall = $HOME/$WM_PROJECT
|
||||||
# set foamInstall = ~$WM_PROJECT
|
# set foamInstall = ~$WM_PROJECT
|
||||||
# set foamInstall = /usr/local/$WM_PROJECT
|
|
||||||
# set foamInstall = /opt/$WM_PROJECT
|
# set foamInstall = /opt/$WM_PROJECT
|
||||||
|
# set foamInstall = /usr/local/$WM_PROJECT
|
||||||
#
|
#
|
||||||
# END OF (NORMAL) USER EDITABLE PART
|
# END OF (NORMAL) USER EDITABLE PART
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# note the location for later use (eg, in job scripts)
|
#
|
||||||
|
# These are the defaults for this version which should generally be
|
||||||
|
# overridden from the prefs.csh file or from command-line specification
|
||||||
|
#
|
||||||
|
#- note the location for later use (eg, in job scripts)
|
||||||
if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
|
if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
|
||||||
|
|
||||||
|
#- ParaView version, automatically determine major version:
|
||||||
|
setenv ParaView_VERSION 3.8.0
|
||||||
|
setenv ParaView_MAJOR unknown
|
||||||
|
|
||||||
|
#- Compiler location:
|
||||||
|
# foamCompiler= system | ThirdParty (OpenFOAM)
|
||||||
|
set foamCompiler=system
|
||||||
|
|
||||||
|
#- Compiler:
|
||||||
|
# WM_COMPILER = Gcc | Gcc43 | Gcc44 | Gcc45 | Clang | Icc (Intel icc)
|
||||||
|
setenv WM_COMPILER Gcc
|
||||||
|
setenv WM_COMPILER_ARCH # defined but empty
|
||||||
|
setenv WM_COMPILER_LIB_ARCH # defined but empty
|
||||||
|
#
|
||||||
|
#- Architecture:
|
||||||
|
# WM_ARCH_OPTION = 32 | 64
|
||||||
|
setenv WM_ARCH_OPTION 64
|
||||||
|
|
||||||
|
#- Precision:
|
||||||
|
# WM_PRECISION_OPTION = DP | SP
|
||||||
|
setenv WM_PRECISION_OPTION DP
|
||||||
|
|
||||||
|
#- Optimised, debug, profiling:
|
||||||
|
# WM_COMPILE_OPTION = Opt | Debug | Prof
|
||||||
|
setenv WM_COMPILE_OPTION Opt
|
||||||
|
|
||||||
|
#- MPI implementation:
|
||||||
|
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI
|
||||||
|
# | GAMMA | MPI | QSMPI
|
||||||
|
setenv WM_MPLIB OPENMPI
|
||||||
|
|
||||||
|
#- Operating System:
|
||||||
|
# WM_OSTYPE = POSIX | ???
|
||||||
|
setenv WM_OSTYPE POSIX
|
||||||
|
|
||||||
|
#- Floating-point signal handling:
|
||||||
|
# set or unset
|
||||||
|
setenv FOAM_SIGFPE
|
||||||
|
|
||||||
|
#- memory initialisation:
|
||||||
|
# set or unset
|
||||||
|
#setenv FOAM_SETNAN
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
# The old dirs to be cleaned from the various environment variables
|
# The old dirs to be cleaned from the various environment variables
|
||||||
# - remove anything under top-level directory.
|
# - remove anything under top-level directory.
|
||||||
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
|
# NB: the WM_PROJECT_INST_DIR might not be identical between versions
|
||||||
@ -75,6 +125,7 @@ alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!*
|
|||||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
||||||
|
|
||||||
# Evaluate command-line parameters and record settings for later
|
# Evaluate command-line parameters and record settings for later
|
||||||
|
# these can be used to set/unset values, or specify prefs files
|
||||||
setenv FOAM_SETTINGS "${*}"
|
setenv FOAM_SETTINGS "${*}"
|
||||||
while ( $#argv > 0 )
|
while ( $#argv > 0 )
|
||||||
switch ($argv[1])
|
switch ($argv[1])
|
||||||
@ -99,41 +150,6 @@ while ( $#argv > 0 )
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Operating System/Platform
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# WM_OSTYPE = POSIX | ????
|
|
||||||
if ( ! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler: set to Gcc, Gcc43, Gcc44 or Icc (for Intel's icc)
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
if ( ! $?WM_COMPILER ) setenv WM_COMPILER Gcc
|
|
||||||
|
|
||||||
setenv WM_COMPILER_ARCH
|
|
||||||
setenv WM_COMPILER_LIB_ARCH
|
|
||||||
|
|
||||||
|
|
||||||
# Compilation options (architecture, precision, optimised, debug or profiling)
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# WM_ARCH_OPTION = 32 | 64
|
|
||||||
if ( ! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64
|
|
||||||
|
|
||||||
# WM_PRECISION_OPTION = DP | SP
|
|
||||||
if ( ! $?WM_PRECISION_OPTION ) setenv WM_PRECISION_OPTION DP
|
|
||||||
|
|
||||||
# WM_COMPILE_OPTION = Opt | Debug | Prof
|
|
||||||
if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt
|
|
||||||
|
|
||||||
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
|
|
||||||
if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI
|
|
||||||
|
|
||||||
|
|
||||||
# Run options (floating-point signal handling and memory initialisation)
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
setenv FOAM_SIGFPE
|
|
||||||
# setenv FOAM_SETNAN
|
|
||||||
|
|
||||||
|
|
||||||
# Detect system type and set environment variables
|
# Detect system type and set environment variables
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv WM_ARCH `uname -s`
|
setenv WM_ARCH `uname -s`
|
||||||
@ -181,13 +197,13 @@ case Linux:
|
|||||||
|
|
||||||
case mips64:
|
case mips64:
|
||||||
setenv WM_ARCH SiCortex64
|
setenv WM_ARCH SiCortex64
|
||||||
|
setenv WM_MPLIB MPI
|
||||||
setenv WM_COMPILER_LIB_ARCH 64
|
setenv WM_COMPILER_LIB_ARCH 64
|
||||||
setenv WM_CC 'gcc'
|
setenv WM_CC 'gcc'
|
||||||
setenv WM_CXX 'g++'
|
setenv WM_CXX 'g++'
|
||||||
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
||||||
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
||||||
setenv WM_LDFLAGS '-mabi=64 -G0'
|
setenv WM_LDFLAGS '-mabi=64 -G0'
|
||||||
setenv WM_MPLIB MPI
|
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case ppc64:
|
case ppc64:
|
||||||
@ -209,13 +225,13 @@ case Linux:
|
|||||||
|
|
||||||
case SunOS:
|
case SunOS:
|
||||||
setenv WM_ARCH SunOS64
|
setenv WM_ARCH SunOS64
|
||||||
|
setenv WM_MPLIB FJMPI
|
||||||
setenv WM_COMPILER_LIB_ARCH 64
|
setenv WM_COMPILER_LIB_ARCH 64
|
||||||
setenv WM_CC 'gcc'
|
setenv WM_CC 'gcc'
|
||||||
setenv WM_CXX 'g++'
|
setenv WM_CXX 'g++'
|
||||||
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
setenv WM_CFLAGS '-mabi=64 -fPIC'
|
||||||
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
|
||||||
setenv WM_LDFLAGS '-mabi=64 -G0'
|
setenv WM_LDFLAGS '-mabi=64 -G0'
|
||||||
setenv WM_MPLIB FJMPI
|
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
## Specify system compiler
|
## Specify system compiler
|
||||||
## ~~~~~~~~~~~~~~~~~~~~~~~
|
## ~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#set compilerInstall=system
|
#set foamCompiler=system
|
||||||
|
|
||||||
## Specify system openmpi
|
## Specify system openmpi
|
||||||
## ~~~~~~~~~~~~~~~~~~~~~~
|
## ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
# Specify system compiler
|
# Specify system compiler
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
compilerInstall=system
|
foamCompiler=system
|
||||||
|
|
||||||
# Specify system openmpi
|
# Specify system openmpi
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
# Sourced from OpenFOAM-??/etc/cshrc
|
# Sourced from OpenFOAM-<VERSION>/etc/cshrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -47,33 +47,39 @@ setenv WM_DIR $WM_PROJECT_DIR/wmake
|
|||||||
setenv WM_LINK_LANGUAGE c++
|
setenv WM_LINK_LANGUAGE c++
|
||||||
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||||
|
|
||||||
# base configuration
|
# base executables/libraries
|
||||||
setenv FOAM_APP $WM_PROJECT_DIR/applications
|
setenv FOAM_APPBIN $WM_PROJECT_DIR/bin/$WM_OPTIONS
|
||||||
setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
|
||||||
setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
|
||||||
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||||
setenv FOAM_SRC $WM_PROJECT_DIR/src
|
|
||||||
|
|
||||||
# shared site configuration - similar naming convention as ~OpenFOAM expansion
|
# external (ThirdParty) libraries
|
||||||
|
setenv FOAM_EXT_LIBBIN $WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
|
||||||
|
|
||||||
|
# shared site executables/libraries
|
||||||
|
# similar naming convention as ~OpenFOAM expansion
|
||||||
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
setenv FOAM_SITE_APPBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||||
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
setenv FOAM_SITE_LIBBIN $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||||
|
|
||||||
# user configuration
|
# user executables/libraries
|
||||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/bin/$WM_OPTIONS
|
||||||
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||||
|
|
||||||
# convenience
|
# convenience
|
||||||
|
setenv FOAM_APP $WM_PROJECT_DIR/applications
|
||||||
|
setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
||||||
|
setenv FOAM_SRC $WM_PROJECT_DIR/src
|
||||||
setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
|
setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
|
||||||
setenv FOAM_UTILITIES $FOAM_APP/utilities
|
setenv FOAM_UTILITIES $FOAM_APP/utilities
|
||||||
setenv FOAM_SOLVERS $FOAM_APP/solvers
|
setenv FOAM_SOLVERS $FOAM_APP/solvers
|
||||||
setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
|
setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
|
||||||
|
|
||||||
# add OpenFOAM scripts and wmake to the path
|
# add wmake to the path - not required for runtime only environment
|
||||||
setenv PATH ${WM_DIR}:${WM_PROJECT_DIR}/bin:${PATH}
|
if ( -d "${WM_DIR}" ) setenv PATH ${WM_DIR}:${PATH}
|
||||||
|
# add OpenFOAM scripts to the path
|
||||||
|
setenv PATH ${WM_PROJECT_DIR}/bin:${PATH}
|
||||||
|
|
||||||
_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}
|
_foamAddPath ${FOAM_USER_APPBIN}:${FOAM_SITE_APPBIN}:${FOAM_APPBIN}
|
||||||
# Make sure to pick up dummy versions of external libraries last
|
# Make sure to pick up dummy versions of external libraries last
|
||||||
_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_LIBBIN}/dummy
|
_foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_EXT_LIBBIN}:${FOAM_LIBBIN}/dummy
|
||||||
|
|
||||||
# Compiler settings
|
# Compiler settings
|
||||||
# ~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~
|
||||||
@ -81,13 +87,18 @@ unset gcc_version gmp_version mpfr_version mpc_version
|
|||||||
unsetenv MPFR_ARCH_PATH
|
unsetenv MPFR_ARCH_PATH
|
||||||
|
|
||||||
|
|
||||||
# Select compiler installation
|
# Location of compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# compilerInstall = OpenFOAM | system
|
if ( ! $?foamCompiler ) then
|
||||||
if ( ! $?compilerInstall ) set compilerInstall=system
|
then
|
||||||
|
foamCompiler=system
|
||||||
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
||||||
|
echo " foamCompiler not set, using '$foamCompiler'"
|
||||||
|
fi
|
||||||
|
|
||||||
switch ("$compilerInstall")
|
switch ("$foamCompiler")
|
||||||
case OpenFOAM:
|
case OpenFOAM:
|
||||||
|
case ThirdParty:
|
||||||
switch ("$WM_COMPILER")
|
switch ("$WM_COMPILER")
|
||||||
case Gcc:
|
case Gcc:
|
||||||
case Gcc++0x:
|
case Gcc++0x:
|
||||||
@ -143,7 +154,7 @@ case OpenFOAM:
|
|||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
||||||
echo " Cannot find $gccDir installation."
|
echo " Cannot find $gccDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'compilerInstall' setting to 'system' in this file"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
echo
|
echo
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -181,7 +192,7 @@ case OpenFOAM:
|
|||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
||||||
echo " Cannot find $clangDir installation."
|
echo " Cannot find $clangDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'compilerInstall' setting to 'system' in this file"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
echo
|
echo
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -191,6 +202,15 @@ case OpenFOAM:
|
|||||||
unset clang_version clangDir
|
unset clang_version clangDir
|
||||||
|
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
|
case system:
|
||||||
|
# okay, use system compiler
|
||||||
|
breaksw
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo "Warn: foamCompiler='$foamCompiler' is unsupported"
|
||||||
|
echo " treating as 'system' instead"
|
||||||
|
breaksw
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
|
|
||||||
@ -248,7 +268,7 @@ case OPENMPI:
|
|||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddMan $MPI_ARCH_PATH/man
|
_foamAddMan $MPI_ARCH_PATH/man
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
@ -270,7 +290,7 @@ case SYSTEMOPENMPI:
|
|||||||
|
|
||||||
_foamAddLib $libDir
|
_foamAddLib $libDir
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
|
||||||
unset mpi_version libDir
|
unset mpi_version libDir
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
@ -283,7 +303,7 @@ case MPICH:
|
|||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
@ -296,7 +316,7 @@ case MPICH-GM:
|
|||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddLib $GM_LIB_PATH
|
_foamAddLib $GM_LIB_PATH
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpich-gm
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case HPMPI:
|
case HPMPI:
|
||||||
@ -320,22 +340,22 @@ case HPMPI:
|
|||||||
breaksw
|
breaksw
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/hpmpi
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/hpmpi
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case GAMMA:
|
case GAMMA:
|
||||||
setenv MPI_ARCH_PATH /usr
|
setenv MPI_ARCH_PATH /usr
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/gamma
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/gamma
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case MPI:
|
case MPI:
|
||||||
setenv MPI_ARCH_PATH /opt/mpi
|
setenv MPI_ARCH_PATH /opt/mpi
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpi
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case FJMPI:
|
case FJMPI:
|
||||||
setenv MPI_ARCH_PATH /opt/FJSVmpi2
|
setenv MPI_ARCH_PATH /opt/FJSVmpi2
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpi
|
setenv FOAM_MPI_LIBBIN $FOAM_EXT_LIBBIN/mpi
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
|
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
|
||||||
_foamAddLib /opt/FSUNf90/lib/sparcv9
|
_foamAddLib /opt/FSUNf90/lib/sparcv9
|
||||||
@ -374,14 +394,14 @@ endif
|
|||||||
|
|
||||||
# Enable the hoard memory allocator if available
|
# Enable the hoard memory allocator if available
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#if ( -f $FOAM_LIBBIN/libhoard.so ) then
|
#if ( -f $FOAM_EXT_LIBBIN/libhoard.so ) then
|
||||||
# setenv LD_PRELOAD $FOAM_LIBBIN/libhoard.so:$LD_PRELOAD
|
# setenv LD_PRELOAD $FOAM_EXT_LIBBIN/libhoard.so:$LD_PRELOAD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
# cleanup environment:
|
# cleanup environment:
|
||||||
# ~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~
|
||||||
unalias _foamAddPath _foamAddLib _foamAddMan
|
unalias _foamAddPath _foamAddLib _foamAddMan
|
||||||
unset compilerInstall minBufferSize
|
unset foamCompiler minBufferSize
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
# Sourced from OpenFOAM-??/etc/bashrc
|
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -70,46 +70,56 @@ export WM_DIR=$WM_PROJECT_DIR/wmake
|
|||||||
export WM_LINK_LANGUAGE=c++
|
export WM_LINK_LANGUAGE=c++
|
||||||
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||||
|
|
||||||
# base configuration
|
# base executables/libraries
|
||||||
export FOAM_APP=$WM_PROJECT_DIR/applications
|
export FOAM_APPBIN=$WM_PROJECT_DIR/bin/$WM_OPTIONS
|
||||||
export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
|
||||||
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
|
||||||
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||||
export FOAM_SRC=$WM_PROJECT_DIR/src
|
|
||||||
|
|
||||||
# shared site configuration - similar naming convention as ~OpenFOAM expansion
|
# external (ThirdParty) libraries
|
||||||
|
export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
|
||||||
|
|
||||||
|
# shared site executables/libraries
|
||||||
|
# similar naming convention as ~OpenFOAM expansion
|
||||||
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
export FOAM_SITE_APPBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/bin/$WM_OPTIONS
|
||||||
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
export FOAM_SITE_LIBBIN=$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION/lib/$WM_OPTIONS
|
||||||
|
|
||||||
# user configuration
|
# user executables/libraries
|
||||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/bin/$WM_OPTIONS
|
||||||
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||||
|
|
||||||
# convenience
|
# convenience
|
||||||
|
export FOAM_APP=$WM_PROJECT_DIR/applications
|
||||||
|
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
||||||
|
export FOAM_SRC=$WM_PROJECT_DIR/src
|
||||||
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
|
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
|
||||||
export FOAM_UTILITIES=$FOAM_APP/utilities
|
export FOAM_UTILITIES=$FOAM_APP/utilities
|
||||||
export FOAM_SOLVERS=$FOAM_APP/solvers
|
export FOAM_SOLVERS=$FOAM_APP/solvers
|
||||||
export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
||||||
|
|
||||||
# add OpenFOAM scripts and wmake to the path
|
# add wmake to the path - not required for runtime only environment
|
||||||
export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH
|
[ -d "$WM_DIR" ] && PATH=$WM_DIR:$PATH
|
||||||
|
# add OpenFOAM scripts to the path
|
||||||
|
export PATH=$WM_PROJECT_DIR/bin:$PATH
|
||||||
|
|
||||||
_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
|
_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
|
||||||
# Make sure to pick up dummy versions of external libraries last
|
# Make sure to pick up dummy versions of external libraries last
|
||||||
_foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_LIBBIN/dummy
|
_foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$FOAM_LIBBIN/dummy
|
||||||
|
|
||||||
# Compiler settings
|
# Compiler settings
|
||||||
# ~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~
|
||||||
unset gcc_version gmp_version mpfr_version mpc_version
|
unset gcc_version gmp_version mpfr_version mpc_version
|
||||||
unset MPFR_ARCH_PATH
|
unset MPFR_ARCH_PATH
|
||||||
|
|
||||||
# Select compiler installation
|
# Location of compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# compilerInstall = OpenFOAM | system
|
if [ -z "$foamCompiler" ]
|
||||||
: ${compilerInstall:=system}
|
then
|
||||||
|
foamCompiler=system
|
||||||
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:" 1>&2
|
||||||
|
echo " foamCompiler not set, using '$foamCompiler'" 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
case "${compilerInstall:-OpenFOAM}" in
|
case "${foamCompiler}" in
|
||||||
OpenFOAM)
|
OpenFOAM | ThirdParty)
|
||||||
case "$WM_COMPILER" in
|
case "$WM_COMPILER" in
|
||||||
Gcc | Gcc++0x)
|
Gcc | Gcc++0x)
|
||||||
gcc_version=gcc-4.4.3
|
gcc_version=gcc-4.4.3
|
||||||
@ -161,7 +171,7 @@ OpenFOAM)
|
|||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
||||||
echo " Cannot find $gccDir installation."
|
echo " Cannot find $gccDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'compilerInstall' setting to 'system' in this file"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +212,7 @@ OpenFOAM)
|
|||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
||||||
echo " Cannot find $clangDir installation."
|
echo " Cannot find $clangDir installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||||
echo " change the 'compilerInstall' setting to 'system' in this file"
|
echo " change the 'foamCompiler' setting to 'system'"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +221,13 @@ OpenFOAM)
|
|||||||
fi
|
fi
|
||||||
unset clang_version clangDir
|
unset clang_version clangDir
|
||||||
;;
|
;;
|
||||||
|
system)
|
||||||
|
# okay, use system compiler
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Warn: foamCompiler='$foamCompiler' is unsupported" 1>&2
|
||||||
|
echo " treating as 'system' instead" 1>&2
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
@ -271,7 +288,7 @@ OPENMPI)
|
|||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddMan $MPI_ARCH_PATH/man
|
_foamAddMan $MPI_ARCH_PATH/man
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -294,7 +311,7 @@ SYSTEMOPENMPI)
|
|||||||
|
|
||||||
_foamAddLib $libDir
|
_foamAddLib $libDir
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
|
||||||
unset mpi_version libDir
|
unset mpi_version libDir
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -307,7 +324,7 @@ MPICH)
|
|||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddMan $MPI_ARCH_PATH/share/man
|
_foamAddMan $MPI_ARCH_PATH/share/man
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -320,7 +337,7 @@ MPICH-GM)
|
|||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddLib $GM_LIB_PATH
|
_foamAddLib $GM_LIB_PATH
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-gm
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpich-gm
|
||||||
;;
|
;;
|
||||||
|
|
||||||
HPMPI)
|
HPMPI)
|
||||||
@ -345,22 +362,22 @@ HPMPI)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/hpmpi
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/hpmpi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
GAMMA)
|
GAMMA)
|
||||||
export MPI_ARCH_PATH=/usr
|
export MPI_ARCH_PATH=/usr
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/gamma
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/gamma
|
||||||
;;
|
;;
|
||||||
|
|
||||||
MPI)
|
MPI)
|
||||||
export MPI_ARCH_PATH=/opt/mpi
|
export MPI_ARCH_PATH=/opt/mpi
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
FJMPI)
|
FJMPI)
|
||||||
export MPI_ARCH_PATH=/opt/FJSVmpi2
|
export MPI_ARCH_PATH=/opt/FJSVmpi2
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/mpi
|
||||||
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
|
_foamAddLib $MPI_ARCH_PATH/lib/sparcv9
|
||||||
@ -370,7 +387,7 @@ FJMPI)
|
|||||||
|
|
||||||
QSMPI)
|
QSMPI)
|
||||||
export MPI_ARCH_PATH=/usr/lib/mpi
|
export MPI_ARCH_PATH=/usr/lib/mpi
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/qsmpi
|
export FOAM_MPI_LIBBIN=$FOAM_EXT_LIBBIN/qsmpi
|
||||||
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
@ -398,14 +415,14 @@ export MPI_BUFFER_SIZE
|
|||||||
|
|
||||||
# Enable the hoard memory allocator if available
|
# Enable the hoard memory allocator if available
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#if [ -f $FOAM_LIBBIN/libhoard.so ]
|
#if [ -f $FOAM_EXT_LIBBIN/libhoard.so ]
|
||||||
#then
|
#then
|
||||||
# export LD_PRELOAD=$FOAM_LIBBIN/libhoard.so:$LD_PRELOAD
|
# export LD_PRELOAD=$FOAM_EXT_LIBBIN/libhoard.so:$LD_PRELOAD
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
|
|
||||||
# cleanup environment:
|
# cleanup environment:
|
||||||
# ~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~
|
||||||
unset _foamAddPath _foamAddLib _foamAddMan compilerInstall minBufferSize
|
unset _foamAddPath _foamAddLib _foamAddMan foamCompiler minBufferSize
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -8,6 +8,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||||
|
echo "Error: FOAM_EXT_LIBBIN not set"
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# update OpenFOAM version strings if required
|
# update OpenFOAM version strings if required
|
||||||
|
|||||||
@ -50,7 +50,7 @@ const scalar
|
|||||||
KRR4::c1X = 1.0/2.0, KRR4::c2X = -3.0/2.0, KRR4::c3X = 121.0/50.0,
|
KRR4::c1X = 1.0/2.0, KRR4::c2X = -3.0/2.0, KRR4::c3X = 121.0/50.0,
|
||||||
KRR4::c4X = 29.0/250.0,
|
KRR4::c4X = 29.0/250.0,
|
||||||
KRR4::a2X = 1.0, KRR4::a3X = 3.0/5.0;
|
KRR4::a2X = 1.0, KRR4::a3X = 3.0/5.0;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -31,7 +31,7 @@ defineTypeNameAndDebug(Foam::ODESolver, 0);
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineRunTimeSelectionTable(ODESolver, ODE);
|
defineRunTimeSelectionTable(ODESolver, ODE);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -49,7 +49,7 @@ const scalar
|
|||||||
RK::dc1 = RK::c1 - 2825.0/27648.0, RK::dc3 = RK::c3 - 18575.0/48384.0,
|
RK::dc1 = RK::c1 - 2825.0/27648.0, RK::dc3 = RK::c3 - 18575.0/48384.0,
|
||||||
RK::dc4 = RK::c4 - 13525.0/55296.0, RK::dc5 = -277.00/14336.0,
|
RK::dc4 = RK::c4 - 13525.0/55296.0, RK::dc5 = -277.00/14336.0,
|
||||||
RK::dc6 = RK::c6 - 0.25;
|
RK::dc6 = RK::c6 - 0.25;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace Foam
|
|||||||
SIBS::redMax = 1.0e-5,
|
SIBS::redMax = 1.0e-5,
|
||||||
SIBS::redMin = 0.7,
|
SIBS::redMin = 0.7,
|
||||||
SIBS::scaleMX = 0.1;
|
SIBS::scaleMX = 0.1;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -111,16 +111,16 @@ bool Foam::setEnv
|
|||||||
|
|
||||||
Foam::word Foam::hostName(bool full)
|
Foam::word Foam::hostName(bool full)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[128];
|
||||||
gethostname(buf, 256);
|
gethostname(buf, sizeof(buf));
|
||||||
|
|
||||||
|
// implementation as per hostname from net-tools
|
||||||
if (full)
|
if (full)
|
||||||
{
|
{
|
||||||
struct hostent *hptr = gethostbyname(buf);
|
struct hostent *hp = gethostbyname(buf);
|
||||||
|
if (hp)
|
||||||
if (hptr)
|
|
||||||
{
|
{
|
||||||
return hptr->h_name;
|
return hp->h_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +128,27 @@ Foam::word Foam::hostName(bool full)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::word Foam::domainName()
|
||||||
|
{
|
||||||
|
char buf[128];
|
||||||
|
gethostname(buf, sizeof(buf));
|
||||||
|
|
||||||
|
// implementation as per hostname from net-tools
|
||||||
|
struct hostent *hp = gethostbyname(buf);
|
||||||
|
if (hp)
|
||||||
|
{
|
||||||
|
char *p = strchr(hp->h_name, '.');
|
||||||
|
if (p)
|
||||||
|
{
|
||||||
|
++p;
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return word::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::word Foam::userName()
|
Foam::word Foam::userName()
|
||||||
{
|
{
|
||||||
struct passwd* pw = getpwuid(getuid());
|
struct passwd* pw = getpwuid(getuid());
|
||||||
@ -201,8 +222,8 @@ Foam::fileName Foam::home(const word& userName)
|
|||||||
|
|
||||||
Foam::fileName Foam::cwd()
|
Foam::fileName Foam::cwd()
|
||||||
{
|
{
|
||||||
char buf[255];
|
char buf[256];
|
||||||
if (getcwd(buf, 255))
|
if (getcwd(buf, sizeof(buf)))
|
||||||
{
|
{
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
@ -957,8 +978,6 @@ bool Foam::ping
|
|||||||
const label timeOut
|
const label timeOut
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
char *serverAddress;
|
|
||||||
struct in_addr *ptr;
|
|
||||||
struct hostent *hostPtr;
|
struct hostent *hostPtr;
|
||||||
volatile int sockfd;
|
volatile int sockfd;
|
||||||
struct sockaddr_in destAddr; // will hold the destination addr
|
struct sockaddr_in destAddr; // will hold the destination addr
|
||||||
@ -968,15 +987,13 @@ bool Foam::ping
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"Foam::ping(const word&, const label)"
|
"Foam::ping(const word&, ...)"
|
||||||
) << "gethostbyname error " << h_errno << " for host " << destName
|
) << "gethostbyname error " << h_errno << " for host " << destName
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get first of the SLL of addresses
|
// Get first of the SLL of addresses
|
||||||
serverAddress = *(hostPtr->h_addr_list);
|
addr = (reinterpret_cast<struct in_addr*>(*(hostPtr->h_addr_list)))->s_addr;
|
||||||
ptr = reinterpret_cast<struct in_addr*>(serverAddress);
|
|
||||||
addr = ptr->s_addr;
|
|
||||||
|
|
||||||
// Allocate socket
|
// Allocate socket
|
||||||
sockfd = socket(AF_INET, SOCK_STREAM, 0);
|
sockfd = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
@ -990,7 +1007,7 @@ bool Foam::ping
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fill sockaddr_in structure with dest address and port
|
// Fill sockaddr_in structure with dest address and port
|
||||||
memset (reinterpret_cast<char *>(&destAddr), '\0', sizeof(destAddr));
|
memset(reinterpret_cast<char *>(&destAddr), '\0', sizeof(destAddr));
|
||||||
destAddr.sin_family = AF_INET;
|
destAddr.sin_family = AF_INET;
|
||||||
destAddr.sin_port = htons(ushort(destPort));
|
destAddr.sin_port = htons(ushort(destPort));
|
||||||
destAddr.sin_addr.s_addr = addr;
|
destAddr.sin_addr.s_addr = addr;
|
||||||
|
|||||||
@ -500,20 +500,7 @@ const pointPatchField<Type>& operator+
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define makePointPatchTypeFieldTypeName(type) \
|
|
||||||
defineNamedTemplateTypeNameAndDebug(type, 0);
|
|
||||||
|
|
||||||
|
|
||||||
#define makePointPatchFieldsTypeName(type) \
|
|
||||||
makePointPatchTypeFieldTypeName(type##PointPatchScalarField); \
|
|
||||||
makePointPatchTypeFieldTypeName(type##PointPatchVectorField); \
|
|
||||||
makePointPatchTypeFieldTypeName(type##PointPatchSphericalTensorField); \
|
|
||||||
makePointPatchTypeFieldTypeName(type##PointPatchSymmTensorField); \
|
|
||||||
makePointPatchTypeFieldTypeName(type##PointPatchTensorField);
|
|
||||||
|
|
||||||
|
|
||||||
#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
|
||||||
\
|
|
||||||
addToRunTimeSelectionTable \
|
addToRunTimeSelectionTable \
|
||||||
( \
|
( \
|
||||||
PatchTypeField, \
|
PatchTypeField, \
|
||||||
@ -533,46 +520,58 @@ const pointPatchField<Type>& operator+
|
|||||||
dictionary \
|
dictionary \
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// for non-templated patch fields
|
// for non-templated patch fields
|
||||||
#define makeNonTemplatedPointPatchTypeField(PatchTypeField,typePatchTypeField)\
|
#define makePointPatchTypeField(PatchTypeField,typePatchTypeField) \
|
||||||
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
defineTypeNameAndDebug(typePatchTypeField, 0); \
|
||||||
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
||||||
|
|
||||||
|
|
||||||
// for templated patch fields
|
// for templated patch fields
|
||||||
#define makePointPatchTypeField(PatchTypeField, typePatchTypeField) \
|
#define makeTemplatePointPatchTypeField(PatchTypeField, typePatchTypeField) \
|
||||||
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \
|
||||||
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
|
||||||
|
|
||||||
|
|
||||||
#define makePointPatchFields(type) \
|
#define makePointPatchFields(type) \
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatchScalarField, \
|
pointPatchScalarField, \
|
||||||
type##PointPatchScalarField \
|
type##PointPatchScalarField \
|
||||||
); \
|
); \
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatchVectorField, \
|
pointPatchVectorField, \
|
||||||
type##PointPatchVectorField \
|
type##PointPatchVectorField \
|
||||||
); \
|
); \
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatchSphericalTensorField, \
|
pointPatchSphericalTensorField, \
|
||||||
type##PointPatchSphericalTensorField \
|
type##PointPatchSphericalTensorField \
|
||||||
); \
|
); \
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatchSymmTensorField, \
|
pointPatchSymmTensorField, \
|
||||||
type##PointPatchSymmTensorField \
|
type##PointPatchSymmTensorField \
|
||||||
); \
|
); \
|
||||||
makePointPatchTypeField \
|
makeTemplatePointPatchTypeField \
|
||||||
( \
|
( \
|
||||||
pointPatchTensorField, \
|
pointPatchTensorField, \
|
||||||
type##PointPatchTensorField \
|
type##PointPatchTensorField \
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
#define makePointPatchFieldsTypeName(type) \
|
||||||
|
defineNamedTemplateTypeNameAndDebug(type##PointPatchScalarField, 0); \
|
||||||
|
defineNamedTemplateTypeNameAndDebug(type##PointPatchVectorField, 0); \
|
||||||
|
defineNamedTemplateTypeNameAndDebug \
|
||||||
|
( \
|
||||||
|
type##PointPatchSphericalTensorField, 0 \
|
||||||
|
); \
|
||||||
|
defineNamedTemplateTypeNameAndDebug(type##PointPatchSymmTensorField, 0); \
|
||||||
|
defineNamedTemplateTypeNameAndDebug(type##PointPatchTensorField, 0)
|
||||||
|
|
||||||
|
|
||||||
#define makePointPatchFieldTypedefs(type) \
|
#define makePointPatchFieldTypedefs(type) \
|
||||||
typedef type##PointPatchField<scalar> type##PointPatchScalarField; \
|
typedef type##PointPatchField<scalar> type##PointPatchScalarField; \
|
||||||
typedef type##PointPatchField<vector> type##PointPatchVectorField; \
|
typedef type##PointPatchField<vector> type##PointPatchVectorField; \
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
typedef graph::writer graphWriter;
|
typedef graph::writer graphWriter;
|
||||||
addToRunTimeSelectionTable(graphWriter, gnuplotGraph, word);
|
addToRunTimeSelectionTable(graphWriter, gnuplotGraph, word);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
typedef graph::writer graphWriter;
|
typedef graph::writer graphWriter;
|
||||||
addToRunTimeSelectionTable(graphWriter, jplotGraph, word);
|
addToRunTimeSelectionTable(graphWriter, jplotGraph, word);
|
||||||
};
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
typedef graph::writer graphWriter;
|
typedef graph::writer graphWriter;
|
||||||
addToRunTimeSelectionTable(graphWriter, rawGraph, word);
|
addToRunTimeSelectionTable(graphWriter, rawGraph, word);
|
||||||
};
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
typedef graph::writer graphWriter;
|
typedef graph::writer graphWriter;
|
||||||
addToRunTimeSelectionTable(graphWriter, xmgrGraph, word);
|
addToRunTimeSelectionTable(graphWriter, xmgrGraph, word);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -67,10 +67,13 @@ string getEnv(const word&);
|
|||||||
//- Set an environment variable
|
//- Set an environment variable
|
||||||
bool setEnv(const word& name, const string& value, const bool overwrite);
|
bool setEnv(const word& name, const string& value, const bool overwrite);
|
||||||
|
|
||||||
//- Return the system's host name
|
//- Return the system's host name, as per hostname(1)
|
||||||
// Optionally the full name reported from gethostbyname
|
// Optionally with the full name (as per the '-f' option)
|
||||||
word hostName(const bool full=false);
|
word hostName(const bool full=false);
|
||||||
|
|
||||||
|
//- Return the system's domain name, as per hostname(1) with the '-d' option
|
||||||
|
word domainName();
|
||||||
|
|
||||||
//- Return the user's login name
|
//- Return the user's login name
|
||||||
word userName();
|
word userName();
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Foam::globalIndex::globalIndex(const label localSize)
|
|||||||
labelList localSizes(Pstream::nProcs());
|
labelList localSizes(Pstream::nProcs());
|
||||||
localSizes[Pstream::myProcNo()] = localSize;
|
localSizes[Pstream::myProcNo()] = localSize;
|
||||||
Pstream::gatherList(localSizes);
|
Pstream::gatherList(localSizes);
|
||||||
Pstream::scatterList(localSizes); // just to balance out comms
|
Pstream::scatterList(localSizes);
|
||||||
|
|
||||||
label offset = 0;
|
label offset = 0;
|
||||||
offsets_[0] = 0;
|
offsets_[0] = 0;
|
||||||
|
|||||||
@ -307,7 +307,7 @@ Foam::mapDistribute::mapDistribute
|
|||||||
{
|
{
|
||||||
label globalIndex = elements[i];
|
label globalIndex = elements[i];
|
||||||
|
|
||||||
if (!globalNumbering.isLocal(globalIndex))
|
if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex))
|
||||||
{
|
{
|
||||||
label procI = globalNumbering.whichProcID(globalIndex);
|
label procI = globalNumbering.whichProcID(globalIndex);
|
||||||
nNonLocal[procI]++;
|
nNonLocal[procI]++;
|
||||||
@ -329,7 +329,7 @@ Foam::mapDistribute::mapDistribute
|
|||||||
{
|
{
|
||||||
label globalIndex = elements[i];
|
label globalIndex = elements[i];
|
||||||
|
|
||||||
if (!globalNumbering.isLocal(globalIndex))
|
if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex))
|
||||||
{
|
{
|
||||||
label procI = globalNumbering.whichProcID(globalIndex);
|
label procI = globalNumbering.whichProcID(globalIndex);
|
||||||
label index = globalNumbering.toLocal(procI, globalIndex);
|
label index = globalNumbering.toLocal(procI, globalIndex);
|
||||||
@ -452,7 +452,7 @@ Foam::mapDistribute::mapDistribute
|
|||||||
{
|
{
|
||||||
label globalIndex = cCells[i];
|
label globalIndex = cCells[i];
|
||||||
|
|
||||||
if (!globalNumbering.isLocal(globalIndex))
|
if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex))
|
||||||
{
|
{
|
||||||
label procI = globalNumbering.whichProcID(globalIndex);
|
label procI = globalNumbering.whichProcID(globalIndex);
|
||||||
nNonLocal[procI]++;
|
nNonLocal[procI]++;
|
||||||
@ -482,7 +482,7 @@ Foam::mapDistribute::mapDistribute
|
|||||||
{
|
{
|
||||||
label globalIndex = cCells[i];
|
label globalIndex = cCells[i];
|
||||||
|
|
||||||
if (!globalNumbering.isLocal(globalIndex))
|
if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex))
|
||||||
{
|
{
|
||||||
label procI = globalNumbering.whichProcID(globalIndex);
|
label procI = globalNumbering.whichProcID(globalIndex);
|
||||||
label index = globalNumbering.toLocal(procI, globalIndex);
|
label index = globalNumbering.toLocal(procI, globalIndex);
|
||||||
@ -603,6 +603,10 @@ Foam::label Foam::mapDistribute::renumber
|
|||||||
const label globalI
|
const label globalI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (globalI == -1)
|
||||||
|
{
|
||||||
|
return globalI;
|
||||||
|
}
|
||||||
if (globalNumbering.isLocal(globalI))
|
if (globalNumbering.isLocal(globalI))
|
||||||
{
|
{
|
||||||
return globalNumbering.toLocal(globalI);
|
return globalNumbering.toLocal(globalI);
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from list of (possibly) remote elements in globalIndex
|
//- Construct from list of (possibly) remote elements in globalIndex
|
||||||
// numbering. Determines compact numbering (see above) and
|
// numbering (or -1). Determines compact numbering (see above) and
|
||||||
// distribute map to get data into this ordering and renumbers the
|
// distribute map to get data into this ordering and renumbers the
|
||||||
// elements to be in compact numbering.
|
// elements to be in compact numbering.
|
||||||
mapDistribute
|
mapDistribute
|
||||||
@ -133,7 +133,7 @@ public:
|
|||||||
List<Map<label> >& compactMap
|
List<Map<label> >& compactMap
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Special variant that works with the into sorted into bins
|
//- Special variant that works with the info sorted into bins
|
||||||
// according to local indices. E.g. think cellCells where
|
// according to local indices. E.g. think cellCells where
|
||||||
// cellCells[localCellI] is a list of global cells
|
// cellCells[localCellI] is a list of global cells
|
||||||
mapDistribute
|
mapDistribute
|
||||||
|
|||||||
@ -156,10 +156,7 @@ inline Point Foam::tetrahedron<Point, PointRef>::circumCentre() const
|
|||||||
|
|
||||||
if (Foam::mag(denom) < ROOTVSMALL)
|
if (Foam::mag(denom) < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
WarningIn("Point tetrahedron<Point, PointRef>::circumCentre() const")
|
// Degenerate tetrahedron, returning centre instead of circumCentre.
|
||||||
<< "Degenerate tetrahedron:" << nl << *this << nl
|
|
||||||
<<"Returning centre instead of circumCentre."
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
return centre();
|
return centre();
|
||||||
}
|
}
|
||||||
@ -186,11 +183,7 @@ inline Foam::scalar Foam::tetrahedron<Point, PointRef>::circumRadius() const
|
|||||||
|
|
||||||
if (Foam::mag(denom) < ROOTVSMALL)
|
if (Foam::mag(denom) < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
WarningIn("Point tetrahedron<Point, PointRef>::circumCentre() const")
|
// Degenerate tetrahedron, returning GREAT for circumRadius.
|
||||||
<< "Degenerate tetrahedron:" << nl << *this << nl
|
|
||||||
<< "Returning GREAT for circumRadius."
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
return GREAT;
|
return GREAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,16 +265,7 @@ Foam::scalar Foam::tetrahedron<Point, PointRef>::barycentric
|
|||||||
|
|
||||||
if (Foam::mag(detT) < SMALL)
|
if (Foam::mag(detT) < SMALL)
|
||||||
{
|
{
|
||||||
WarningIn
|
// Degenerate tetrahedron, returning 1/4 barycentric coordinates.
|
||||||
(
|
|
||||||
"List<scalar> tetrahedron<Point, PointRef>::barycentric"
|
|
||||||
"("
|
|
||||||
"const point& pt"
|
|
||||||
") const"
|
|
||||||
)
|
|
||||||
<< "Degenerate tetrahedron:" << nl << *this << nl
|
|
||||||
<< "Returning 1/4 barycentric coordinates."
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
bary = List<scalar>(4, 0.25);
|
bary = List<scalar>(4, 0.25);
|
||||||
|
|
||||||
|
|||||||
@ -121,10 +121,7 @@ inline Point Foam::triangle<Point, PointRef>::circumCentre() const
|
|||||||
|
|
||||||
if (Foam::mag(c) < ROOTVSMALL)
|
if (Foam::mag(c) < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
WarningIn("Point triangle<Point, PointRef>::circumCentre() const")
|
// Degenerate triangle, returning centre instead of circumCentre.
|
||||||
<< "Degenerate triangle:" << nl << *this << nl
|
|
||||||
<< "Returning centre instead of circumCentre."
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
return centre();
|
return centre();
|
||||||
}
|
}
|
||||||
@ -147,10 +144,7 @@ inline Foam::scalar Foam::triangle<Point, PointRef>::circumRadius() const
|
|||||||
|
|
||||||
if (Foam::mag(denom) < VSMALL)
|
if (Foam::mag(denom) < VSMALL)
|
||||||
{
|
{
|
||||||
WarningIn("scalar triangle<Point, PointRef>::circumRadius() const")
|
// Degenerate triangle, returning GREAT for circumRadius.
|
||||||
<< "Degenerate triangle:" << nl << *this << nl
|
|
||||||
<< "Returning GREAT for circumRadius."
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
return GREAT;
|
return GREAT;
|
||||||
}
|
}
|
||||||
@ -266,16 +260,7 @@ Foam::scalar Foam::triangle<Point, PointRef>::barycentric
|
|||||||
|
|
||||||
if (Foam::mag(denom) < SMALL)
|
if (Foam::mag(denom) < SMALL)
|
||||||
{
|
{
|
||||||
WarningIn
|
// Degenerate triangle, returning 1/3 barycentric coordinates.
|
||||||
(
|
|
||||||
"List<scalar> triangle<Point, PointRef>::barycentric"
|
|
||||||
"("
|
|
||||||
"const point& pt"
|
|
||||||
") const"
|
|
||||||
)
|
|
||||||
<< "Degenerate triangle:" << nl << *this << nl
|
|
||||||
<< "Returning 1/3 barycentric coordinates."
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
bary = List<scalar>(3, 1.0/3.0);
|
bary = List<scalar>(3, 1.0/3.0);
|
||||||
|
|
||||||
@ -540,20 +525,7 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
|
|||||||
{
|
{
|
||||||
if ((d1 - d3) < ROOTVSMALL)
|
if ((d1 - d3) < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
WarningIn
|
// Degenerate triangle, for d1 = d3, a_ and b_ are likely coincident
|
||||||
(
|
|
||||||
"pointHit triangle<Point, PointRef>::nearestPointClassify"
|
|
||||||
"("
|
|
||||||
"const point& p,"
|
|
||||||
"label& nearType,"
|
|
||||||
"label& nearLabel"
|
|
||||||
") const"
|
|
||||||
)
|
|
||||||
<< "Degenerate triangle:" << nl << *this << nl
|
|
||||||
<< "d1, d3: " << d1 << ", " << d3 << endl;
|
|
||||||
|
|
||||||
// For d1 = d3, a_ and b_ are likely coincident.
|
|
||||||
|
|
||||||
nearType = POINT;
|
nearType = POINT;
|
||||||
nearLabel = 0;
|
nearLabel = 0;
|
||||||
return pointHit(false, a_, Foam::mag(a_ - p), true);
|
return pointHit(false, a_, Foam::mag(a_ - p), true);
|
||||||
@ -589,20 +561,7 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
|
|||||||
{
|
{
|
||||||
if ((d2 - d6) < ROOTVSMALL)
|
if ((d2 - d6) < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
WarningIn
|
// Degenerate triangle, for d2 = d6, a_ and c_ are likely coincident
|
||||||
(
|
|
||||||
"pointHit triangle<Point, PointRef>::nearestPointClassify"
|
|
||||||
"("
|
|
||||||
"const point& p,"
|
|
||||||
"label& nearType,"
|
|
||||||
"label& nearLabel"
|
|
||||||
") const"
|
|
||||||
)
|
|
||||||
<< "Degenerate triangle:" << nl << *this << nl
|
|
||||||
<< "d2, d6: " << d2 << ", " << d6 << endl;
|
|
||||||
|
|
||||||
// For d2 = d6, a_ and c_ are likely coincident.
|
|
||||||
|
|
||||||
nearType = POINT;
|
nearType = POINT;
|
||||||
nearLabel = 0;
|
nearLabel = 0;
|
||||||
return pointHit(false, a_, Foam::mag(a_ - p), true);
|
return pointHit(false, a_, Foam::mag(a_ - p), true);
|
||||||
@ -624,21 +583,8 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
|
|||||||
{
|
{
|
||||||
if (((d4 - d3) + (d5 - d6)) < ROOTVSMALL)
|
if (((d4 - d3) + (d5 - d6)) < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
WarningIn
|
// Degenerate triangle, for (d4 - d3) = (d6 - d5), b_ and c_ are
|
||||||
(
|
// likely coincident
|
||||||
"pointHit triangle<Point, PointRef>::nearestPointClassify"
|
|
||||||
"("
|
|
||||||
"const point& p,"
|
|
||||||
"label& nearType,"
|
|
||||||
"label& nearLabel"
|
|
||||||
") const"
|
|
||||||
)
|
|
||||||
<< "Degenerate triangle:" << nl << *this << nl
|
|
||||||
<< "(d4 - d3), (d6 - d5): " << (d4 - d3) << ", " << (d6 - d5)
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
// For (d4 - d3) = (d6 - d5), b_ and c_ are likely coincident.
|
|
||||||
|
|
||||||
nearType = POINT;
|
nearType = POINT;
|
||||||
nearLabel = 1;
|
nearLabel = 1;
|
||||||
return pointHit(false, b_, Foam::mag(b_ - p), true);
|
return pointHit(false, b_, Foam::mag(b_ - p), true);
|
||||||
@ -658,19 +604,8 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
|
|||||||
|
|
||||||
if ((va + vb + vc) < ROOTVSMALL)
|
if ((va + vb + vc) < ROOTVSMALL)
|
||||||
{
|
{
|
||||||
WarningIn
|
// Degenerate triangle, return the centre because no edge or points are
|
||||||
(
|
// closest
|
||||||
"pointHit triangle<Point, PointRef>::nearestPointClassify"
|
|
||||||
"("
|
|
||||||
"const point& p,"
|
|
||||||
"label& nearType,"
|
|
||||||
"label& nearLabel"
|
|
||||||
") const"
|
|
||||||
)
|
|
||||||
<< "Degenerate triangle:" << nl << *this << nl
|
|
||||||
<< "va, vb, vc: " << va << ", " << vb << ", " << vc
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
point nearPt = centre();
|
point nearPt = centre();
|
||||||
nearType = NONE,
|
nearType = NONE,
|
||||||
nearLabel = -1;
|
nearLabel = -1;
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -490,7 +490,7 @@ unsigned Foam::Hasher
|
|||||||
const short endianTest = 0x0100;
|
const short endianTest = 0x0100;
|
||||||
|
|
||||||
// yields 0x01 for big endian
|
// yields 0x01 for big endian
|
||||||
if (*(reinterpret_cast<const char *>(&endianTest)))
|
if (*(reinterpret_cast<const char*>(&endianTest)))
|
||||||
{
|
{
|
||||||
return jenkins_hashbig(key, length, initval);
|
return jenkins_hashbig(key, length, initval);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,7 +74,7 @@ inline uint32_t Foam::SHA1::swapBytes(uint32_t n)
|
|||||||
const short x = 0x0100;
|
const short x = 0x0100;
|
||||||
|
|
||||||
// yields 0x01 for big endian
|
// yields 0x01 for big endian
|
||||||
if (*(reinterpret_cast<const char *>(&x)))
|
if (*(reinterpret_cast<const char*>(&x)))
|
||||||
{
|
{
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
@ -459,10 +459,5 @@ Foam::SHA1Digest Foam::SHA1::digest() const
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,10 +115,10 @@ public:
|
|||||||
//- Construct null
|
//- Construct null
|
||||||
inline SHA1();
|
inline SHA1();
|
||||||
|
|
||||||
//- Construct and append initial std::string
|
//- Construct null and append initial std::string
|
||||||
explicit inline SHA1(const std::string&);
|
explicit inline SHA1(const std::string&);
|
||||||
|
|
||||||
//- Construct and append initial string
|
//- Construct null and append initial string
|
||||||
explicit inline SHA1(const char*);
|
explicit inline SHA1(const char*);
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -145,25 +145,44 @@ public:
|
|||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Equality operator
|
//- Equality operator, compares %digests
|
||||||
inline bool operator==(const SHA1Digest&) const;
|
|
||||||
|
|
||||||
//- Inequality operator
|
|
||||||
inline bool operator!=(const SHA1Digest&) const;
|
|
||||||
|
|
||||||
//- Equality operator
|
|
||||||
inline bool operator==(const SHA1&) const;
|
inline bool operator==(const SHA1&) const;
|
||||||
|
|
||||||
//- Inequality operator
|
//- Compare %digest
|
||||||
|
inline bool operator==(const SHA1Digest&) const;
|
||||||
|
|
||||||
|
//- Compare %digest to (40-byte) text representation (eg, from sha1sum)
|
||||||
|
// An %empty string is equivalent to
|
||||||
|
// "0000000000000000000000000000000000000000"
|
||||||
|
inline bool operator==(const std::string& hexdigits) const;
|
||||||
|
|
||||||
|
//- Compare %digest to (40-byte) text representation (eg, from sha1sum)
|
||||||
|
// A %null or %empty string is equivalent to
|
||||||
|
// "0000000000000000000000000000000000000000"
|
||||||
|
inline bool operator==(const char* hexdigits) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Inequality operator, compares %digests
|
||||||
inline bool operator!=(const SHA1&) const;
|
inline bool operator!=(const SHA1&) const;
|
||||||
|
|
||||||
//- Convert to a digest, calculate current digest from appended data.
|
//- Inequality operator, compare %digest
|
||||||
|
inline bool operator!=(const SHA1Digest&) const;
|
||||||
|
|
||||||
|
//- Inequality operator, compares %digests
|
||||||
|
inline bool operator!=(const std::string& hexdigits) const;
|
||||||
|
|
||||||
|
//- Inequality operator, compare %digest
|
||||||
|
inline bool operator!=(const char* hexdigits) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Convert to a SHA1Digest,
|
||||||
|
// calculate current %digest from appended data
|
||||||
inline operator SHA1Digest() const;
|
inline operator SHA1Digest() const;
|
||||||
|
|
||||||
// Friend Functions
|
|
||||||
|
|
||||||
// Friend Operators
|
// Friend Operators
|
||||||
|
|
||||||
|
//- Output the %digest
|
||||||
inline friend Ostream& operator<<(Ostream&, const SHA1&);
|
inline friend Ostream& operator<<(Ostream&, const SHA1&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -105,7 +105,7 @@ bool Foam::SHA1Digest::operator==(const SHA1Digest& rhs) const
|
|||||||
|
|
||||||
bool Foam::SHA1Digest::operator!=(const SHA1Digest& rhs) const
|
bool Foam::SHA1Digest::operator!=(const SHA1Digest& rhs) const
|
||||||
{
|
{
|
||||||
return !operator==(rhs);
|
return !this->operator==(rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,6 +38,8 @@ SourceFiles
|
|||||||
#ifndef SHA1Digest_H
|
#ifndef SHA1Digest_H
|
||||||
#define SHA1Digest_H
|
#define SHA1Digest_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -75,12 +77,33 @@ public:
|
|||||||
//- Reset the digest to zero
|
//- Reset the digest to zero
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
//- Return true if the digest is empty (ie, all zero).
|
||||||
|
bool empty() const;
|
||||||
|
|
||||||
//- Equality operator
|
//- Equality operator
|
||||||
bool operator==(const SHA1Digest&) const;
|
bool operator==(const SHA1Digest&) const;
|
||||||
|
|
||||||
|
//- Compare to (40-byte) text representation (eg, from sha1sum)
|
||||||
|
// An %empty string is equivalent to
|
||||||
|
// "0000000000000000000000000000000000000000"
|
||||||
|
bool operator==(const std::string& hexdigits) const;
|
||||||
|
|
||||||
|
//- Compare to (40-byte) text representation (eg, from sha1sum)
|
||||||
|
// A %null or %empty string is equivalent to
|
||||||
|
// "0000000000000000000000000000000000000000"
|
||||||
|
bool operator==(const char* hexdigits) const;
|
||||||
|
|
||||||
|
|
||||||
//- Inequality operator
|
//- Inequality operator
|
||||||
bool operator!=(const SHA1Digest&) const;
|
bool operator!=(const SHA1Digest&) const;
|
||||||
|
|
||||||
|
//- Inequality operator
|
||||||
|
bool operator!=(const std::string& hexdigits) const;
|
||||||
|
|
||||||
|
//- Inequality operator
|
||||||
|
bool operator!=(const char* hexdigits) const;
|
||||||
|
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream&, const SHA1Digest&);
|
friend Ostream& operator<<(Ostream&, const SHA1Digest&);
|
||||||
friend Istream& operator>>(Istream&, SHA1Digest&);
|
friend Istream& operator>>(Istream&, SHA1Digest&);
|
||||||
|
|
||||||
|
|||||||
@ -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-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,9 +48,6 @@ inline Foam::SHA1::SHA1(const char* str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::SHA1& Foam::SHA1::append(const char* data, size_t len)
|
inline Foam::SHA1& Foam::SHA1::append(const char* data, size_t len)
|
||||||
@ -79,55 +76,66 @@ inline Foam::SHA1& Foam::SHA1::append(const char* str)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline bool Foam::SHA1::operator==(const SHA1& rhs) const
|
||||||
|
{
|
||||||
|
return this->digest() == rhs.digest();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::SHA1::operator==(const SHA1Digest& rhs) const
|
inline bool Foam::SHA1::operator==(const SHA1Digest& rhs) const
|
||||||
{
|
{
|
||||||
return this->digest() == rhs;
|
return this->digest() == rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::SHA1::operator!=(const SHA1Digest& rhs) const
|
inline bool Foam::SHA1::operator==(const std::string& hexdigits) const
|
||||||
{
|
{
|
||||||
return this->digest() != rhs;
|
return this->digest() == hexdigits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::SHA1::operator==(const SHA1& rhs) const
|
inline bool Foam::SHA1::operator==(const char* hexdigits) const
|
||||||
{
|
{
|
||||||
return digest() == rhs.digest();
|
return this->digest() == hexdigits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::SHA1::operator!=(const SHA1& rhs) const
|
inline bool Foam::SHA1::operator!=(const SHA1& rhs) const
|
||||||
{
|
{
|
||||||
return digest() != rhs.digest();
|
return !this->operator==(rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::SHA1::operator
|
inline bool Foam::SHA1::operator!=(const SHA1Digest& rhs) const
|
||||||
Foam::SHA1Digest () const
|
{
|
||||||
|
return !this->operator==(rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Foam::SHA1::operator!=(const std::string& rhs) const
|
||||||
|
{
|
||||||
|
return !this->operator==(rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Foam::SHA1::operator!=(const char* rhs) const
|
||||||
|
{
|
||||||
|
return !this->operator==(rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::SHA1::operator Foam::SHA1Digest() const
|
||||||
{
|
{
|
||||||
return digest();
|
return digest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::Ostream& Foam::operator<<(Ostream& os, const SHA1& sha)
|
inline Foam::Ostream& Foam::operator<<(Ostream& os, const SHA1& sha)
|
||||||
{
|
{
|
||||||
return os << sha.digest();
|
return os << sha.digest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -37,8 +37,8 @@ namespace solidBodyMotionFunctions
|
|||||||
{
|
{
|
||||||
defineTypeNameAndDebug(SDA, 0);
|
defineTypeNameAndDebug(SDA, 0);
|
||||||
addToRunTimeSelectionTable(solidBodyMotionFunction, SDA, dictionary);
|
addToRunTimeSelectionTable(solidBodyMotionFunction, SDA, dictionary);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -39,8 +39,8 @@ namespace solidBodyMotionFunctions
|
|||||||
linearMotion,
|
linearMotion,
|
||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user