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

This commit is contained in:
Sergio Ferraris
2013-06-12 10:22:04 +01:00
26 changed files with 192 additions and 83 deletions

View File

@ -87,7 +87,7 @@
forAll(Y, i) forAll(Y, i)
{ {
Y[i] = Y0[i]; Y[i] = Y0[i];
h0 += Y0[i]*specieData[i].Hs(p[i], T0); h0 += Y0[i]*specieData[i].Hs(p[0], T0);
} }
thermo.he() = dimensionedScalar("h", dimEnergy/dimMass, h0); thermo.he() = dimensionedScalar("h", dimEnergy/dimMass, h0);

View File

@ -1,5 +1,8 @@
EXE_INC = \ EXE_INC = \
-I../buoyantBoussinesqSimpleFoam \ -I../buoyantBoussinesqSimpleFoam \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
@ -9,6 +12,8 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools \ -lmeshTools \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \

View File

@ -11,12 +11,18 @@
- fvm::laplacian(alphaEff, T) - fvm::laplacian(alphaEff, T)
== ==
radiation->ST(rhoCpRef, T) radiation->ST(rhoCpRef, T)
+ fvOptions(T)
); );
TEqn.relax(); TEqn.relax();
fvOptions.constrain(TEqn);
TEqn.solve(); TEqn.solve();
radiation->correct(); radiation->correct();
fvOptions.correct(T);
rhok = 1.0 - beta*(T - TRef); rhok = 1.0 - beta*(T - TRef);
} }

View File

@ -5,10 +5,14 @@
fvm::ddt(U) fvm::ddt(U)
+ fvm::div(phi, U) + fvm::div(phi, U)
+ turbulence->divDevReff(U) + turbulence->divDevReff(U)
==
fvOptions(U)
); );
UEqn.relax(); UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {
solve solve
@ -23,4 +27,6 @@
)*mesh.magSf() )*mesh.magSf()
) )
); );
fvOptions.correct(U);
} }

View File

@ -48,8 +48,9 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "singlePhaseTransportModel.H"
#include "RASModel.H" #include "RASModel.H"
#include "pimpleControl.H"
#include "radiationModel.H" #include "radiationModel.H"
#include "fvIOoptionList.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,6 +62,7 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createIncompressibleRadiationModel.H" #include "createIncompressibleRadiationModel.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "readTimeControls.H" #include "readTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"

View File

@ -1,5 +1,8 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
@ -7,7 +10,9 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lsampling \
-lmeshTools \ -lmeshTools \
-lfvOptions \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleTransportModels -lincompressibleTransportModels

View File

@ -8,10 +8,17 @@
( (
fvm::div(phi, T) fvm::div(phi, T)
- fvm::laplacian(alphaEff, T) - fvm::laplacian(alphaEff, T)
==
fvOptions(T)
); );
TEqn.relax(); TEqn.relax();
fvOptions.constrain(TEqn);
TEqn.solve(); TEqn.solve();
fvOptions.correct(T);
rhok = 1.0 - beta*(T - TRef); rhok = 1.0 - beta*(T - TRef);
} }

View File

@ -4,16 +4,20 @@
( (
fvm::div(phi, U) fvm::div(phi, U)
+ turbulence->divDevReff(U) + turbulence->divDevReff(U)
==
fvOptions(U)
); );
UEqn().relax(); UEqn().relax();
fvOptions.constrain(UEqn());
if (simple.momentumPredictor()) if (simple.momentumPredictor())
{ {
solve solve
( (
UEqn() UEqn()
== ==
fvc::reconstruct fvc::reconstruct
( (
( (
@ -22,4 +26,6 @@
)*mesh.magSf() )*mesh.magSf()
) )
); );
fvOptions.correct(U);
} }

View File

@ -48,6 +48,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "singlePhaseTransportModel.H"
#include "RASModel.H" #include "RASModel.H"
#include "fvIOoptionList.H"
#include "simpleControl.H" #include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -59,6 +60,7 @@ int main(int argc, char *argv[])
#include "createMesh.H" #include "createMesh.H"
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
simpleControl simple(mesh); simpleControl simple(mesh);

View File

