Merge branch 'master' of /home/hunt2/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2008-10-02 08:43:39 +01:00
29 changed files with 314 additions and 218 deletions

View File

@ -2,7 +2,8 @@
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
set -x set -x
( cd OpenFOAM && wmakeLnInclude . ) wmakeLnInclude -f OpenFOAM
wmakeLnInclude -f OSspecific/$WM_OS
( cd Pstream && ./Allwmake ) ( cd Pstream && ./Allwmake )
wmake libo OSspecific/$WM_OS wmake libo OSspecific/$WM_OS

View File

@ -31,13 +31,16 @@ License
namespace Foam namespace Foam
{ {
namespace compressibilityModels namespace compressibilityModels
{ {
defineTypeNameAndDebug(Chung, 0);
defineTypeNameAndDebug(Chung, 0); addToRunTimeSelectionTable
addToRunTimeSelectionTable(barotropicCompressibilityModel, Chung, dictionary); (
barotropicCompressibilityModel,
} Chung,
dictionary
);
}
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -45,10 +48,11 @@ addToRunTimeSelectionTable(barotropicCompressibilityModel, Chung, dictionary);
Foam::compressibilityModels::Chung::Chung Foam::compressibilityModels::Chung::Chung
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName
) )
: :
barotropicCompressibilityModel(compressibilityProperties, gamma), barotropicCompressibilityModel(compressibilityProperties, gamma, psiName),
psiv_(compressibilityProperties_.lookup("psiv")), psiv_(compressibilityProperties_.lookup("psiv")),
psil_(compressibilityProperties_.lookup("psil")), psil_(compressibilityProperties_.lookup("psil")),
rhovSat_(compressibilityProperties_.lookup("rhovSat")), rhovSat_(compressibilityProperties_.lookup("rhovSat")),

View File

@ -75,7 +75,8 @@ public:
Chung Chung
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName = "psi"
); );

View File

@ -31,13 +31,16 @@ License
namespace Foam namespace Foam
{ {
namespace compressibilityModels namespace compressibilityModels
{ {
defineTypeNameAndDebug(Wallis, 0);
defineTypeNameAndDebug(Wallis, 0); addToRunTimeSelectionTable
addToRunTimeSelectionTable(barotropicCompressibilityModel, Wallis, dictionary); (
barotropicCompressibilityModel,
} Wallis,
dictionary
);
}
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -45,10 +48,11 @@ addToRunTimeSelectionTable(barotropicCompressibilityModel, Wallis, dictionary);
Foam::compressibilityModels::Wallis::Wallis Foam::compressibilityModels::Wallis::Wallis
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName
) )
: :
barotropicCompressibilityModel(compressibilityProperties, gamma), barotropicCompressibilityModel(compressibilityProperties, gamma, psiName),
psiv_(compressibilityProperties_.lookup("psiv")), psiv_(compressibilityProperties_.lookup("psiv")),
psil_(compressibilityProperties_.lookup("psil")), psil_(compressibilityProperties_.lookup("psil")),
rhovSat_(compressibilityProperties_.lookup("rhovSat")), rhovSat_(compressibilityProperties_.lookup("rhovSat")),
@ -62,8 +66,9 @@ Foam::compressibilityModels::Wallis::Wallis
void Foam::compressibilityModels::Wallis::correct() void Foam::compressibilityModels::Wallis::correct()
{ {
psi_ = (gamma_*rhovSat_ + (scalar(1) - gamma_)*rholSat_) psi_ =
*(gamma_*psiv_/rhovSat_ + (scalar(1) - gamma_)*psil_/rholSat_); (gamma_*rhovSat_ + (scalar(1) - gamma_)*rholSat_)
*(gamma_*psiv_/rhovSat_ + (scalar(1) - gamma_)*psil_/rholSat_);
} }

View File

@ -75,7 +75,8 @@ public:
Wallis Wallis
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName = "psi"
); );

View File

@ -42,7 +42,8 @@ namespace Foam
Foam::barotropicCompressibilityModel::barotropicCompressibilityModel Foam::barotropicCompressibilityModel::barotropicCompressibilityModel
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName
) )
: :
compressibilityProperties_(compressibilityProperties), compressibilityProperties_(compressibilityProperties),
@ -50,12 +51,12 @@ Foam::barotropicCompressibilityModel::barotropicCompressibilityModel
( (
IOobject IOobject
( (
"psi", psiName,
gamma.mesh().time().timeName(), gamma.mesh().time().timeName(),
gamma.mesh() gamma.mesh()
), ),
gamma.mesh(), gamma.mesh(),
dimensionedScalar("psi", dimensionSet(0, -2, 2, 0, 0), 0) dimensionedScalar(psiName, dimensionSet(0, -2, 2, 0, 0), 0)
), ),
gamma_(gamma) gamma_(gamma)
{} {}

View File

