Merge commit 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2009-12-03 16:40:37 +01:00
18 changed files with 138 additions and 104 deletions

View File

@ -89,7 +89,7 @@ int main(int argc, char *argv[])
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~
scalar minRange = GREAT; scalar minRange = GREAT;
direction extrudeDir = -1; direction extrudeDir = 4; //illegal value.
for (direction dir = 0; dir < 3; dir++) for (direction dir = 0; dir < 3; dir++)
{ {

View File

@ -36,9 +36,10 @@ Description
- mesh with cells put into cellZones (-makeCellZones) - mesh with cells put into cellZones (-makeCellZones)
Note: Note:
- Should work in parallel but cellZone interfaces cannot align with - Should work in parallel.
processor boundaries so use the correct option in decomposition to cellZones can differ on either side of processor boundaries in which case
preserve those interfaces. the faces get moved from processor patch to directMapped patch. Not
ery well tested.
- If a cell zone gets split into more than one region it can detect - If a cell zone gets split into more than one region it can detect
the largest matching region (-sloppyCellZones). This will accept any the largest matching region (-sloppyCellZones). This will accept any
region that covers more than 50% of the zone. It has to be a subset region that covers more than 50% of the zone. It has to be a subset
@ -514,6 +515,10 @@ void getInterfaceSizes
EdgeMap<label>& interfaceSizes EdgeMap<label>& interfaceSizes
) )
{ {
// Internal faces
// ~~~~~~~~~~~~~~
forAll(mesh.faceNeighbour(), faceI) forAll(mesh.faceNeighbour(), faceI)
{ {
label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; label ownRegion = cellRegion[mesh.faceOwner()[faceI]];
@ -540,6 +545,47 @@ void getInterfaceSizes
} }
} }
// Boundary faces
// ~~~~~~~~~~~~~~
// Neighbour cellRegion.
labelList coupledRegion(mesh.nFaces()-mesh.nInternalFaces());
forAll(coupledRegion, i)
{
label cellI = mesh.faceOwner()[i+mesh.nInternalFaces()];
coupledRegion[i] = cellRegion[cellI];
}
syncTools::swapBoundaryFaceList(mesh, coupledRegion, false);
forAll(coupledRegion, i)
{
label faceI = i+mesh.nInternalFaces();
label ownRegion = cellRegion[mesh.faceOwner()[faceI]];
label neiRegion = coupledRegion[i];
if (ownRegion != neiRegion)
{
edge interface
(
min(ownRegion, neiRegion),
max(ownRegion, neiRegion)
);
EdgeMap<label>::iterator iter = interfaceSizes.find(interface);
if (iter != interfaceSizes.end())
{
iter()++;
}
else
{
interfaceSizes.insert(interface, 1);
}
}
}
if (sumParallel && Pstream::parRun()) if (sumParallel && Pstream::parRun())
{ {
if (Pstream::master()) if (Pstream::master())
@ -672,6 +718,17 @@ autoPtr<mapPolyMesh> createRegionMesh
} }
// Neighbour cellRegion.
labelList coupledRegion(mesh.nFaces()-mesh.nInternalFaces());
forAll(coupledRegion, i)
{
label cellI = mesh.faceOwner()[i+mesh.nInternalFaces()];
coupledRegion[i] = cellRegion[cellI];
}
syncTools::swapBoundaryFaceList(mesh, coupledRegion, false);
// Topology change container. Start off from existing mesh. // Topology change container. Start off from existing mesh.
polyTopoChange meshMod(mesh); polyTopoChange meshMod(mesh);
@ -691,16 +748,17 @@ autoPtr<mapPolyMesh> createRegionMesh
{ {
label faceI = exposedFaces[i]; label faceI = exposedFaces[i];
if (!mesh.isInternalFace(faceI))
{
FatalErrorIn("createRegionMesh(..)")
<< "Exposed face:" << faceI << " is not an internal face."
<< " fc:" << mesh.faceCentres()[faceI]
<< exit(FatalError);
}
label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; label ownRegion = cellRegion[mesh.faceOwner()[faceI]];
label neiRegion = cellRegion[mesh.faceNeighbour()[faceI]]; label neiRegion = -1;
if (mesh.isInternalFace(faceI))
{
neiRegion = cellRegion[mesh.faceNeighbour()[faceI]];
}
else
{
neiRegion = coupledRegion[faceI-mesh.nInternalFaces()];
}
label otherRegion = -1; label otherRegion = -1;
@ -1357,22 +1415,14 @@ int main(int argc, char *argv[])
} }
} }
// Different cellZones on either side of processor patch are not // Different cellZones on either side of processor patch.
// allowed for now. Convert to processorPatches or what?
forAll(neiZoneID, i) forAll(neiZoneID, i)
{ {
label faceI = i+mesh.nInternalFaces(); label faceI = i+mesh.nInternalFaces();
if (zoneID[mesh.faceOwner()[faceI]] != neiZoneID[i]) if (zoneID[mesh.faceOwner()[faceI]] != neiZoneID[i])
{ {
//blockedFace[faceI] = true; blockedFace[faceI] = true;
FatalErrorIn(args.executable())
<< "Coupled face " << faceI
<< " fc:" << mesh.faceCentres()[faceI]
<< " has cellZone " << zoneID[mesh.faceOwner()[faceI]]
<< " on owner side but cellZone " << neiZoneID[i]
<< " on other side. This is not allowed."
<< exit(FatalError);
} }
} }
} }