@ -254,31 +254,47 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
/Pstream::nProcs() /Pstream::nProcs()
); );
std::list<Cell_handle> infinite_cells;
Triangulation::incident_cells
(
Triangulation::infinite_vertex(),
std::back_inserter(infinite_cells)
);
for for
( (
All_cells_iterator cit = Triangulation::all_cells_begin(); typename std::list<Cell_handle>::iterator vcit = infinite_cells.begin();
cit != Triangulation::all_cells_end(); vcit != infinite_cells.end();
++vcit
)
{
Cell_handle cit = *vcit;
// Index of infinite vertex in this cell.
int i = cit->index(Triangulation::infinite_vertex());
Cell_handle c = cit->neighbor(i);
if (c->unassigned())
{
c->cellIndex() = this->getNewCellIndex();
if (checkProcBoundaryCell(c, circumsphereOverlaps))
{
cellToCheck.insert(c->cellIndex());
}
}
}
for
(
Finite_cells_iterator cit = Triangulation::finite_cells_begin();
cit != Triangulation::finite_cells_end();
++cit ++cit
) )
{ {
if (Triangulation::is_infinite(cit)) if (cit->parallelDualVertex())
{
// Index of infinite vertex in this cell.
int i = cit->index(Triangulation::infinite_vertex());
Cell_handle c = cit->neighbor(i);
if (c->unassigned())
{
c->cellIndex() = this->getNewCellIndex();
if (checkProcBoundaryCell(c, circumsphereOverlaps))
{
cellToCheck.insert(c->cellIndex());
}
}
}
else if (cit->parallelDualVertex())
{ {
if (cit->unassigned()) if (cit->unassigned())
{ {
@ -315,12 +331,20 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
continue; continue;
} }
checkProcBoundaryCell if
( (
citNeighbor, checkProcBoundaryCell
circumsphereOverlaps (
); citNeighbor,
circumsphereOverlaps
)
)
{
cellToCheck.insert(citNeighbor->cellIndex());
}
} }
cellToCheck.unset(cit->cellIndex());
} }
} }
} }
@ -521,7 +545,6 @@ Foam::label Foam::DistributedDelaunayMesh<Triangulation>::referVertices
<< originalParallelVertices[vI].procIndex() << originalParallelVertices[vI].procIndex()
<< " " << originalParallelVertices[vI].index() << endl; << " " << originalParallelVertices[vI].index() << endl;
} }
} }
} }
} }

View File

@ -130,7 +130,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
mesh.magSf() mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs() * mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(RASModel->nuEff()) * fvc::interpolate(RASModel->nuEff())
) )
) )
); );
} }
@ -192,8 +192,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
mesh, mesh,
IOobject::NO_READ IOobject::NO_READ
), ),
mesh.surfaceInterpolation::deltaCoeffs() mag(phi)
* (mag(phi)/mesh.magSf())*(runTime.deltaT()/nu) /(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* nu
)
) )
); );
} }
@ -317,8 +321,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
mesh, mesh,
IOobject::NO_READ IOobject::NO_READ
), ),
mesh.surfaceInterpolation::deltaCoeffs() mag(phi)
* (mag(phi)/(mesh.magSf()))*(runTime.deltaT()/mu) /(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* mu
)
) )
); );
} }
@ -330,26 +338,6 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
<< abort(FatalError); << abort(FatalError);
} }
// can also check how many cells exceed a particular Pe limit
/*
{
label count = 0;
label PeLimit = 200;
forAll(PePtr(), i)
{
if (PePtr()[i] > PeLimit)
{
count++;
}
}
Info<< "Fraction > " << PeLimit << " = "
<< scalar(count)/Pe.size() << endl;
}
*/
Info<< "Pe max : " << max(PePtr()).value() << endl; Info<< "Pe max : " << max(PePtr()).value() << endl;
if (writeResults) if (writeResults)

View File

@ -78,6 +78,7 @@ motionControl
objOutput no; objOutput no;
timeChecks no; timeChecks no;
printVertexInfo off;
maxLoadUnbalance 0.2; maxLoadUnbalance 0.2;

View File

@ -63,11 +63,11 @@ public:
//- Store object pointer //- Store object pointer
inline explicit autoPtr(T* = 0); inline explicit autoPtr(T* = 0);
//- Construct as copy by transfering pointer to this autoPtr and //- Construct as copy by transferring pointer to this autoPtr and
// setting the arguments pointer to NULL // setting the arguments pointer to NULL
inline autoPtr(const autoPtr<T>&); inline autoPtr(const autoPtr<T>&);
//- Construct either by transfering pointer or cloning. Should //- Construct either by transferring pointer or cloning. Should
// only be called with type that supports cloning. // only be called with type that supports cloning.
inline autoPtr(const autoPtr<T>&, const bool reUse); inline autoPtr(const autoPtr<T>&, const bool reUse);

View File