@ -97,9 +97,10 @@ public:
dictionary, dictionary,
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName
), ),
(compressibilityProperties, gamma) (compressibilityProperties, gamma, psiName)
); );
@ -109,7 +110,8 @@ public:
static autoPtr<barotropicCompressibilityModel> New static autoPtr<barotropicCompressibilityModel> New
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName = "psi"
); );
@ -119,7 +121,8 @@ public:
barotropicCompressibilityModel barotropicCompressibilityModel
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName = "psi"
); );

View File

@ -32,7 +32,8 @@ Foam::autoPtr<Foam::barotropicCompressibilityModel>
Foam::barotropicCompressibilityModel::New Foam::barotropicCompressibilityModel::New
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName
) )
{ {
word bcModelTypeName word bcModelTypeName
@ -60,7 +61,7 @@ Foam::barotropicCompressibilityModel::New
return autoPtr<barotropicCompressibilityModel> return autoPtr<barotropicCompressibilityModel>
( (
cstrIter()(compressibilityProperties, gamma) cstrIter()(compressibilityProperties, gamma, psiName)
); );
} }

View File

@ -31,13 +31,16 @@ License
namespace Foam namespace Foam
{ {
namespace compressibilityModels namespace compressibilityModels
{ {
defineTypeNameAndDebug(linear, 0);
defineTypeNameAndDebug(linear, 0); addToRunTimeSelectionTable
addToRunTimeSelectionTable(barotropicCompressibilityModel, linear, dictionary); (
barotropicCompressibilityModel,
} linear,
dictionary
);
}
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -45,10 +48,11 @@ addToRunTimeSelectionTable(barotropicCompressibilityModel, linear, dictionary);
Foam::compressibilityModels::linear::linear Foam::compressibilityModels::linear::linear
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName
) )
: :
barotropicCompressibilityModel(compressibilityProperties, gamma), barotropicCompressibilityModel(compressibilityProperties, gamma, psiName),
psiv_(compressibilityProperties_.lookup("psiv")), psiv_(compressibilityProperties_.lookup("psiv")),
psil_(compressibilityProperties_.lookup("psil")) psil_(compressibilityProperties_.lookup("psil"))
{ {

View File

@ -72,7 +72,8 @@ public:
linear linear
( (
const dictionary& compressibilityProperties, const dictionary& compressibilityProperties,
const volScalarField& gamma const volScalarField& gamma,
const word& psiName = "psi"
); );

View File

@ -23,10 +23,16 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description Description
Nastran surface reader. Does Ansa $ANSA_NAME extension to get name Nastran surface reader.
of patch. Handles Ansa coordinates like:
- Uses the Ansa "$ANSA_NAME" or the Hypermesh "$HMNAME COMP" extensions
to obtain patch names.
- Handles Nastran short and long formats, but not free format.
- Properly handles the Nastran compact floating point notation: \n
@verbatim
GRID 28 10.20269-.030265-2.358-8 GRID 28 10.20269-.030265-2.358-8
@endverbatim
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -49,13 +55,13 @@ static scalar parseNASCoord(const string& s)
if (expSign != string::npos && expSign > 0 && !isspace(s[expSign-1])) if (expSign != string::npos && expSign > 0 && !isspace(s[expSign-1]))
{ {
scalar mantissa = readScalar(IStringStream(s.substr(0, expSign))()); scalar mantissa = readScalar(IStringStream(s.substr(0, expSign))());
scalar exp = readScalar(IStringStream(s.substr(expSign+1))()); scalar exponent = readScalar(IStringStream(s.substr(expSign+1))());
if (s[expSign] == '-') if (s[expSign] == '-')
{ {
exp = -exp; exponent = -exponent;
} }
return mantissa*pow(10, exp); return mantissa*pow(10, exponent);
} }
else else
{ {
@ -64,14 +70,14 @@ static scalar parseNASCoord(const string& s)
} }
bool triSurface::readNAS(const fileName& OBJfileName) bool triSurface::readNAS(const fileName& fName)
{ {
IFstream OBJfile(OBJfileName); IFstream is(fName);
if (!OBJfile.good()) if (!is.good())
{ {
FatalErrorIn("triSurface::readNAS(const fileName&)") FatalErrorIn("triSurface::readNAS(const fileName&)")
<< "Cannot read file " << OBJfileName << "Cannot read file " << fName
<< exit(FatalError); << exit(FatalError);
} }
@ -90,17 +96,17 @@ bool triSurface::readNAS(const fileName& OBJfileName)
// Ansa tags. Denoted by $ANSA_NAME. These will appear just before the // Ansa tags. Denoted by $ANSA_NAME. These will appear just before the
// first use of a type. We read them and store the pshell types which // first use of a type. We read them and store the pshell types which
// are used to name the patches. // are used to name the patches.
label ansaID = -1; label ansaId = -1;
word ansaType; word ansaType;
string ansaName; string ansaName;
// Done warnings per unrecognized command // A single warning per unrecognized command
HashSet<word> unhandledCmd; HashSet<word> unhandledCmd;
while (OBJfile.good()) while (is.good())
{ {
string line; string line;
OBJfile.getLine(line); is.getLine(line);
// Ansa extension // Ansa extension
if (line.substr(0, 10) == "$ANSA_NAME") if (line.substr(0, 10) == "$ANSA_NAME")
@ -116,14 +122,14 @@ bool triSurface::readNAS(const fileName& OBJfileName)
&& sem2 != string::npos && sem2 != string::npos
) )
{ {
ansaID = readLabel ansaId = readLabel
( (
IStringStream(line.substr(sem0+1, sem1-sem0-1))() IStringStream(line.substr(sem0+1, sem1-sem0-1))()
); );
ansaType = line.substr(sem1+1, sem2-sem1-1); ansaType = line.substr(sem1+1, sem2-sem1-1);
string nameString; string nameString;
OBJfile.getLine(ansaName); is.getLine(ansaName);
if (ansaName[ansaName.size()-1] == '\r') if (ansaName[ansaName.size()-1] == '\r')
{ {
ansaName = ansaName.substr(1, ansaName.size()-2); ansaName = ansaName.substr(1, ansaName.size()-2);
@ -132,13 +138,37 @@ bool triSurface::readNAS(const fileName& OBJfileName)
{ {
ansaName = ansaName.substr(1, ansaName.size()-1); ansaName = ansaName.substr(1, ansaName.size()-1);
} }
//Pout<< "ANSA tag for NastranID:" << ansaID
// << " of type " << ansaType // Info<< "ANSA tag for NastranID:" << ansaId
// << " name " << ansaName << endl; // << " of type " << ansaType
// << " name " << ansaName << endl;
} }
} }
// Hypermesh extension
// $HMNAME COMP 1"partName"
if
(
line.substr(0, 12) == "$HMNAME COMP"
&& line.find ('"') != string::npos
)
{
label groupId = readLabel
(
IStringStream(line.substr(16, 16))()
);
IStringStream lineStream(line.substr(32));
string rawName;
lineStream >> rawName;
groupToName.insert(groupId, string::validate<word>(rawName));
Info<< "group " << groupId << " => " << rawName << endl;
}
if (line.size() == 0 || line[0] == '$') if (line.size() == 0 || line[0] == '$')
{ {
// Skip empty or comment // Skip empty or comment
@ -153,7 +183,7 @@ bool triSurface::readNAS(const fileName& OBJfileName)
while (true) while (true)
{ {
string buf; string buf;
OBJfile.getLine(buf); is.getLine(buf);
if (buf.size() > 72 && buf[72]=='+') if (buf.size() > 72 && buf[72]=='+')
{ {
@ -174,26 +204,21 @@ bool triSurface::readNAS(const fileName& OBJfileName)
if (cmd == "CTRIA3") if (cmd == "CTRIA3")
{ {
//label index, group, a, b, c; label groupId = readLabel(IStringStream(line.substr(16,8))());
//lineStream >> index >> group >> a >> b >> c;
label group = readLabel(IStringStream(line.substr(16,8))());
label a = readLabel(IStringStream(line.substr(24,8))()); label a = readLabel(IStringStream(line.substr(24,8))());
label b = readLabel(IStringStream(line.substr(32,8))()); label b = readLabel(IStringStream(line.substr(32,8))());
label c = readLabel(IStringStream(line.substr(40,8))()); label c = readLabel(IStringStream(line.substr(40,8))());
// Convert group into patch // Convert group into patch
Map<label>::const_iterator iter = groupToPatch.find(group); Map<label>::const_iterator iter = groupToPatch.find(groupId);
label patchI; label patchI;
if (iter == groupToPatch.end()) if (iter == groupToPatch.end())
{ {
patchI = nPatches++; patchI = nPatches++;
groupToPatch.insert(groupId, patchI);
Pout<< "Allocating Foam patch " << patchI Info<< "patch " << patchI << " => group " << groupId << endl;
<< " for group " << group << endl;
groupToPatch.insert(group, patchI);
} }
else else
{ {
@ -204,26 +229,21 @@ bool triSurface::readNAS(const fileName& OBJfileName)
} }
else if (cmd == "CQUAD4") else if (cmd == "CQUAD4")
{ {
//label index, group, a, b, c, d; label groupId = readLabel(IStringStream(line.substr(16,8))());
//lineStream >> index >> group >> a >> b >> c >> d;
label group = readLabel(IStringStream(line.substr(16,8))());
label a = readLabel(IStringStream(line.substr(24,8))()); label a = readLabel(IStringStream(line.substr(24,8))());
label b = readLabel(IStringStream(line.substr(32,8))()); label b = readLabel(IStringStream(line.substr(32,8))());
label c = readLabel(IStringStream(line.substr(40,8))()); label c = readLabel(IStringStream(line.substr(40,8))());
label d = readLabel(IStringStream(line.substr(48,8))()); label d = readLabel(IStringStream(line.substr(48,8))());
// Convert group into patch // Convert group into patch
Map<label>::const_iterator iter = groupToPatch.find(group); Map<label>::const_iterator iter = groupToPatch.find(groupId);
label patchI; label patchI;
if (iter == groupToPatch.end()) if (iter == groupToPatch.end())
{ {
patchI = nPatches++; patchI = nPatches++;
groupToPatch.insert(groupId, patchI);
Pout<< "Allocating Foam patch " << patchI Info<< "patch " << patchI << " => group " << groupId << endl;
<< " for group " << group << endl;
groupToPatch.insert(group, patchI);
} }
else else
{ {
@ -235,66 +255,56 @@ bool triSurface::readNAS(const fileName& OBJfileName)
} }
else if (cmd == "PSHELL") else if (cmd == "PSHELL")
{ {
// Read shell type since gives patchnames. // Read shell type since group gives patchnames
//label group; label groupId = readLabel(IStringStream(line.substr(8,8))());
//lineStream >> group; if (groupId == ansaId && ansaType == "PSHELL")
label group = readLabel(IStringStream(line.substr(8,8))());
if (group == ansaID && ansaType == "PSHELL")
{ {
Pout<< "Found name " << ansaName << " for group " groupToName.insert(groupId, string::validate<word>(ansaName));
<< group << endl; Info<< "group " << groupId << " => " << ansaName << endl;
groupToName.insert(group, string::validate<word>(ansaName));
} }
} }
else if (cmd == "GRID") else if (cmd == "GRID")
{ {
//label index;
//lineStream >> index;
label index = readLabel(IStringStream(line.substr(8,8))()); label index = readLabel(IStringStream(line.substr(8,8))());
indices.append(index);
scalar x = parseNASCoord(line.substr(24, 8)); scalar x = parseNASCoord(line.substr(24, 8));
scalar y = parseNASCoord(line.substr(32, 8)); scalar y = parseNASCoord(line.substr(32, 8));
scalar z = parseNASCoord(line.substr(40, 8)); scalar z = parseNASCoord(line.substr(40, 8));
indices.append(index);
points.append(point(x, y, z)); points.append(point(x, y, z));
} }
else if (cmd == "GRID*") else if (cmd == "GRID*")
{ {
// Assume on two lines with '*' continuation symbol on start of // Long format is on two lines with '*' continuation symbol
// second line. (comes out of Tgrid. Typical line (spaces truncated) // on start of second line.
// Typical line (spaces compacted)
// GRID* 126 0 -5.55999875E+02 -5.68730474E+02 // GRID* 126 0 -5.55999875E+02 -5.68730474E+02
// * 2.14897901E+02 // * 2.14897901E+02
string line2;
OBJfile.getLine(line2); label index = readLabel(IStringStream(line.substr(8,16))());
if (line2[0] != '*') scalar x = parseNASCoord(line.substr(40, 16));
scalar y = parseNASCoord(line.substr(56, 16));
is.getLine(line);
if (line[0] != '*')
{ {
FatalErrorIn("triSurface::readNAS(const fileName&)") FatalErrorIn("triSurface::readNAS(const fileName&)")
<< "Expected continuation symbol '*' when reading GRID*" << "Expected continuation symbol '*' when reading GRID*"
<< " (double precision coordinate) output by Tgrid" << nl << " (double precision coordinate) output" << nl
<< "Read:" << line2 << nl << "Read:" << line << nl
<< "File:" << OBJfile.name() << "File:" << is.name()
<< " line:" << OBJfile.lineNumber() << " line:" << is.lineNumber()
<< exit(FatalError); << exit(FatalError);
} }
IStringStream lineStream(line.substr(10) + line2.substr(1)); scalar z = parseNASCoord(line.substr(8, 16));
label index;
lineStream >> index;
indices.append(index); indices.append(index);
readScalar(lineStream); // What is this field?
scalar x = readScalar(lineStream);
scalar y = readScalar(lineStream);
scalar z = readScalar(lineStream);
points.append(point(x, y, z)); points.append(point(x, y, z));
} }
else if (unhandledCmd.insert(cmd)) else if (unhandledCmd.insert(cmd))
{ {
Info<< "Unhandled Nastran command " << line << nl Info<< "Unhandled Nastran command " << line << nl
<< "File:" << OBJfile.name() << "File:" << is.name() << " line:" << is.lineNumber() << endl;
<< " line:" << OBJfile.lineNumber()
<< endl;
} }
} }
@ -303,7 +313,7 @@ bool triSurface::readNAS(const fileName& OBJfileName)
faces.shrink(); faces.shrink();
Pout<< "Read triangles:" << faces.size() << " points:" << points.size() Info<< "Read triangles:" << faces.size() << " points:" << points.size()
<< endl; << endl;
{ {
@ -314,7 +324,7 @@ bool triSurface::readNAS(const fileName& OBJfileName)
indexToPoint.insert(indices[i], i); indexToPoint.insert(indices[i], i);
} }
// Relabel triangles // Relabel faces
forAll(faces, i) forAll(faces, i)
{ {
labelledTri& f = faces[i]; labelledTri& f = faces[i];
@ -341,7 +351,7 @@ bool triSurface::readNAS(const fileName& OBJfileName)
); );
} }
Pout<< "patches:" << patches << endl; Info<< "patches:" << patches << endl;
// Transfer DynamicLists to straight ones. // Transfer DynamicLists to straight ones.

View File

@ -2,8 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
set -x set -x
wmakeLnInclude -f incompressible
wmake libso LESfilters wmake libso LESfilters
wmakeLnInclude incompressible
wmake libso LESdeltas wmake libso LESdeltas
wmake libso incompressible wmake libso incompressible
wmake libso compressible wmake libso compressible

View File

@ -14,6 +14,6 @@ SpalartAllmaras/SpalartAllmaras.C
wallFunctions=derivedFvPatchFields/wallFunctions wallFunctions=derivedFvPatchFields/wallFunctions
muSgsWallFunctions=$(wallFunctions)/muSgsWallFunctions muSgsWallFunctions=$(wallFunctions)/muSgsWallFunctions
$(muSgsWallFunctions)/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C $(muSgsWallFunctions)/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libcompressibleLESModels LIB = $(FOAM_LIBBIN)/libcompressibleLESModels

View File

@ -1,6 +1,6 @@
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../LESdeltas/lnInclude \ -I../LESdeltas/lnInclude \
-I../LESfilters/lnInclude \ -I../LESfilters/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "muSgsWallFunctionFvPatchScalarField.H" #include "muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H"
#include "LESModel.H" #include "LESModel.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
@ -41,7 +41,8 @@ namespace LESModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField::
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -51,9 +52,10 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{} {}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField::
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const muSgsWallFunctionFvPatchScalarField& ptf, const muSgsSpalartAllmarasWallFunctionFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper const fvPatchFieldMapper& mapper
@ -63,7 +65,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{} {}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField::
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -74,7 +77,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{} {}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField::
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -85,18 +89,20 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
{} {}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField::
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const muSgsWallFunctionFvPatchScalarField& tppsf const muSgsSpalartAllmarasWallFunctionFvPatchScalarField& tppsf
) )
: :
fixedValueFvPatchScalarField(tppsf) fixedValueFvPatchScalarField(tppsf)
{} {}
muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField::
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const muSgsWallFunctionFvPatchScalarField& tppsf, const muSgsSpalartAllmarasWallFunctionFvPatchScalarField& tppsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
@ -106,7 +112,7 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void muSgsWallFunctionFvPatchScalarField::evaluate void muSgsSpalartAllmarasWallFunctionFvPatchScalarField::evaluate
( (
const Pstream::commsTypes const Pstream::commsTypes
) )
@ -184,7 +190,11 @@ void muSgsWallFunctionFvPatchScalarField::evaluate
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, muSgsWallFunctionFvPatchScalarField); makePatchTypeField
(
fvPatchScalarField,
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,18 +23,19 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::compressible::LESModels::muSgsWallFunctionFvPatchScalarField Foam::compressible::LESModels::
muSgsSpalartAllmarasWallFunctionFvPatchScalarField
Description Description
wall function boundary condition for compressible flows Spalart Allmaas wall function boundary condition for compressible flows
SourceFiles SourceFiles
muSgsWallFunctionFvPatchScalarField.C muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef muSgsWallFunctionFvPatchScalarField_H #ifndef muSgsSpalartAllmarasWallFunctionFvPatchScalarField_H
#define muSgsWallFunctionFvPatchScalarField_H #define muSgsSpalartAllmarasWallFunctionFvPatchScalarField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
@ -48,10 +49,10 @@ namespace LESModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class muSgsWallFunctionFvPatch Declaration Class muSgsSpalartAllmarasWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class muSgsWallFunctionFvPatchScalarField class muSgsSpalartAllmarasWallFunctionFvPatchScalarField
: :
public fixedValueFvPatchScalarField public fixedValueFvPatchScalarField
{ {
@ -61,20 +62,20 @@ class muSgsWallFunctionFvPatchScalarField
public: public:
//- Runtime type information //- Runtime type information
TypeName("muSgsWallFunction"); TypeName("muSgsSpalartAllmarasWallFunction");
// Constructors // Constructors
//- Construct from patch and internal field //- Construct from patch and internal field
muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct from patch, internal field and Istream //- Construct from patch, internal field and Istream
muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
@ -82,27 +83,28 @@ public:
); );
//- Construct from patch, internal field and dictionary //- Construct from patch, internal field and dictionary
muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const dictionary& const dictionary&
); );
//- Construct by mapping given muSgsWallFunctionFvPatchScalarField //- Construct by mapping given
// muSgsSpalartAllmarasWallFunctionFvPatchScalarField
// onto a new patch // onto a new patch
muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const muSgsWallFunctionFvPatchScalarField&, const muSgsSpalartAllmarasWallFunctionFvPatchScalarField&,
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper& const fvPatchFieldMapper&
); );
//- Construct as copy //- Construct as copy
muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const muSgsWallFunctionFvPatchScalarField& const muSgsSpalartAllmarasWallFunctionFvPatchScalarField&
); );
//- Construct and return a clone //- Construct and return a clone
@ -110,14 +112,14 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new muSgsWallFunctionFvPatchScalarField(*this) new muSgsSpalartAllmarasWallFunctionFvPatchScalarField(*this)
); );
} }
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
muSgsWallFunctionFvPatchScalarField muSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const muSgsWallFunctionFvPatchScalarField&, const muSgsSpalartAllmarasWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
@ -129,7 +131,11 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new muSgsWallFunctionFvPatchScalarField(*this, iF) new muSgsSpalartAllmarasWallFunctionFvPatchScalarField
(
*this,
iF
)
); );
} }