View File

@ -1,43 +1,59 @@
EXE_LIBS = \ EXE_LIBS = \
-lautoMesh \
-lbarotropicCompressibilityModel \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lblockMesh \
-lchemistryModel \ -lchemistryModel \
-lreactionThermophysicalModels \ -lcoalCombustion \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lcompressibleRASModels \
-lcompressibleTurbulenceModel \
-lconversion \
-ldecompositionMethods \ -ldecompositionMethods \
-ldieselSpray \ -ldieselSpray \
-ldsmc \
-ldynamicFvMesh \ -ldynamicFvMesh \
-ldynamicMesh \ -ldynamicMesh \
-ledgeMesh \ -ledgeMesh \
-lengine \ -lengine \
-lerrorEstimation \ -lerrorEstimation \
-lfieldFunctionObjects \
-lfiniteVolume \ -lfiniteVolume \
-lforces \ -lforces \
-lfvMotionSolvers \ -lfvMotionSolvers \
-lgenericPatchFields \
-lincompressibleLESModels \ -lincompressibleLESModels \
-lincompressibleTransportModels \
-lcompressibleRASModels \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-linterfaceProperties \ -linterfaceProperties \
-llagrangianIntermediate \ -lIOFunctionObjects \
-llagrangian \ -llagrangian \
-llagrangianIntermediate \
-llaminarFlameSpeedModels \ -llaminarFlameSpeedModels \
-lLESdeltas \ -lLESdeltas \
-lLESfilters \ -lLESfilters \
-lliquidMixture \ -lliquidMixture \
-lliquids \ -lliquids \
-lmeshTools \ -lmeshTools \
-lmolecularMeasurements \
-lmolecule \
-lODE \ -lODE \
-lOpenFOAM \ -lOpenFOAM \
-lpdf \ -lpdf \
-lphaseModel \ -lpotential \
-lradiation \ -lradiation \
-lrandomProcesses \ -lrandomProcesses \
-lreactionThermophysicalModels \
-lsampling \ -lsampling \
-lsolidMixture \ -lsolidMixture \
-lsolidParticle \
-lsolids \ -lsolids \
-lspecie \ -lspecie \
-lsurfMesh \
-lsystemCall \
-lthermalPorousZone \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-ltopoChangerFvMesh \ -ltopoChangerFvMesh \
-ltriSurface \ -ltriSurface \
-lautoMesh \ -lutilityFunctionObjects
-lblockMesh

View File

