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
|
||||
)
|
||||
{
|
||||
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>
|
||||
inline T& Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator()
|
||||
(
|
||||
const Foam::label i
|
||||
const label i
|
||||
)
|
||||
{
|
||||
nextFree_ = max(nextFree_, i + 1);
|
||||
|
||||
@ -34,21 +34,15 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Get next 'valid character': i.e. not white space or comment.
|
||||
|
||||
char ISstream::nextValid()
|
||||
char Foam::ISstream::nextValid()
|
||||
{
|
||||
char c = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
// Get next non-whitespace character
|
||||
while (get(c) && isspace(c));
|
||||
while (get(c) && isspace(c))
|
||||
{}
|
||||
|
||||
// Return if stream is bad
|
||||
if (bad() || isspace(c))
|
||||
@ -67,7 +61,8 @@ char ISstream::nextValid()
|
||||
|
||||
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
|
||||
{
|
||||
@ -105,8 +100,4 @@ char ISstream::nextValid()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -31,12 +31,7 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
label readHexLabel(ISstream& is)
|
||||
Foam::label Foam::readHexLabel(ISstream& is)
|
||||
{
|
||||
register label result = 0;
|
||||
|
||||
@ -48,7 +43,8 @@ label readHexLabel(ISstream& is)
|
||||
static const label alphaOffset = toupper('A') - 10;
|
||||
|
||||
// Get next non-whitespace character
|
||||
while (is.get(c) && isspace(c));
|
||||
while (is.get(c) && isspace(c))
|
||||
{}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
while (!is.eof() && entry::New(*this, is));
|
||||
while (!is.eof() && entry::New(*this, is))
|
||||
{}
|
||||
|
||||
// Remove the FoamFile header entry if it exists
|
||||
remove("FoamFile");
|
||||
|
||||
@ -172,7 +172,7 @@ void Foam::GAMGSolver::Vcycle
|
||||
{
|
||||
scalar sf = scalingFactor
|
||||
(
|
||||
reinterpret_cast<scalarField&>(ACf),
|
||||
const_cast<scalarField&>(ACf.operator const scalarField&()),
|
||||
matrixLevels_[leveli],
|
||||
coarseCorrFields[leveli],
|
||||
interfaceLevelsBouCoeffs_[leveli],
|
||||
@ -192,7 +192,7 @@ void Foam::GAMGSolver::Vcycle
|
||||
// Correct the residual with the new solution
|
||||
matrixLevels_[leveli].Amul
|
||||
(
|
||||
reinterpret_cast<scalarField&>(ACf),
|
||||
const_cast<scalarField&>(ACf.operator const scalarField&()),
|
||||
coarseCorrFields[leveli],
|
||||
interfaceLevelsBouCoeffs_[leveli],
|
||||
interfaceLevels_[leveli],
|
||||
@ -269,7 +269,7 @@ void Foam::GAMGSolver::Vcycle
|
||||
|
||||
scalar sf = scalingFactor
|
||||
(
|
||||
reinterpret_cast<scalarField&>(ACf),
|
||||
const_cast<scalarField&>(ACf.operator const scalarField&()),
|
||||
matrixLevels_[leveli],
|
||||
coarseCorrFields[leveli],
|
||||
interfaceLevelsBouCoeffs_[leveli],
|
||||
|
||||
@ -108,8 +108,8 @@ scalar face::areaInContact
|
||||
|
||||
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
|
||||
@ -133,8 +133,8 @@ scalar face::areaInContact
|
||||
|
||||
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
|
||||
|
||||
@ -511,7 +511,7 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const
|
||||
{
|
||||
boundaryError = true;
|
||||
|
||||
if (debug || report && Pstream::master())
|
||||
if (debug || (report && Pstream::master()))
|
||||
{
|
||||
Info<< " ***Inconsistent patches across processors, "
|
||||
"processor 0 has patch names:" << allNames[0]
|
||||
|
||||
@ -28,14 +28,9 @@ License
|
||||
#include "DynamicList.H"
|
||||
#include "ListOps.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * 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.
|
||||
// Check for duplicates
|
||||
@ -78,7 +73,7 @@ void primitiveMesh::calcCellEdges() const
|
||||
if (findIndex(curCellEdges, curEdges[edgeI]) == -1)
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
// add the edge
|
||||
curCellEdges.append(curEdges[edgeI]);
|
||||
//curCellEdges.append(curEdges[edgeI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -113,7 +108,7 @@ void primitiveMesh::calcCellEdges() const
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const labelListList& primitiveMesh::cellEdges() const
|
||||
const Foam::labelListList& Foam::primitiveMesh::cellEdges() const
|
||||
{
|
||||
if (!cePtr_)
|
||||
{
|
||||
@ -124,8 +119,4 @@ const labelListList& primitiveMesh::cellEdges() const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user