View File

@ -29,7 +29,7 @@ dynMixedSmagorinsky/dynMixedSmagorinsky.C
wallFunctions=derivedFvPatchFields/wallFunctions wallFunctions=derivedFvPatchFields/wallFunctions
nuSgsWallFunctions=$(wallFunctions)/nuSgsWallFunctions nuSgsWallFunctions=$(wallFunctions)/nuSgsWallFunctions
$(nuSgsWallFunctions)/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C $(nuSgsWallFunctions)/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libincompressibleLESModels LIB = $(FOAM_LIBBIN)/libincompressibleLESModels

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "nuSgsWallFunctionFvPatchScalarField.H" #include "nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.H"
#include "LESModel.H" #include "LESModel.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
@ -41,7 +41,8 @@ namespace LESModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField::
nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -51,9 +52,10 @@ nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField
{} {}
nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField::
nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const nuSgsWallFunctionFvPatchScalarField& ptf, const nuSgsSpalartAllmarasWallFunctionFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper const fvPatchFieldMapper& mapper
@ -63,7 +65,8 @@ nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField
{} {}
nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField::
nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -74,18 +77,20 @@ nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField
{} {}
nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField::
nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const nuSgsWallFunctionFvPatchScalarField& tppsf const nuSgsSpalartAllmarasWallFunctionFvPatchScalarField& tppsf
) )
: :
fixedValueFvPatchScalarField(tppsf) fixedValueFvPatchScalarField(tppsf)
{} {}
nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField::
nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const nuSgsWallFunctionFvPatchScalarField& tppsf, const nuSgsSpalartAllmarasWallFunctionFvPatchScalarField& tppsf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
) )
: :
@ -95,7 +100,7 @@ nuSgsWallFunctionFvPatchScalarField::nuSgsWallFunctionFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void nuSgsWallFunctionFvPatchScalarField::evaluate void nuSgsSpalartAllmarasWallFunctionFvPatchScalarField::evaluate
( (
const Pstream::commsTypes const Pstream::commsTypes
) )
@ -166,7 +171,11 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField(fvPatchScalarField, nuSgsWallFunctionFvPatchScalarField); makePatchTypeField
(
fvPatchScalarField,
nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,18 +23,19 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::incompressible::LESModels::nuSgsWallFunctionFvPatchScalarField Foam::incompressible::LESModels::
nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
Description Description
wall function boundary condition for incompressible flows Spalart Allmaras wall function boundary condition for incompressible flows
SourceFiles SourceFiles
nuSgsWallFunctionFvPatchScalarField.C nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef nuSgsWallFunctionFvPatchScalarField_H #ifndef nuSgsSpalartAllmarasWallFunctionFvPatchScalarField_H
#define nuSgsWallFunctionFvPatchScalarField_H #define nuSgsSpalartAllmarasWallFunctionFvPatchScalarField_H
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
@ -48,10 +49,10 @@ namespace LESModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class nuSgsWallFunctionFvPatch Declaration Class nuSgsSpalartAllmarasWallFunctionFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class nuSgsWallFunctionFvPatchScalarField class nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
: :
public fixedValueFvPatchScalarField public fixedValueFvPatchScalarField
{ {
@ -61,40 +62,41 @@ class nuSgsWallFunctionFvPatchScalarField
public: public:
//- Runtime type information //- Runtime type information
TypeName("nuSgsWallFunction"); TypeName("nuSgsSpalartAllmarasWallFunction");
// Constructors // Constructors
//- Construct from patch and internal field //- Construct from patch and internal field
nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
//- Construct from patch, internal field and dictionary //- Construct from patch, internal field and dictionary
nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const dictionary& const dictionary&
); );
//- Construct by mapping given nuSgsWallFunctionFvPatchScalarField //- Construct by mapping given
// nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
// onto a new patch // onto a new patch
nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const nuSgsWallFunctionFvPatchScalarField&, const nuSgsSpalartAllmarasWallFunctionFvPatchScalarField&,
const fvPatch&, const fvPatch&,
const DimensionedField<scalar, volMesh>&, const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper& const fvPatchFieldMapper&
); );
//- Construct as copy //- Construct as copy
nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const nuSgsWallFunctionFvPatchScalarField& const nuSgsSpalartAllmarasWallFunctionFvPatchScalarField&
); );
//- Construct and return a clone //- Construct and return a clone
@ -102,14 +104,14 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new nuSgsWallFunctionFvPatchScalarField(*this) new nuSgsSpalartAllmarasWallFunctionFvPatchScalarField(*this)
); );
} }
//- Construct as copy setting internal field reference //- Construct as copy setting internal field reference
nuSgsWallFunctionFvPatchScalarField nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
( (
const nuSgsWallFunctionFvPatchScalarField&, const nuSgsSpalartAllmarasWallFunctionFvPatchScalarField&,
const DimensionedField<scalar, volMesh>& const DimensionedField<scalar, volMesh>&
); );
@ -121,7 +123,11 @@ public:
{ {
return tmp<fvPatchScalarField> return tmp<fvPatchScalarField>
( (
new nuSgsWallFunctionFvPatchScalarField(*this, iF) new nuSgsSpalartAllmarasWallFunctionFvPatchScalarField
(
*this,
iF
)
); );
} }