@ -57,6 +57,7 @@ class argList;
class ensightMesh class ensightMesh
{ {
public:
class nFacePrimitives class nFacePrimitives
{ {
public: public:
@ -75,6 +76,7 @@ class ensightMesh
{} {}
}; };
private:
// Private data // Private data

View File

@ -797,7 +797,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vsf[i])(), linearInterpolate(vsf[i])(),
faceLabels faceLabels
)() )()
); );
@ -808,7 +808,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vvf[i])(), linearInterpolate(vvf[i])(),
faceLabels faceLabels
)() )()
); );
@ -819,7 +819,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vSpheretf[i])(), linearInterpolate(vSpheretf[i])(),
faceLabels faceLabels
)() )()
); );
@ -830,7 +830,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vSymmtf[i])(), linearInterpolate(vSymmtf[i])(),
faceLabels faceLabels
)() )()
); );
@ -841,7 +841,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vtf[i])(), linearInterpolate(vtf[i])(),
faceLabels faceLabels
)() )()
); );
@ -1094,7 +1094,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vsf[i])(), linearInterpolate(vsf[i])(),
pp pp
)() )()
); );
@ -1105,7 +1105,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vvf[i])(), linearInterpolate(vvf[i])(),
pp pp
)() )()
); );
@ -1116,7 +1116,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vSpheretf[i])(), linearInterpolate(vSpheretf[i])(),
pp pp
)() )()
); );
@ -1127,7 +1127,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vSymmtf[i])(), linearInterpolate(vSymmtf[i])(),
pp pp
)() )()
); );
@ -1138,7 +1138,7 @@ int main(int argc, char *argv[])
( (
writer.getFaceField writer.getFaceField
( (
fvc::interpolate(vtf[i])(), linearInterpolate(vtf[i])(),
pp pp
)() )()
); );

View File

@ -172,7 +172,7 @@ template<class ListType>
ListType createWithValues ListType createWithValues
( (
const label sz, const label sz,
const typename ListType::const_reference initValue, typename ListType::const_reference initValue,
const UList<label>& indices, const UList<label>& indices,
typename ListType::const_reference setValue typename ListType::const_reference setValue
); );

View File

@ -129,28 +129,29 @@ void Foam::SHA1::processBytes(const void *data, size_t len)
} }
// Process available complete blocks // Process available complete blocks
if (len >= 64) // if (len >= 64)
{ // {
#if !_STRING_ARCH_unaligned //#if !_STRING_ARCH_unaligned
# define alignof(type) offsetof (struct { char c; type x; }, x) //# define alignof(type) offsetof (struct { char c; type x; }, x)
# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) //# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (data)) // if (UNALIGNED_P (data))
{ // {
while (len > 64) // while (len > 64)
while (len >= 64)
{ {
processBlock(memcpy (buffer_, data, 64), 64); processBlock(memcpy (buffer_, data, 64), 64);
data = reinterpret_cast<const unsigned char*>(data) + 64; data = reinterpret_cast<const unsigned char*>(data) + 64;
len -= 64; len -= 64;
} }
} // }
else // else
#endif //#endif
{ // {
processBlock(data, len & ~63); // processBlock(data, len & ~63);
data = reinterpret_cast<const unsigned char*>(data) + (len & ~63); // data = reinterpret_cast<const unsigned char*>(data) + (len & ~63);
len &= 63; // len &= 63;
} // }
} // }
// Move remaining bytes in internal buffer. // Move remaining bytes in internal buffer.
if (len > 0) if (len > 0)

View File