@ -88,7 +88,17 @@ Foam::porosityModel::porosityModel
const word& cellZoneName const word& cellZoneName
) )
: :
MeshObject<fvMesh, Foam::UpdateableMeshObject, porosityModel>(mesh), regIOobject
(
IOobject
(
name,
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
)
),
name_(name), name_(name),
mesh_(mesh), mesh_(mesh),
dict_(dict), dict_(dict),

View File

@ -36,7 +36,6 @@ SourceFiles
#ifndef porosityModel_H #ifndef porosityModel_H
#define porosityModel_H #define porosityModel_H
#include "MeshObject.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "dictionary.H" #include "dictionary.H"
#include "fvMatricesFwd.H" #include "fvMatricesFwd.H"
@ -56,7 +55,7 @@ namespace Foam
class porosityModel class porosityModel
: :
public MeshObject<fvMesh, UpdateableMeshObject, porosityModel> public regIOobject
{ {
private: private:

View File

@ -109,8 +109,6 @@ Foam::treeDataEdge::findIntersectOp::findIntersectOp
( (
const indexedOctree<treeDataEdge>& tree const indexedOctree<treeDataEdge>& tree
) )
:
tree_(tree)
{} {}

View File

@ -121,8 +121,6 @@ public:
class findIntersectOp class findIntersectOp
{ {
const indexedOctree<treeDataEdge>& tree_;
public: public:
findIntersectOp(const indexedOctree<treeDataEdge>& tree); findIntersectOp(const indexedOctree<treeDataEdge>& tree);

View File

@ -70,8 +70,6 @@ Foam::treeDataPoint::findIntersectOp::findIntersectOp
( (
const indexedOctree<treeDataPoint>& tree const indexedOctree<treeDataPoint>& tree
) )
:
tree_(tree)
{} {}

View File

@ -104,8 +104,6 @@ public:
class findIntersectOp class findIntersectOp
{ {
const indexedOctree<treeDataPoint>& tree_;
public: public:
findIntersectOp(const indexedOctree<treeDataPoint>& tree); findIntersectOp(const indexedOctree<treeDataPoint>& tree);

View File

@ -76,7 +76,7 @@ tmp<volVectorField> laminar::Us() const
( (
IOobject IOobject
( (
typeName + ".Us", typeName + ":Us",
owner_.regionMesh().time().timeName(), owner_.regionMesh().time().timeName(),
owner_.regionMesh(), owner_.regionMesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -104,7 +104,7 @@ tmp<volScalarField> laminar::mut() const
( (
IOobject IOobject
( (
typeName + ".mut", typeName + ":mut",
owner_.regionMesh().time().timeName(), owner_.regionMesh().time().timeName(),
owner_.regionMesh(), owner_.regionMesh(),
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -26,8 +26,6 @@ License
#include "standardPhaseChange.H" #include "standardPhaseChange.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "thermoSingleLayer.H" #include "thermoSingleLayer.H"
#include "specie.H"
#include "heatTransferModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
forAll(epsilonPatches, i) forAll(epsilonPatches, i)
{ {
label patchI = epsilonPatches[i]; label patchI = epsilonPatches[i];
const fvPatchField& wf = weights.boundaryField()[patchI]; const fvPatchScalarField& wf = weights.boundaryField()[patchI];
cornerWeights_[patchI] = 1.0/wf.patchInternalField(); cornerWeights_[patchI] = 1.0/wf.patchInternalField();
} }
@ -237,9 +237,9 @@ void epsilonWallFunctionFvPatchScalarField::calculate
scalar w = cornerWeights[faceI]; scalar w = cornerWeights[faceI];
epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); epsilon[cellI] += w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]);
G[cellI] = G[cellI] +=
w w
*(mutw[faceI] + muw[faceI]) *(mutw[faceI] + muw[faceI])
*magGradUw[faceI] *magGradUw[faceI]
@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField());
scalarField& epsilonf = *this;
// only set the values if the weights are < 1 - tolerance // only set the values if the weights are < 1 - tolerance
forAll(weights, faceI) forAll(weights, faceI)
{ {
@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI]; epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI];
epsilonf[faceI] = epsilon[cellI];
} }
} }

View File

@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
forAll(omegaPatches, i) forAll(omegaPatches, i)
{ {
label patchI = omegaPatches[i]; label patchI = omegaPatches[i];
const fvPatchField& wf = weights.boundaryField()[patchI]; const fvPatchScalarField& wf = weights.boundaryField()[patchI];
cornerWeights_[patchI] = 1.0/wf.patchInternalField(); cornerWeights_[patchI] = 1.0/wf.patchInternalField();
} }
@ -244,9 +244,9 @@ void omegaWallFunctionFvPatchScalarField::calculate
scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]);
omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog)); omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog));
G[cellI] = G[cellI] +=
w w
*(mutw[faceI] + muw[faceI]) *(mutw[faceI] + muw[faceI])
*magGradUw[faceI] *magGradUw[faceI]
@ -481,6 +481,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); FieldType& omega = const_cast<FieldType&>(dimensionedInternalField());
scalarField& omegaf = *this;
// only set the values if the weights are < 1 - tolerance // only set the values if the weights are < 1 - tolerance
forAll(weights, faceI) forAll(weights, faceI)
{ {
@ -492,6 +494,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI]; omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI];
omegaf[faceI] = omega[cellI];
} }
} }