View File

@ -32,15 +32,15 @@
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
echo "Cleaning backup files" echo "--------"
echo "Cleaning tutorials ..."
echo "Removing backup files"
find . -type f \( -name "*~" -o -name "*.bak" \) -exec rm {} \; find . -type f \( -name "*~" -o -name "*.bak" \) -exec rm {} \;
find . \( -name 'core' -o -name 'core.[1-9]*' \) -exec rm {} \; find . \( -name 'core' -o -name 'core.[1-9]*' \) -exec rm {} \;
find . \( -name '*.pvs' -o -name '*.OpenFOAM' \) -exec rm {} \; find . \( -name '*.pvs' -o -name '*.OpenFOAM' \) -exec rm {} \;
rm logs > /dev/null 2>&1 rm logs testLoopReport > /dev/null 2>&1
rm testLoopReport > /dev/null 2>&1
echo ""
foamCleanTutorials cases foamCleanTutorials cases
echo "--------"
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -15,8 +15,8 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros // General m4 macros
changecom(//)changequote([,]) changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'use Math::Trig; use POSIX; printf ($1)')]) define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
define(VCOUNT, 0) define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])

View File

@ -15,8 +15,8 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros // General m4 macros
changecom(//)changequote([,]) changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'use Math::Trig; use POSIX; print ($1)')]) define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
define(VCOUNT, 0) define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])