@ -141,8 +141,7 @@ void Foam::MULES::implicitSolve
{ {
const fvMesh& mesh = psi.mesh(); const fvMesh& mesh = psi.mesh();
const dictionary& MULEScontrols = const dictionary& MULEScontrols = mesh.solverDict(psi.name());
mesh.solverDict(psi.name()).subDict("MULESImplicit");
label maxIter label maxIter
( (
@ -254,7 +253,7 @@ void Foam::MULES::implicitSolve
solve solve
( (
psiConvectionDiffusion + fvc::div(lambda*phiCorr), psiConvectionDiffusion + fvc::div(lambda*phiCorr),
MULEScontrols.lookup("solver") MULEScontrols
); );
scalar maxPsiM1 = gMax(psi.internalField()) - 1.0; scalar maxPsiM1 = gMax(psi.internalField()) - 1.0;

View File

@ -51,15 +51,6 @@ class CECCellToFaceStencil
: :
public cellToFaceStencil public cellToFaceStencil
{ {
// Private Member Functions
//- Disallow default bitwise copy construct
CECCellToFaceStencil(const CECCellToFaceStencil&);
//- Disallow default bitwise assignment
void operator=(const CECCellToFaceStencil&);
public: public:
// Constructors // Constructors

View File

@ -51,14 +51,6 @@ class CFCCellToFaceStencil
: :
public cellToFaceStencil public cellToFaceStencil
{ {
// Private Member Functions
//- Disallow default bitwise copy construct
CFCCellToFaceStencil(const CFCCellToFaceStencil&);
//- Disallow default bitwise assignment
void operator=(const CFCCellToFaceStencil&);
public: public:
// Constructors // Constructors

View File

@ -51,15 +51,6 @@ class CPCCellToFaceStencil
: :
public cellToFaceStencil public cellToFaceStencil
{ {
// Private Member Functions
//- Disallow default bitwise copy construct
CPCCellToFaceStencil(const CPCCellToFaceStencil&);
//- Disallow default bitwise assignment
void operator=(const CPCCellToFaceStencil&);
public: public:
// Constructors // Constructors

View File

@ -65,13 +65,6 @@ class FECCellToFaceStencil
void calcFaceStencil(labelListList& faceStencil) const; void calcFaceStencil(labelListList& faceStencil) const;
//- Disallow default bitwise copy construct
FECCellToFaceStencil(const FECCellToFaceStencil&);
//- Disallow default bitwise assignment
void operator=(const FECCellToFaceStencil&);
public: public:
// Constructors // Constructors

View File

@ -56,11 +56,6 @@ class CFCFaceToCellStencil
void calcCellStencil(labelListList& globalCellFaces) const; void calcCellStencil(labelListList& globalCellFaces) const;
//- Disallow default bitwise copy construct
CFCFaceToCellStencil(const CFCFaceToCellStencil&);
//- Disallow default bitwise assignment
void operator=(const CFCFaceToCellStencil&);
public: public:

View File

@ -157,14 +157,14 @@ namespace fvc
); );
//- Interpolate tmp field onto faces using central differencing //- Interpolate tmp field onto faces using 'interpolate(<name>)'
template<class Type> template<class Type>
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
( (
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
); );
//- Interpolate field onto faces using central differencing //- Interpolate tmp field onto faces using 'interpolate(<name>)'
template<class Type> template<class Type>
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
( (

View File

@ -67,6 +67,10 @@ Foam::word Foam::PatchInteractionModel<CloudType>::interactionTypeToWord
return "other"; return "other";
} }
} }
#ifdef __ICC
// Prevent Icc complaining about missing return statement.
return word::null;
#endif
} }

View File

@ -1,6 +1,6 @@
.SUFFIXES: .C .cxx .cc .cpp .SUFFIXES: .C .cxx .cc .cpp
c++WARN = -wd654,819,1125,1476,1505,1572 c++WARN = -wd327,654,819,1125,1476,1505,1572
CC = icpc CC = icpc

View File

@ -1,6 +1,6 @@
.SUFFIXES: .C .cxx .cc .cpp .SUFFIXES: .C .cxx .cc .cpp
c++WARN = -wd654,819,1125,1476,1505,1572 c++WARN = -wd327,654,819,1125,1476,1505,1572
CC = icpc CC = icpc

View File

@ -1,6 +1,6 @@
.SUFFIXES: .C .cxx .cc .cpp .SUFFIXES: .C .cxx .cc .cpp
c++WARN = -wd654,819,1125,1476,1505,1572 c++WARN = -wd327,654,819,1125,1476,1505,1572
#CC = icpc -gcc-version=400 #CC = icpc -gcc-version=400
CC = icpc CC = icpc