mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy2/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -162,7 +162,21 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::append
|
|||||||
const T& e
|
const T& e
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
operator()(size()) = e;
|
nextFree_++;
|
||||||
|
|
||||||
|
if (nextFree_ > List<T>::size())
|
||||||
|
{
|
||||||
|
List<T>::setSize
|
||||||
|
(
|
||||||
|
max
|
||||||
|
(
|
||||||
|
nextFree_,
|
||||||
|
label(SizeMult*List<T>::size()/SizeDiv + SizeInc)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->operator[](nextFree_ - 1) = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -186,7 +200,7 @@ inline T Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::remove()
|
|||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
inline T& Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator()
|
inline T& Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator()
|
||||||
(
|
(
|
||||||
const Foam::label i
|
const label i
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nextFree_ = max(nextFree_, i + 1);
|
nextFree_ = max(nextFree_, i + 1);
|
||||||
|
|||||||
@ -125,7 +125,7 @@ public:
|
|||||||
label above() const
|
label above() const
|
||||||
{
|
{
|
||||||
return above_;
|
return above_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelList& below() const
|
const labelList& below() const
|
||||||
{
|
{
|
||||||
@ -468,7 +468,7 @@ public:
|
|||||||
//- Like above but switches between linear/tree communication
|
//- Like above but switches between linear/tree communication
|
||||||
template <class Container>
|
template <class Container>
|
||||||
static void mapCombineScatter(Container& Values);
|
static void mapCombineScatter(Container& Values);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Gather/scatter keeping the individual processor data separate.
|
// Gather/scatter keeping the individual processor data separate.
|
||||||
|
|||||||
@ -34,21 +34,15 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
char Foam::ISstream::nextValid()
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// Get next 'valid character': i.e. not white space or comment.
|
|
||||||
|
|
||||||
char ISstream::nextValid()
|
|
||||||
{
|
{
|
||||||
char c = 0;
|
char c = 0;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
// Get next non-whitespace character
|
// Get next non-whitespace character
|
||||||
while (get(c) && isspace(c));
|
while (get(c) && isspace(c))
|
||||||
|
{}
|
||||||
|
|
||||||
// Return if stream is bad
|
// Return if stream is bad
|
||||||
if (bad() || isspace(c))
|
if (bad() || isspace(c))
|
||||||
@ -67,7 +61,8 @@ char ISstream::nextValid()
|
|||||||
|
|
||||||
if (c == '/') // This is the start of a C++ style one line comment
|
if (c == '/') // This is the start of a C++ style one line comment
|
||||||
{
|
{
|
||||||
while (get(c) && c != '\n');
|
while (get(c) && c != '\n')
|
||||||
|
{}
|
||||||
}
|
}
|
||||||
else if (c == '*') // This is the start of a C style comment
|
else if (c == '*') // This is the start of a C style comment
|
||||||
{
|
{
|
||||||
@ -105,8 +100,4 @@ char ISstream::nextValid()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -31,12 +31,7 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
Foam::label Foam::readHexLabel(ISstream& is)
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
label readHexLabel(ISstream& is)
|
|
||||||
{
|
{
|
||||||
register label result = 0;
|
register label result = 0;
|
||||||
|
|
||||||
@ -48,7 +43,8 @@ label readHexLabel(ISstream& is)
|
|||||||
static const label alphaOffset = toupper('A') - 10;
|
static const label alphaOffset = toupper('A') - 10;
|
||||||
|
|
||||||
// Get next non-whitespace character
|
// Get next non-whitespace character
|
||||||
while (is.get(c) && isspace(c));
|
while (is.get(c) && isspace(c))
|
||||||
|
{}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -77,8 +73,4 @@ label readHexLabel(ISstream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -47,7 +47,8 @@ bool Foam::dictionary::read(Istream& is)
|
|||||||
is.putBack(currToken);
|
is.putBack(currToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!is.eof() && entry::New(*this, is));
|
while (!is.eof() && entry::New(*this, is))
|
||||||
|
{}
|
||||||
|
|
||||||
// Remove the FoamFile header entry if it exists
|
// Remove the FoamFile header entry if it exists
|
||||||
remove("FoamFile");
|
remove("FoamFile");
|
||||||
|
|||||||
@ -130,7 +130,7 @@ public:
|
|||||||
const Pstream::commsTypes commsType,
|
const Pstream::commsTypes commsType,
|
||||||
const UList<Type>&
|
const UList<Type>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Raw field receive function with data compression
|
//- Raw field receive function with data compression
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void compressedReceive
|
void compressedReceive
|
||||||
|
|||||||
@ -54,7 +54,7 @@ void Foam::processorLduInterface::send
|
|||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
commsType,
|
commsType,
|
||||||
neighbProcNo(),
|
neighbProcNo(),
|
||||||
receiveBuf_.begin(),
|
receiveBuf_.begin(),
|
||||||
receiveBuf_.size()
|
receiveBuf_.size()
|
||||||
);
|
);
|
||||||
@ -92,7 +92,7 @@ void Foam::processorLduInterface::receive
|
|||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
commsType,
|
commsType,
|
||||||
neighbProcNo(),
|
neighbProcNo(),
|
||||||
reinterpret_cast<char*>(f.begin()),
|
reinterpret_cast<char*>(f.begin()),
|
||||||
f.byteSize()
|
f.byteSize()
|
||||||
);
|
);
|
||||||
@ -150,7 +150,7 @@ void Foam::processorLduInterface::compressedSend
|
|||||||
}
|
}
|
||||||
|
|
||||||
reinterpret_cast<Type&>(fArray[nm1]) = f[f.size() - 1];
|
reinterpret_cast<Type&>(fArray[nm1]) = f[f.size() - 1];
|
||||||
|
|
||||||
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
||||||
{
|
{
|
||||||
OPstream::write
|
OPstream::write
|
||||||
@ -168,7 +168,7 @@ void Foam::processorLduInterface::compressedSend
|
|||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
commsType,
|
commsType,
|
||||||
neighbProcNo(),
|
neighbProcNo(),
|
||||||
receiveBuf_.begin(),
|
receiveBuf_.begin(),
|
||||||
receiveBuf_.size()
|
receiveBuf_.size()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -172,7 +172,7 @@ void Foam::GAMGSolver::Vcycle
|
|||||||
{
|
{
|
||||||
scalar sf = scalingFactor
|
scalar sf = scalingFactor
|
||||||
(
|
(
|
||||||
reinterpret_cast<scalarField&>(ACf),
|
const_cast<scalarField&>(ACf.operator const scalarField&()),
|
||||||
matrixLevels_[leveli],
|
matrixLevels_[leveli],
|
||||||
coarseCorrFields[leveli],
|
coarseCorrFields[leveli],
|
||||||
interfaceLevelsBouCoeffs_[leveli],
|
interfaceLevelsBouCoeffs_[leveli],
|
||||||
@ -192,7 +192,7 @@ void Foam::GAMGSolver::Vcycle
|
|||||||
// Correct the residual with the new solution
|
// Correct the residual with the new solution
|
||||||
matrixLevels_[leveli].Amul
|
matrixLevels_[leveli].Amul
|
||||||
(
|
(
|
||||||
reinterpret_cast<scalarField&>(ACf),
|
const_cast<scalarField&>(ACf.operator const scalarField&()),
|
||||||
coarseCorrFields[leveli],
|
coarseCorrFields[leveli],
|
||||||
interfaceLevelsBouCoeffs_[leveli],
|
interfaceLevelsBouCoeffs_[leveli],
|
||||||
interfaceLevels_[leveli],
|
interfaceLevels_[leveli],
|
||||||
@ -269,7 +269,7 @@ void Foam::GAMGSolver::Vcycle
|
|||||||
|
|
||||||
scalar sf = scalingFactor
|
scalar sf = scalingFactor
|
||||||
(
|
(
|
||||||
reinterpret_cast<scalarField&>(ACf),
|
const_cast<scalarField&>(ACf.operator const scalarField&()),
|
||||||
matrixLevels_[leveli],
|
matrixLevels_[leveli],
|
||||||
coarseCorrFields[leveli],
|
coarseCorrFields[leveli],
|
||||||
interfaceLevelsBouCoeffs_[leveli],
|
interfaceLevelsBouCoeffs_[leveli],
|
||||||
|
|||||||
@ -56,7 +56,7 @@ scalar face::areaInContact
|
|||||||
|
|
||||||
// Loop through vertexValue. If all greater that 0 return 0 (no contact);
|
// Loop through vertexValue. If all greater that 0 return 0 (no contact);
|
||||||
// if all less than zero return 1
|
// if all less than zero return 1
|
||||||
// all zeros is assumed to be in contact.
|
// all zeros is assumed to be in contact.
|
||||||
|
|
||||||
bool allPositive = true;
|
bool allPositive = true;
|
||||||
bool allNegative = true;
|
bool allNegative = true;
|
||||||
@ -108,8 +108,8 @@ scalar face::areaInContact
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
vertexValue[vI] > 0 && vertexValue[vI + 1] < 0
|
(vertexValue[vI] > 0 && vertexValue[vI + 1] < 0)
|
||||||
|| vertexValue[vI] < 0 && vertexValue[vI + 1] > 0
|
|| (vertexValue[vI] < 0 && vertexValue[vI + 1] > 0)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Edge intersection. Calculate intersection point and add to list
|
// Edge intersection. Calculate intersection point and add to list
|
||||||
@ -133,8 +133,8 @@ scalar face::areaInContact
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
vertexValue[size() - 1] > 0 && vertexValue[0] < 0
|
(vertexValue[size() - 1] > 0 && vertexValue[0] < 0)
|
||||||
|| vertexValue[size() - 1] < 0 && vertexValue[0] > 0
|
|| (vertexValue[size() - 1] < 0 && vertexValue[0] > 0)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Edge intersection. Calculate intersection point and add to list
|
// Edge intersection. Calculate intersection point and add to list
|
||||||
|
|||||||
@ -511,7 +511,7 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const
|
|||||||
{
|
{
|
||||||
boundaryError = true;
|
boundaryError = true;
|
||||||
|
|
||||||
if (debug || report && Pstream::master())
|
if (debug || (report && Pstream::master()))
|
||||||
{
|
{
|
||||||
Info<< " ***Inconsistent patches across processors, "
|
Info<< " ***Inconsistent patches across processors, "
|
||||||
"processor 0 has patch names:" << allNames[0]
|
"processor 0 has patch names:" << allNames[0]
|
||||||
|
|||||||
@ -28,14 +28,9 @@ License
|
|||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void primitiveMesh::calcCellEdges() const
|
void Foam::primitiveMesh::calcCellEdges() const
|
||||||
{
|
{
|
||||||
// Loop through all faces and mark up cells with edges of the face.
|
// Loop through all faces and mark up cells with edges of the face.
|
||||||
// Check for duplicates
|
// Check for duplicates
|
||||||
@ -78,7 +73,7 @@ void primitiveMesh::calcCellEdges() const
|
|||||||
if (findIndex(curCellEdges, curEdges[edgeI]) == -1)
|
if (findIndex(curCellEdges, curEdges[edgeI]) == -1)
|
||||||
{
|
{
|
||||||
// Add the edge
|
// Add the edge
|
||||||
curCellEdges.append(curEdges[edgeI]);
|
//curCellEdges.append(curEdges[edgeI]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -94,7 +89,7 @@ void primitiveMesh::calcCellEdges() const
|
|||||||
if (findIndex(curCellEdges, curEdges[edgeI]) == -1)
|
if (findIndex(curCellEdges, curEdges[edgeI]) == -1)
|
||||||
{
|
{
|
||||||
// add the edge
|
// add the edge
|
||||||
curCellEdges.append(curEdges[edgeI]);
|
//curCellEdges.append(curEdges[edgeI]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,7 +108,7 @@ void primitiveMesh::calcCellEdges() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const labelListList& primitiveMesh::cellEdges() const
|
const Foam::labelListList& Foam::primitiveMesh::cellEdges() const
|
||||||
{
|
{
|
||||||
if (!cePtr_)
|
if (!cePtr_)
|
||||||
{
|
{
|
||||||
@ -124,8 +119,4 @@ const labelListList& primitiveMesh::cellEdges() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user