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

This commit is contained in:
andy
2013-05-07 12:19:09 +01:00
38 changed files with 205 additions and 75 deletions

View File

@ -105,6 +105,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
myComm.above(),
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
IOdictionary::readData(fromAbove);
@ -124,6 +125,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
myComm.below()[belowI],
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
IOdictionary::writeData(toBelow);

View File

@ -243,6 +243,7 @@ bool Foam::regIOobject::read()
myComm.above(),
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
ok = readData(fromAbove);
@ -257,6 +258,7 @@ bool Foam::regIOobject::read()
myComm.below()[belowI],
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
writeData(toBelow);

View File

@ -122,7 +122,8 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(receiveBuf_.begin()),
receiveBuf_.byteSize(),
procPatch_.tag()
procPatch_.tag(),
procPatch_.comm()
);
}
OPstream::write
@ -131,7 +132,8 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
procPatch_.neighbProcNo(),
reinterpret_cast<const char*>(pf.begin()),
pf.byteSize(),
procPatch_.tag()
procPatch_.tag(),
procPatch_.comm()
);
}
}
@ -156,7 +158,8 @@ void Foam::processorCyclicPointPatchField<Type>::swapAddSeparated
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(receiveBuf_.begin()),
receiveBuf_.byteSize(),
procPatch_.tag()
procPatch_.tag(),
procPatch_.comm()
);
}

View File

@ -122,7 +122,7 @@ void Foam::lduPrimitiveMesh::checkUpperTriangular
}
Foam::label Foam::lduPrimitiveMesh::size
Foam::label Foam::lduPrimitiveMesh::totalSize
(
const PtrList<lduPrimitiveMesh>& meshes
)
@ -294,7 +294,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh
labelListListList& boundaryFaceMap
)
:
lduAddressing(myMesh.lduAddr().size() + size(otherMeshes)),
lduAddressing(myMesh.lduAddr().size() + totalSize(otherMeshes)),
lowerAddr_(0),
upperAddr_(0),
interfaces_(0),

View File

@ -76,7 +76,7 @@ class lduPrimitiveMesh
// Private Member Functions
//- Get size of all meshes
static label size(const PtrList<lduPrimitiveMesh>&);
static label totalSize(const PtrList<lduPrimitiveMesh>&);
static labelList upperTriOrder
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,6 +134,12 @@ public:
return procPolyPatch_.tag();
}
//- Return communicator used for communication
virtual label comm() const
{
return procPolyPatch_.comm();
}
//- Return the constraint type this pointPatch implements.
virtual const word& constraintType() const
{

View File

@ -246,14 +246,6 @@ public:
}
}
//- Return communicator used for communication
label comm() const
{
//return comm_;
return boundaryMesh().mesh().comm();
}
//- Return processor number
int myProcNo() const
{
@ -266,30 +258,6 @@ public:
return neighbProcNo_;
}
// For testing
// //- Return communicator used for communication
// label& comm()
// {
// return comm_;
// }
//- Return processor number
int& myProcNo()
{
return myProcNo_;
}
//- Return neigbour processor number
int& neighbProcNo()
{
return neighbProcNo_;
}
//- Does the processor own the patch ?
virtual bool owner() const
{
@ -332,6 +300,12 @@ public:
return Pstream::msgType();
}
//- Return communicator used for communication
virtual label comm() const
{
return boundaryMesh().mesh().comm();
}
//- Transform a patch-based position from other side to this side
virtual void transformPosition(pointField& l) const
{}

View File

@ -119,7 +119,8 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
new scalarField(meshLevels_[nCreatedLevels].size())
);
restrictField(*aggVPtr, *VPtr, nCreatedLevels);
// Restrict but no parallel agglomeration (not supported)
restrictField(*aggVPtr, *VPtr, nCreatedLevels, false);
if (nCreatedLevels)
{
@ -157,7 +158,8 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
new scalarField(meshLevels_[nCreatedLevels].size())
);
restrictField(*aggSbPtr, *SbPtr, nCreatedLevels);
// Restrict but no parallel agglomeration (not supported)
restrictField(*aggSbPtr, *SbPtr, nCreatedLevels, false);
delete SbPtr;
SbPtr = aggSbPtr;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,7 +52,7 @@ Foam::viscosityModels::BirdCarreau::calcNu() const
return
nuInf_
+ (nu0_ - nuInf_)
*pow(scalar(1) + sqr(k_*strainRate()), (n_ - 1.0)/2.0);
*pow(scalar(1) + pow(k_*strainRate(), a_), (n_ - 1.0)/a_);
}
@ -72,6 +72,14 @@ Foam::viscosityModels::BirdCarreau::BirdCarreau
nuInf_(BirdCarreauCoeffs_.lookup("nuInf")),
k_(BirdCarreauCoeffs_.lookup("k")),
n_(BirdCarreauCoeffs_.lookup("n")),
a_
(
BirdCarreauCoeffs_.lookupOrDefault
(
"a",
dimensionedScalar("a", dimless, 2)
)
),
nu_
(
IOobject
@ -102,6 +110,11 @@ bool Foam::viscosityModels::BirdCarreau::read
BirdCarreauCoeffs_.lookup("nuInf") >> nuInf_;
BirdCarreauCoeffs_.lookup("k") >> k_;
BirdCarreauCoeffs_.lookup("n") >> n_;
a_ = BirdCarreauCoeffs_.lookupOrDefault
(
"a",
dimensionedScalar("a", dimless, 2)
);
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,9 @@ Class
Description
An incompressible Bird-Carreau non-Newtonian viscosity model.
The Bird-Carreau-Yasuda form is also supported if the optional "a"
coefficient is specified. "a" defaults to 2 for the Bird-Carreau model.
SourceFiles
BirdCarreau.C
@ -62,6 +65,7 @@ class BirdCarreau
dimensionedScalar nuInf_;
dimensionedScalar k_;
dimensionedScalar n_;
dimensionedScalar a_;
volScalarField nu_;