Merge with master
--HG-- branch : macMerge
This commit is contained in:
commit
a77e5b12f0
18 changed files with 84 additions and 50 deletions
|
@ -31,7 +31,12 @@
|
||||||
- fvm::laplacian(rho*rUA, p)
|
- fvm::laplacian(rho*rUA, p)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr)
|
if
|
||||||
|
(
|
||||||
|
ocorr == nOuterCorr
|
||||||
|
&& corr == nCorr
|
||||||
|
&& nonOrth == nNonOrthCorr
|
||||||
|
)
|
||||||
{
|
{
|
||||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
pEqn.solve(mesh.solver(p.name() + "Final"));
|
||||||
}
|
}
|
||||||
|
@ -64,7 +69,12 @@
|
||||||
- fvm::laplacian(rho*rUA, p)
|
- fvm::laplacian(rho*rUA, p)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr)
|
if
|
||||||
|
(
|
||||||
|
ocorr == nOuterCorr
|
||||||
|
&& corr == nCorr
|
||||||
|
&& nonOrth == nNonOrthCorr
|
||||||
|
)
|
||||||
{
|
{
|
||||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
pEqn.solve(mesh.solver(p.name() + "Final"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,16 +42,16 @@ Description
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
#include "createTime.H"
|
# include "createTime.H"
|
||||||
#include "createMesh.H"
|
# include "createMesh.H"
|
||||||
#include "readChemistryProperties.H"
|
# include "readChemistryProperties.H"
|
||||||
#include "readGravitationalAcceleration.H"
|
# include "readGravitationalAcceleration.H"
|
||||||
#include "createFields.H"
|
# include "createFields.H"
|
||||||
#include "initContinuityErrs.H"
|
# include "initContinuityErrs.H"
|
||||||
#include "readTimeControls.H"
|
# include "readTimeControls.H"
|
||||||
#include "compressibleCourantNo.H"
|
# include "compressibleCourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
# include "setInitialDeltaT.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -59,27 +59,27 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
#include "readTimeControls.H"
|
# include "readTimeControls.H"
|
||||||
#include "readPISOControls.H"
|
# include "readPISOControls.H"
|
||||||
#include "compressibleCourantNo.H"
|
# include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
# include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
#include "chemistry.H"
|
# include "chemistry.H"
|
||||||
#include "rhoEqn.H"
|
# include "rhoEqn.H"
|
||||||
|
|
||||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||||
{
|
{
|
||||||
#include "UEqn.H"
|
# include "UEqn.H"
|
||||||
#include "YEqn.H"
|
# include "YEqn.H"
|
||||||
#include "hsEqn.H"
|
# include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
#include "pEqn.H"
|
# include "pEqn.H"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,12 @@ public:
|
||||||
//- Clone
|
//- Clone
|
||||||
tmp<Field<Type> > clone() const;
|
tmp<Field<Type> > clone() const;
|
||||||
|
|
||||||
|
//- Return a pointer to a new Field created on freestore
|
||||||
|
static autoPtr<Field<Type> > New(Istream& is)
|
||||||
|
{
|
||||||
|
return autoPtr<Field<Type> >(new Field<Type>(is));
|
||||||
|
}
|
||||||
|
|
||||||
//- Return a pointer to a new calculatedFvPatchFieldField created on
|
//- Return a pointer to a new calculatedFvPatchFieldField created on
|
||||||
// freestore without setting patchField values
|
// freestore without setting patchField values
|
||||||
template<class Type2>
|
template<class Type2>
|
||||||
|
|
|
@ -48,7 +48,6 @@ namespace Foam
|
||||||
|
|
||||||
typedef DiagTensor<scalar> diagTensor;
|
typedef DiagTensor<scalar> diagTensor;
|
||||||
|
|
||||||
|
|
||||||
//- Data associated with diagTensor type are contiguous
|
//- Data associated with diagTensor type are contiguous
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<diagTensor>() {return true;}
|
inline bool contiguous<diagTensor>() {return true;}
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace Foam
|
||||||
|
|
||||||
typedef SphericalTensor<label> labelSphericalTensor;
|
typedef SphericalTensor<label> labelSphericalTensor;
|
||||||
|
|
||||||
//- Identity labelTensor
|
//- Global identity labelTensor
|
||||||
static const labelSphericalTensor labelI(1);
|
static const labelSphericalTensor labelI(1);
|
||||||
|
|
||||||
//- Data associated with labelSphericalTensor type are contiguous
|
//- Data associated with labelSphericalTensor type are contiguous
|
||||||
|
|
|
@ -48,12 +48,11 @@ namespace Foam
|
||||||
|
|
||||||
typedef SphericalTensor<scalar> sphericalTensor;
|
typedef SphericalTensor<scalar> sphericalTensor;
|
||||||
|
|
||||||
|
// Global spherical tensor definitions
|
||||||
|
|
||||||
// Identity tensor
|
static const sphericalTensor I(1);
|
||||||
static const sphericalTensor I;
|
static const sphericalTensor oneThirdI(1.0/3.0);
|
||||||
|
static const sphericalTensor twoThirdsI(2.0/3.0);
|
||||||
static const sphericalTensor oneThirdI;
|
|
||||||
static const sphericalTensor twoThirdsI;
|
|
||||||
|
|
||||||
|
|
||||||
//- Specify data associated with sphericalTensor type are contiguous
|
//- Specify data associated with sphericalTensor type are contiguous
|
||||||
|
|
|
@ -49,9 +49,9 @@ namespace Foam
|
||||||
|
|
||||||
typedef SphericalTensor2D<scalar> sphericalTensor2D;
|
typedef SphericalTensor2D<scalar> sphericalTensor2D;
|
||||||
|
|
||||||
//- Identity tensor
|
// Global spherical tensor definitions
|
||||||
static const sphericalTensor2D I2D(1);
|
|
||||||
|
|
||||||
|
static const sphericalTensor2D I2D(1);
|
||||||
static const sphericalTensor2D oneThirdI2D(1.0/3.0);
|
static const sphericalTensor2D oneThirdI2D(1.0/3.0);
|
||||||
static const sphericalTensor2D twoThirdsI2D(2.0/3.0);
|
static const sphericalTensor2D twoThirdsI2D(2.0/3.0);
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,16 @@ SourceFiles
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef Vector<complex> complexVector;
|
|
||||||
}
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
typedef Vector<complex> complexVector;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "complexVectorI.H"
|
#include "complexVectorI.H"
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,11 @@ inline complex operator&(const complexVector& v1, const complexVector& v2)
|
||||||
|
|
||||||
// complexVector cross product
|
// complexVector cross product
|
||||||
|
|
||||||
inline complexVector operator^(const complexVector& v1, const complexVector& v2)
|
inline complexVector operator^
|
||||||
|
(
|
||||||
|
const complexVector& v1,
|
||||||
|
const complexVector& v2
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return complexVector
|
return complexVector
|
||||||
(
|
(
|
||||||
|
|
|
@ -49,7 +49,6 @@ namespace Foam
|
||||||
|
|
||||||
typedef Vector<label> labelVector;
|
typedef Vector<label> labelVector;
|
||||||
|
|
||||||
|
|
||||||
//- Data associated with labelVector type are contiguous
|
//- Data associated with labelVector type are contiguous
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<labelVector>() {return true;}
|
inline bool contiguous<labelVector>() {return true;}
|
||||||
|
|
|
@ -54,6 +54,7 @@ const vector vector::max(VGREAT, VGREAT, VGREAT);
|
||||||
template<>
|
template<>
|
||||||
const vector vector::min(-VGREAT, -VGREAT, -VGREAT);
|
const vector vector::min(-VGREAT, -VGREAT, -VGREAT);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
|
@ -49,7 +49,6 @@ namespace Foam
|
||||||
|
|
||||||
typedef Vector<scalar> vector;
|
typedef Vector<scalar> vector;
|
||||||
|
|
||||||
|
|
||||||
//- Data associated with vector type are contiguous
|
//- Data associated with vector type are contiguous
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<vector>() {return true;}
|
inline bool contiguous<vector>() {return true;}
|
||||||
|
|
|
@ -49,7 +49,6 @@ namespace Foam
|
||||||
|
|
||||||
typedef Vector2D<scalar> vector2D;
|
typedef Vector2D<scalar> vector2D;
|
||||||
|
|
||||||
|
|
||||||
//- Data associated with vector2D type are contiguous
|
//- Data associated with vector2D type are contiguous
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<vector2D>() {return true;}
|
inline bool contiguous<vector2D>() {return true;}
|
||||||
|
|
|
@ -31,7 +31,7 @@ License
|
||||||
template<class T>
|
template<class T>
|
||||||
void Foam::polyMeshAdder::append(const List<T>& lst, DynamicList<T>& dynLst)
|
void Foam::polyMeshAdder::append(const List<T>& lst, DynamicList<T>& dynLst)
|
||||||
{
|
{
|
||||||
dynLst.setSize(dynLst.size() + lst.size());
|
dynLst.setCapacity(dynLst.size() + lst.size());
|
||||||
|
|
||||||
forAll(lst, i)
|
forAll(lst, i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -241,6 +241,12 @@ Foam::faMesh::faMesh(const polyMesh& pMesh)
|
||||||
|
|
||||||
setPrimitiveMeshData();
|
setPrimitiveMeshData();
|
||||||
|
|
||||||
|
// Create global mesh data
|
||||||
|
if (Pstream::parRun())
|
||||||
|
{
|
||||||
|
globalData();
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate topology for the patches (processor-processor comms etc.)
|
// Calculate topology for the patches (processor-processor comms etc.)
|
||||||
boundary_.updateMesh();
|
boundary_.updateMesh();
|
||||||
|
|
||||||
|
|
|
@ -377,7 +377,7 @@ const unallocLabelList& faPatch::edgeFaces() const
|
||||||
// Return the patch edge centres
|
// Return the patch edge centres
|
||||||
const vectorField& faPatch::edgeCentres() const
|
const vectorField& faPatch::edgeCentres() const
|
||||||
{
|
{
|
||||||
return boundaryMesh().mesh().areaCentres().boundaryField()[index()];
|
return boundaryMesh().mesh().edgeCentres().boundaryField()[index()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -140,17 +140,21 @@ emptyFaPatchField<Type>::emptyFaPatchField
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void emptyFaPatchField<Type>::updateCoeffs()
|
void emptyFaPatchField<Type>::updateCoeffs()
|
||||||
{
|
{
|
||||||
if
|
// ZT, 26/06/2010, bug-fix for faMesh of zero size
|
||||||
(
|
if (this->dimensionedInternalField().mesh().nFaces())
|
||||||
this->patch().size()
|
|
||||||
% this->dimensionedInternalField().mesh().nFaces()
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
FatalErrorIn("emptyFaPatchField<Type>::updateCoeffs()")
|
if
|
||||||
<< "This mesh contains patches of type empty but is not 1D or 2D\n"
|
(
|
||||||
" by virtue of the fact that the number of faces of this\n"
|
this->patch().size()
|
||||||
" empty patch is not divisible by the number of cells."
|
% this->dimensionedInternalField().mesh().nFaces()
|
||||||
<< exit(FatalError);
|
)
|
||||||
|
{
|
||||||
|
FatalErrorIn("emptyFaPatchField<Type>::updateCoeffs()")
|
||||||
|
<< "This mesh contains patches of type empty but is not 1D or 2D\n"
|
||||||
|
" by virtue of the fact that the number of faces of this\n"
|
||||||
|
" empty patch is not divisible by the number of cells."
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue