mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -206,14 +206,26 @@ Foam::functionEntries::codeStream::getFunction
|
||||
off_t masterSize = mySize;
|
||||
Pstream::scatter(masterSize);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< endl<< "on processor " << Pstream::myProcNo()
|
||||
<< " have masterSize:" << masterSize
|
||||
<< " and localSize:" << mySize
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
if (mySize < masterSize)
|
||||
{
|
||||
Pout<< "Local file " << libPath
|
||||
<< " not of same size (" << mySize
|
||||
<< ") as master ("
|
||||
<< masterSize << "). Waiting for "
|
||||
<< regIOobject::fileModificationSkew
|
||||
<< " seconds." << endl;
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "Local file " << libPath
|
||||
<< " not of same size (" << mySize
|
||||
<< ") as master ("
|
||||
<< masterSize << "). Waiting for "
|
||||
<< regIOobject::fileModificationSkew
|
||||
<< " seconds." << endl;
|
||||
}
|
||||
Foam::sleep(regIOobject::fileModificationSkew);
|
||||
|
||||
// Recheck local size
|
||||
@ -237,6 +249,14 @@ Foam::functionEntries::codeStream::getFunction
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< endl<< "on processor " << Pstream::myProcNo()
|
||||
<< " after waiting: have masterSize:" << masterSize
|
||||
<< " and localSize:" << mySize
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (isA<IOdictionary>(topDict(parentDict)))
|
||||
@ -244,6 +264,12 @@ Foam::functionEntries::codeStream::getFunction
|
||||
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||
// of Time.
|
||||
dlLibraryTable& dlLibs = libs(parentDict);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "Opening cached dictionary:" << libPath << endl;
|
||||
}
|
||||
|
||||
if (!dlLibs.open(libPath, false))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
@ -261,10 +287,28 @@ Foam::functionEntries::codeStream::getFunction
|
||||
else
|
||||
{
|
||||
// Uncached opening of libPath
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "Opening uncached dictionary:" << libPath << endl;
|
||||
}
|
||||
lib = dlOpen(libPath, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool haveLib = lib;
|
||||
reduce(haveLib, andOp<bool>());
|
||||
|
||||
if (!haveLib)
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"functionEntries::codeStream::execute(..)",
|
||||
parentDict
|
||||
) << "Failed loading library " << libPath
|
||||
<< " on some processors."
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
|
||||
// Find the function handle in the library
|
||||
streamingFunctionType function =
|
||||
|
||||
@ -267,7 +267,13 @@ Foam::Tuple2<Foam::label, Foam::scalar> Foam::lduAddressing::band() const
|
||||
}
|
||||
|
||||
label bandwidth = max(cellBandwidth);
|
||||
scalar profile = sum(1.0*cellBandwidth);
|
||||
|
||||
// Do not use field algebra because of conversion label to scalar
|
||||
scalar profile = 0.0;
|
||||
forAll(cellBandwidth, cellI)
|
||||
{
|
||||
profile += 1.0*cellBandwidth[cellI];
|
||||
}
|
||||
|
||||
return Tuple2<label, scalar>(bandwidth, profile);
|
||||
}
|
||||
|
||||
@ -41,19 +41,6 @@ defineTypeNameAndDebug(polyBoundaryMesh, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::labelList Foam::polyBoundaryMesh::ident(const label len)
|
||||
{
|
||||
labelList elems(len);
|
||||
forAll(elems, elemI)
|
||||
{
|
||||
elems[elemI] = elemI;
|
||||
}
|
||||
return elems;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::polyBoundaryMesh::polyBoundaryMesh
|
||||
|
||||
@ -78,9 +78,6 @@ class polyBoundaryMesh
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Create identity map
|
||||
static labelList ident(const label len);
|
||||
|
||||
//- Calculate the geometry for the patches (transformation tensors etc.)
|
||||
void calcGeometry();
|
||||
|
||||
|
||||
@ -66,6 +66,13 @@ const triad triad::min
|
||||
vector(-VGREAT, -VGREAT, -VGREAT)
|
||||
);
|
||||
|
||||
const triad triad::I
|
||||
(
|
||||
vector(1, 0, 0),
|
||||
vector(0, 1, 0),
|
||||
vector(0, 0, 1)
|
||||
);
|
||||
|
||||
const triad triad::unset
|
||||
(
|
||||
vector(VGREAT, VGREAT, VGREAT),
|
||||
|
||||
@ -100,6 +100,7 @@ public:
|
||||
static const triad one;
|
||||
static const triad max;
|
||||
static const triad min;
|
||||
static const triad I;
|
||||
static const triad unset;
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1371,6 +1371,12 @@ void Foam::fvMeshSubset::setLargeCellSubset
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fvMeshSubset::hasSubMesh() const
|
||||
{
|
||||
return fvMeshSubsetPtr_.valid();
|
||||
}
|
||||
|
||||
|
||||
const fvMesh& Foam::fvMeshSubset::subMesh() const
|
||||
{
|
||||
checkCellSubset();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -268,6 +268,9 @@ public:
|
||||
return baseMesh_;
|
||||
}
|
||||
|
||||
//- Have subMesh?
|
||||
bool hasSubMesh() const;
|
||||
|
||||
//- Return reference to subset mesh
|
||||
const fvMesh& subMesh() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user