View File

@ -15,8 +15,8 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros // General m4 macros
changecom(//)changequote([,]) changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'use Math::Trig; use POSIX; printf ($1)')]) define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
define(VCOUNT, 0) define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])

View File

@ -15,8 +15,8 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros // General m4 macros
changecom(//)changequote([,]) changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'use Math::Trig; use POSIX; print ($1)')]) define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
define(VCOUNT, 0) define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])

View File

@ -15,8 +15,8 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros // General m4 macros
changecom(//)changequote([,]) changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'use Math::Trig; use POSIX; print ($1)')]) define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
define(VCOUNT, 0) define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])

View File

@ -39,20 +39,27 @@
for dir in lib applications/bin for dir in lib applications/bin
do do
echo "Removing $dir/"
[ -d $dir ] && rm -rf $dir/* [ -d $dir ] && rm -rf $dir/*
done done
( cd tutorials && ./Allclean ) echo "Removing *~ backup files"
find . -name '*~' -exec rm {} \; find . -name '*~' -exec rm {} \;
echo "Removing .dep files"
find . -name '*.dep' -exec rm {} \; find . -name '*.dep' -exec rm {} \;
echo "Cleaning Make subdirectories"
find `find . -depth \( -name "Make.[A-Za-z]*" -o -name "Make" \) -type d -print` -depth \( -type d ! -name "*Make.[A-Za-z]*" ! -name "*Make" \) -exec rm -rf {} \; find `find . -depth \( -name "Make.[A-Za-z]*" -o -name "Make" \) -type d -print` -depth \( -type d ! -name "*Make.[A-Za-z]*" ! -name "*Make" \) -exec rm -rf {} \;
echo "Removing lnInclude and intermediate directories"
find . -depth -type d \( -name lnInclude -o -name ii_files -o -name Templates.DB \) -exec rm -rf {} \; find . -depth -type d \( -name lnInclude -o -name ii_files -o -name Templates.DB \) -exec rm -rf {} \;
echo "Removing misc files"
find . \( -name exe -o -name log -o -name so_locations \) -exec rm {} \; find . \( -name exe -o -name log -o -name so_locations \) -exec rm {} \;
# rm -rf src/mpich-${MPICH_VERSION}/platforms # rm -rf src/mpich-${MPICH_VERSION}/platforms
( cd tutorials && ./Allclean )
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -24,11 +24,10 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
# Script # Script
# wmakeAlmostAll # wcleanAlmostAll
# #
# Description # Description
# script that searches all the directories below the current for the # as per wcleanAll, but retains "*~" backup files
# object file directories of all machines and then deletes them.
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -39,18 +38,25 @@
for dir in lib applications/bin for dir in lib applications/bin
do do
echo "Removing $dir/"
[ -d $dir ] && rm -rf $dir/* [ -d $dir ] && rm -rf $dir/*
done done
( cd tutorials && ./Allclean ) echo "Retaining *~ backup files"
## find . -name '*~' -exec rm {} \;
# find . -name '*~' -exec rm {} \; echo "Removing .dep files"
find . -name '*.dep' -exec rm {} \; find . -name '*.dep' -exec rm {} \;
find `find . -depth \( -name "Make[.A-Za-z]*" -o -name "Make" \) -type d -print` -depth \( -type d ! -name "*Make[.A-Za-z]*" ! -name "*Make" \) -exec rm -r {} \; echo "Cleaning Make subdirectories"
find `find . -depth \( -name "Make.[A-Za-z]*" -o -name "Make" \) -type d -print` -depth \( -type d ! -name "*Make.[A-Za-z]*" ! -name "*Make" \) -exec rm -rf {} \;
echo "Removing lnInclude and intermediate directories"
find . -depth -type d \( -name lnInclude -o -name ii_files -o -name Templates.DB \) -exec rm -rf {} \; find . -depth -type d \( -name lnInclude -o -name ii_files -o -name Templates.DB \) -exec rm -rf {} \;
echo "Removing misc files"
find . \( -name exe -o -name log -o -name so_locations \) -exec rm {} \; find . \( -name exe -o -name log -o -name so_locations \) -exec rm {} \;
( cd tutorials && ./Allclean )
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -24,7 +24,7 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
# Script # Script
# wmakeLnInclude # wcleanLnIncludeAll
# #
# Description # Description
# Delete all the lnInclude directories in the tree. # Delete all the lnInclude directories in the tree.

View File

@ -80,8 +80,18 @@ do
done done
baseDir=$1 baseDir=$1
# convert incorrect path/dir/lnInclude to something sensible
while [ "${baseDir##*/}" = lnInclude ]
do
baseDir="${baseDir%/*}"
if [ "$baseDir" = lnInclude ]
then
baseDir="."
fi
done
incDir=$baseDir/lnInclude incDir=$baseDir/lnInclude
if [ $# -eq 1 ] if [ $# -eq 1 ]
then then
lnOpt="-s" lnOpt="-s"
@ -89,7 +99,7 @@ elif [ $# -eq 2 ]
then then
lnOpt="$2" lnOpt="$2"
else else
usage "ERROR: wrong number of arguments" usage "ERROR: incorrect number of arguments"
fi fi
@ -101,7 +111,6 @@ fi
if [ -d $incDir ] if [ -d $incDir ]
then then
# could change force to remove lnInclude first
if [ ! "$forceUpdate" ] if [ ! "$forceUpdate" ]
then then
# echo $Script: include directory $incDir already exists, exiting. # echo $Script: include directory $incDir already exists, exiting.
@ -117,24 +126,34 @@ then
exit 0 exit 0
fi fi
cd $incDir || exit 1
# Link include files # Link include files
# ~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~
echo $Script: linking include files to $incDir echo $Script: linking include files to $incDir
echo
cd $incDir
find .. $findOpt \
\( -name lnInclude -o -name -Make -o -name config \) -prune \
-o \( -name '*.[CHh]' -o -name '*.[ch]xx' -o -name '*.[ch]pp' -o -name '*.type' \) \
-a ! -name ".#*" \
-exec ln $lnOpt {} . \;
# #
# remove any broken links # remove any broken links first (this helps when file locations have moved)
# #
find -L . -type l -exec rm \{\} \; find -L . -type l -exec rm \{\} \;
#
# create links, avoid recreating links unless necessary
#
find .. $findOpt \
\( -name lnInclude -o -name Make -o -name config \) -prune \
-o \( -name '*.[CHh]' -o -name '*.[ch]xx' -o -name '*.[ch]pp' -o -name '*.type' \) \
-a ! -name ".#*" \
-print | \
while read src
do
link=$(readlink ${src##*/})
if [ "$link" != "$src" ]
then
rm $link 2>/dev/null
ln $lnOpt $src .
fi
done
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------