View File

@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
forAll(epsilonPatches, i) forAll(epsilonPatches, i)
{ {
label patchI = epsilonPatches[i]; label patchI = epsilonPatches[i];
const fvPatchField& wf = weights.boundaryField()[patchI]; const fvPatchScalarField& wf = weights.boundaryField()[patchI];
cornerWeights_[patchI] = 1.0/wf.patchInternalField(); cornerWeights_[patchI] = 1.0/wf.patchInternalField();
} }
@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField());
scalarField& epsilonf = *this;
// only set the values if the weights are < 1 - tolerance // only set the values if the weights are < 1 - tolerance
forAll(weights, faceI) forAll(weights, faceI)
{ {
@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI]; epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI];
epsilonf[faceI] = epsilon[cellI];
} }
} }

View File

@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
forAll(omegaPatches, i) forAll(omegaPatches, i)
{ {
label patchI = omegaPatches[i]; label patchI = omegaPatches[i];
const fvPatchField& wf = weights.boundaryField()[patchI]; const fvPatchScalarField& wf = weights.boundaryField()[patchI];
cornerWeights_[patchI] = 1.0/wf.patchInternalField(); cornerWeights_[patchI] = 1.0/wf.patchInternalField();
} }
@ -242,9 +242,9 @@ void omegaWallFunctionFvPatchScalarField::calculate
scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]);
omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog)); omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog));
G[cellI] = G[cellI] +=
w w
*(nutw[faceI] + nuw[faceI]) *(nutw[faceI] + nuw[faceI])
*magGradUw[faceI] *magGradUw[faceI]
@ -479,6 +479,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); FieldType& omega = const_cast<FieldType&>(dimensionedInternalField());
scalarField& omegaf = *this;
// only set the values if the weights are < 1 - tolerance // only set the values if the weights are < 1 - tolerance
forAll(weights, faceI) forAll(weights, faceI)
{ {
@ -490,6 +492,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI]; omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI];
omegaf[faceI] = omega[cellI];
} }
} }

View File

@ -50,6 +50,7 @@ The 'target' is a Makefile target:
e.g., Make/linux64GccDPOpt/fvMesh.o e.g., Make/linux64GccDPOpt/fvMesh.o
or a special target: or a special target:
dwim search up directories tree for Make sub-directory and build
all all subdirectories, uses any Allwmake files if they exist all all subdirectories, uses any Allwmake files if they exist
exe build statically linked executable exe build statically linked executable
lib build statically linked archive lib (.a) lib build statically linked archive lib (.a)
@ -136,7 +137,7 @@ fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# check arguments and change to the directory in which to run wmake # Check arguments and change to the directory in which to run wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
unset dir makeType unset dir makeType
@ -167,6 +168,51 @@ then
fi fi
#------------------------------------------------------------------------------
# Search up directories tree for the Make sub-directory and build there
#------------------------------------------------------------------------------
unset dir
MakeDir=Make
expandpath()
{
dir=`dirname $1`
cwd=$PWD
cd $dir
exPath=$PWD
cd $cwd
}
find_target()
{
expandpath $1
if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]; then
echo "$Script error: could not find Make directory"
elif [ -d "$1/Make" ]; then
echo Target $1
dir=$1
else
find_target "$1/.."
fi
}
if [ "$makeType" = dwim ]
then
find_target .
makeType=
if [ "$dir" ]
then
cd $dir 2>/dev/null || {
echo "$Script error: could not change to directory '$dir'" 1>&2
exit 1
}
fi
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Recurse the application directories tree # Recurse the application directories tree
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -254,8 +300,9 @@ $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontInc
rc=$? rc=$?
[ $rc -eq 0 ] || exit $rc [ $rc -eq 0 ] || exit $rc
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# make the object files and link # Make the object files and link
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType" cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType"