C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
This commit is contained in:
@ -7,7 +7,7 @@ IOobject phiBHeader
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
surfaceScalarField* phiBPtr = NULL;
|
surfaceScalarField* phiBPtr = nullptr;
|
||||||
|
|
||||||
if (phiBHeader.headerOk())
|
if (phiBHeader.headerOk())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,8 +45,8 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
|||||||
:
|
:
|
||||||
psiThermo(mesh, word::null),
|
psiThermo(mesh, word::null),
|
||||||
twoPhaseMixture(mesh, *this),
|
twoPhaseMixture(mesh, *this),
|
||||||
thermo1_(NULL),
|
thermo1_(nullptr),
|
||||||
thermo2_(NULL)
|
thermo2_(nullptr)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
volScalarField T1(IOobject::groupName("T", phase1Name()), T_);
|
volScalarField T1(IOobject::groupName("T", phase1Name()), T_);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,7 @@ Foam::phaseModel::phaseModel
|
|||||||
name_(phaseName),
|
name_(phaseName),
|
||||||
p_(p),
|
p_(p),
|
||||||
T_(T),
|
T_(T),
|
||||||
thermo_(NULL),
|
thermo_(nullptr),
|
||||||
dgdt_
|
dgdt_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -81,7 +81,7 @@ Foam::phaseModel::phaseModel
|
|||||||
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const
|
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<phaseModel>(NULL);
|
return autoPtr<phaseModel>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -203,7 +203,7 @@ Foam::phaseModel::~phaseModel()
|
|||||||
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const
|
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<phaseModel>(NULL);
|
return autoPtr<phaseModel>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -123,7 +123,7 @@
|
|||||||
++dmIter, ++dcIter
|
++dmIter, ++dcIter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const phaseModel *phase2Ptr = NULL;
|
const phaseModel *phase2Ptr = nullptr;
|
||||||
|
|
||||||
if (&phase == &dmIter()->phase1())
|
if (&phase == &dmIter()->phase1())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,7 +68,7 @@ Foam::phase::phase
|
|||||||
Foam::autoPtr<Foam::phase> Foam::phase::clone() const
|
Foam::autoPtr<Foam::phase> Foam::phase::clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<phase>(NULL);
|
return autoPtr<phase>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -102,7 +102,7 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::dmdt
|
|||||||
const Foam::phaseModel& phase
|
const Foam::phaseModel& phase
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<volScalarField>(NULL);
|
return tmp<volScalarField>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -175,7 +175,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
|
|||||||
fluid.mesh(),
|
fluid.mesh(),
|
||||||
dimensionedVector("0", dimAcceleration, Zero)
|
dimensionedVector("0", dimAcceleration, Zero)
|
||||||
),
|
),
|
||||||
divU_(NULL),
|
divU_(nullptr),
|
||||||
turbulence_
|
turbulence_
|
||||||
(
|
(
|
||||||
phaseCompressibleTurbulenceModel::New
|
phaseCompressibleTurbulenceModel::New
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,7 +77,7 @@ Foam::phaseModel::phaseModel
|
|||||||
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const
|
Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<phaseModel>(NULL);
|
return autoPtr<phaseModel>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ bool Foam::phaseModel::compressible() const
|
|||||||
const Foam::tmp<Foam::volScalarField>& Foam::phaseModel::divU() const
|
const Foam::tmp<Foam::volScalarField>& Foam::phaseModel::divU() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
static tmp<Foam::volScalarField> divU_(NULL);
|
static tmp<Foam::volScalarField> divU_(nullptr);
|
||||||
return divU_;
|
return divU_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -102,7 +102,7 @@ void Foam::phaseSystem::generatePairsAndSubModels
|
|||||||
: blendingMethods_["default"]
|
: blendingMethods_["default"]
|
||||||
);
|
);
|
||||||
|
|
||||||
autoPtr<modelType> noModel(NULL);
|
autoPtr<modelType> noModel(nullptr);
|
||||||
|
|
||||||
forAllConstIter(typename modelTypeTable, tempModels, iter)
|
forAllConstIter(typename modelTypeTable, tempModels, iter)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,7 +115,7 @@ public:
|
|||||||
autoPtr<IATEsource> clone() const
|
autoPtr<IATEsource> clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<IATEsource>(NULL);
|
return autoPtr<IATEsource>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -114,7 +114,7 @@ public:
|
|||||||
autoPtr<IATEsource> clone() const
|
autoPtr<IATEsource> clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<IATEsource>(NULL);
|
return autoPtr<IATEsource>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ volVectorField D
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
autoPtr<volScalarField> Tptr(NULL);
|
autoPtr<volScalarField> Tptr(nullptr);
|
||||||
|
|
||||||
if (thermalStress)
|
if (thermalStress)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -943,7 +943,7 @@ uint32_t SuperFastHash (const char * data, int len)
|
|||||||
{
|
{
|
||||||
uint32_t hash = 0;
|
uint32_t hash = 0;
|
||||||
|
|
||||||
if (len <= 0 || data == NULL) return 0;
|
if (len <= 0 || data == nullptr) return 0;
|
||||||
|
|
||||||
unsigned rem = len & 3;
|
unsigned rem = len & 3;
|
||||||
len >>= 2;
|
len >>= 2;
|
||||||
@ -1060,14 +1060,14 @@ struct tagtest {
|
|||||||
{ 0.0, "hashLookup3\t", hashLookup3 },
|
{ 0.0, "hashLookup3\t", hashLookup3 },
|
||||||
{ 0.0, "hashLookup3Orig\t", hashLookup3Orig },
|
{ 0.0, "hashLookup3Orig\t", hashLookup3Orig },
|
||||||
{ 0.0, "SuperFastHash\t", SuperFastHash },
|
{ 0.0, "SuperFastHash\t", SuperFastHash },
|
||||||
{ 0.0, NULL, NULL }
|
{ 0.0, nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
int main () {
|
int main () {
|
||||||
int i, j;
|
int i, j;
|
||||||
GenerateCRC32Table ();
|
GenerateCRC32Table ();
|
||||||
|
|
||||||
for (j=0; tests[j].name != NULL; j++) {
|
for (j=0; tests[j].name != nullptr; j++) {
|
||||||
for (i=0; i < 3; i++) {
|
for (i=0; i < 3; i++) {
|
||||||
double res = test (tests[j].hash);
|
double res = test (tests[j].hash);
|
||||||
if (tests[j].res == 0.0 || tests[j].res > res) tests[j].res = res;
|
if (tests[j].res == 0.0 || tests[j].res > res) tests[j].res = res;
|
||||||
|
|||||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
|||||||
string me("Mark");
|
string me("Mark");
|
||||||
|
|
||||||
// Handling of null strings
|
// Handling of null strings
|
||||||
if (regExp(NULL).match(me))
|
if (regExp(nullptr).match(me))
|
||||||
{
|
{
|
||||||
Info<< "fail - matched: " << me << endl;
|
Info<< "fail - matched: " << me << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -648,7 +648,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
// corrector for mesh motion
|
// corrector for mesh motion
|
||||||
twoDPointCorrector* correct2DPtr = NULL;
|
twoDPointCorrector* correct2DPtr = nullptr;
|
||||||
|
|
||||||
if (motionObj.headerOk())
|
if (motionObj.headerOk())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -414,9 +414,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Surface
|
// Surface
|
||||||
autoPtr<triSurface> surf(NULL);
|
autoPtr<triSurface> surf(nullptr);
|
||||||
// Search engine on surface.
|
// Search engine on surface.
|
||||||
autoPtr<triSurfaceSearch> querySurf(NULL);
|
autoPtr<triSurfaceSearch> querySurf(nullptr);
|
||||||
|
|
||||||
if (useSurface)
|
if (useSurface)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -186,7 +186,7 @@ void ReadVertices
|
|||||||
// any chunk. Normally this would be in a for loop.
|
// any chunk. Normally this would be in a for loop.
|
||||||
|
|
||||||
CCMIOSize nVertices;
|
CCMIOSize nVertices;
|
||||||
CCMIOEntitySize(&err, vertices, &nVertices, NULL);
|
CCMIOEntitySize(&err, vertices, &nVertices, nullptr);
|
||||||
|
|
||||||
List<int> mapData(nVertices, 0);
|
List<int> mapData(nVertices, 0);
|
||||||
List<float> verts(3*nVertices, 0);
|
List<float> verts(3*nVertices, 0);
|
||||||
@ -205,9 +205,9 @@ void ReadVertices
|
|||||||
CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize);
|
CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize);
|
||||||
|
|
||||||
//CCMIOSize size;
|
//CCMIOSize size;
|
||||||
//CCMIOEntityDescription(&err, vertices, &size, NULL);
|
//CCMIOEntityDescription(&err, vertices, &size, nullptr);
|
||||||
//char *desc = new char[size + 1];
|
//char *desc = new char[size + 1];
|
||||||
//CCMIOEntityDescription(&err, vertices, NULL, desc);
|
//CCMIOEntityDescription(&err, vertices, nullptr, desc);
|
||||||
//Pout<< "label: '" << desc << "'" << endl;
|
//Pout<< "label: '" << desc << "'" << endl;
|
||||||
//delete [] desc;
|
//delete [] desc;
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ void ReadProblem
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
CCMIONextEntity(NULL, problem, kCCMIOCellType, &i, &next)
|
CCMIONextEntity(nullptr, problem, kCCMIOCellType, &i, &next)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -255,10 +255,10 @@ void ReadProblem
|
|||||||
// an array to get the name because we do not know how long the
|
// an array to get the name because we do not know how long the
|
||||||
// string is yet. Many parameters to CCMIO functions that
|
// string is yet. Many parameters to CCMIO functions that
|
||||||
// return
|
// return
|
||||||
// data can be NULL if that data is not needed.)
|
// data can be nullptr if that data is not needed.)
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOptstr(NULL, next, "MaterialType", &size, NULL)
|
CCMIOReadOptstr(nullptr, next, "MaterialType", &size, nullptr)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -280,7 +280,7 @@ void ReadProblem
|
|||||||
int k = 0;
|
int k = 0;
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
CCMIONextEntity(NULL, problem, kCCMIOBoundaryRegion, &k, &boundary)
|
CCMIONextEntity(nullptr, problem, kCCMIOBoundaryRegion, &k, &boundary)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -292,7 +292,7 @@ void ReadProblem
|
|||||||
int prostarI = -1;
|
int prostarI = -1;
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOpti(NULL, boundary, "ProstarRegionNumber", &prostarI)
|
CCMIOReadOpti(nullptr, boundary, "ProstarRegionNumber", &prostarI)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -318,12 +318,18 @@ void ReadProblem
|
|||||||
int size;
|
int size;
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, NULL)
|
CCMIOReadOptstr
|
||||||
== kCCMIONoErr
|
(
|
||||||
|
nullptr,
|
||||||
|
boundary,
|
||||||
|
"BoundaryType",
|
||||||
|
&size,
|
||||||
|
nullptr
|
||||||
|
) == kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
char* s = new char[size + 1];
|
char* s = new char[size + 1];
|
||||||
CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, s);
|
CCMIOReadOptstr(nullptr, boundary, "BoundaryType", &size, s);
|
||||||
s[size] = '\0';
|
s[size] = '\0';
|
||||||
foamPatchTypes[foamPatchi] = string::validate<word>(string(s));
|
foamPatchTypes[foamPatchi] = string::validate<word>(string(s));
|
||||||
delete [] s;
|
delete [] s;
|
||||||
@ -340,12 +346,18 @@ void ReadProblem
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, NULL)
|
CCMIOReadOptstr
|
||||||
== kCCMIONoErr
|
(
|
||||||
|
nullptr,
|
||||||
|
boundary,
|
||||||
|
"BoundaryName",
|
||||||
|
&size,
|
||||||
|
nullptr
|
||||||
|
) == kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
char* name = new char[size + 1];
|
char* name = new char[size + 1];
|
||||||
CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, name);
|
CCMIOReadOptstr(nullptr, boundary, "BoundaryName", &size, name);
|
||||||
name[size] = '\0';
|
name[size] = '\0';
|
||||||
foamPatchNames[foamPatchi] =
|
foamPatchNames[foamPatchi] =
|
||||||
string::validate<word>(string(name));
|
string::validate<word>(string(name));
|
||||||
@ -353,12 +365,12 @@ void ReadProblem
|
|||||||
}
|
}
|
||||||
else if
|
else if
|
||||||
(
|
(
|
||||||
CCMIOReadOptstr(NULL, boundary, "Label", &size, NULL)
|
CCMIOReadOptstr(nullptr, boundary, "Label", &size, nullptr)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
char* name = new char[size + 1];
|
char* name = new char[size + 1];
|
||||||
CCMIOReadOptstr(NULL, boundary, "Label", &size, name);
|
CCMIOReadOptstr(nullptr, boundary, "Label", &size, name);
|
||||||
name[size] = '\0';
|
name[size] = '\0';
|
||||||
foamPatchNames[foamPatchi] =
|
foamPatchNames[foamPatchi] =
|
||||||
string::validate<word>(string(name));
|
string::validate<word>(string(name));
|
||||||
@ -407,7 +419,7 @@ void ReadCells
|
|||||||
CCMIOID id;
|
CCMIOID id;
|
||||||
CCMIOGetEntity(&err, topology, kCCMIOCells, 0, &id);
|
CCMIOGetEntity(&err, topology, kCCMIOCells, 0, &id);
|
||||||
CCMIOSize nCells;
|
CCMIOSize nCells;
|
||||||
CCMIOEntitySize(&err, id, &nCells, NULL);
|
CCMIOEntitySize(&err, id, &nCells, nullptr);
|
||||||
|
|
||||||
std::vector<int> mapData(nCells);
|
std::vector<int> mapData(nCells);
|
||||||
std::vector<int> cellType(nCells);
|
std::vector<int> cellType(nCells);
|
||||||
@ -431,7 +443,7 @@ void ReadCells
|
|||||||
|
|
||||||
CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id);
|
CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id);
|
||||||
CCMIOSize nInternalFaces;
|
CCMIOSize nInternalFaces;
|
||||||
CCMIOEntitySize(&err, id, &nInternalFaces, NULL);
|
CCMIOEntitySize(&err, id, &nInternalFaces, nullptr);
|
||||||
Pout<< "nInternalFaces:" << nInternalFaces << endl;
|
Pout<< "nInternalFaces:" << nInternalFaces << endl;
|
||||||
|
|
||||||
// Determine patch sizes before reading internal faces
|
// Determine patch sizes before reading internal faces
|
||||||
@ -439,12 +451,12 @@ void ReadCells
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
CCMIONextEntity(NULL, topology, kCCMIOBoundaryFaces, &index, &id)
|
CCMIONextEntity(nullptr, topology, kCCMIOBoundaryFaces, &index, &id)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
CCMIOSize size;
|
CCMIOSize size;
|
||||||
CCMIOEntitySize(&err, id, &size, NULL);
|
CCMIOEntitySize(&err, id, &size, nullptr);
|
||||||
|
|
||||||
Pout<< "Read kCCMIOBoundaryFaces entry with " << size
|
Pout<< "Read kCCMIOBoundaryFaces entry with " << size
|
||||||
<< " faces." << endl;
|
<< " faces." << endl;
|
||||||
@ -463,10 +475,10 @@ void ReadCells
|
|||||||
mapData.resize(nInternalFaces);
|
mapData.resize(nInternalFaces);
|
||||||
CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id);
|
CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id);
|
||||||
CCMIOSize size;
|
CCMIOSize size;
|
||||||
CCMIOReadFaces(&err, id, kCCMIOInternalFaces, NULL, &size, NULL,
|
CCMIOReadFaces(&err, id, kCCMIOInternalFaces, nullptr, &size, nullptr,
|
||||||
kCCMIOStart, kCCMIOEnd);
|
kCCMIOStart, kCCMIOEnd);
|
||||||
std::vector<int> faces(size);
|
std::vector<int> faces(size);
|
||||||
CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, NULL, &faces[0],
|
CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, nullptr, &faces[0],
|
||||||
kCCMIOStart, kCCMIOEnd);
|
kCCMIOStart, kCCMIOEnd);
|
||||||
std::vector<int> faceCells(2*nInternalFaces);
|
std::vector<int> faceCells(2*nInternalFaces);
|
||||||
CCMIOReadFaceCells(&err, id, kCCMIOInternalFaces, &faceCells[0],
|
CCMIOReadFaceCells(&err, id, kCCMIOInternalFaces, &faceCells[0],
|
||||||
@ -503,22 +515,38 @@ void ReadCells
|
|||||||
label regionI = 0;
|
label regionI = 0;
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
CCMIONextEntity(NULL, topology, kCCMIOBoundaryFaces, &index, &id)
|
CCMIONextEntity(nullptr, topology, kCCMIOBoundaryFaces, &index, &id)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
CCMIOSize nFaces;
|
CCMIOSize nFaces;
|
||||||
CCMIOEntitySize(&err, id, &nFaces, NULL);
|
CCMIOEntitySize(&err, id, &nFaces, nullptr);
|
||||||
|
|
||||||
mapData.resize(nFaces);
|
mapData.resize(nFaces);
|
||||||
faceCells.resize(nFaces);
|
faceCells.resize(nFaces);
|
||||||
CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, NULL, &size, NULL,
|
CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, nullptr, &size, nullptr,
|
||||||
kCCMIOStart, kCCMIOEnd);
|
kCCMIOStart, kCCMIOEnd);
|
||||||
faces.resize(size);
|
faces.resize(size);
|
||||||
CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, &mapID, NULL, &faces[0],
|
CCMIOReadFaces
|
||||||
kCCMIOStart, kCCMIOEnd);
|
(
|
||||||
CCMIOReadFaceCells(&err, id, kCCMIOBoundaryFaces, &faceCells[0],
|
&err,
|
||||||
kCCMIOStart, kCCMIOEnd);
|
id,
|
||||||
|
kCCMIOBoundaryFaces,
|
||||||
|
&mapID,
|
||||||
|
nullptr,
|
||||||
|
&faces[0],
|
||||||
|
kCCMIOStart,
|
||||||
|
kCCMIOEnd
|
||||||
|
);
|
||||||
|
CCMIOReadFaceCells
|
||||||
|
(
|
||||||
|
&err,
|
||||||
|
id,
|
||||||
|
kCCMIOBoundaryFaces,
|
||||||
|
&faceCells[0],
|
||||||
|
kCCMIOStart,
|
||||||
|
kCCMIOEnd
|
||||||
|
);
|
||||||
CCMIOReadMap(&err, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd);
|
CCMIOReadMap(&err, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd);
|
||||||
CheckError(err, "Error reading boundary faces");
|
CheckError(err, "Error reading boundary faces");
|
||||||
|
|
||||||
@ -526,7 +554,7 @@ void ReadCells
|
|||||||
int prostarI;
|
int prostarI;
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOpti(NULL, id, "ProstarRegionNumber", &prostarI)
|
CCMIOReadOpti(nullptr, id, "ProstarRegionNumber", &prostarI)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -639,12 +667,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Open the file. Because we did not initialize 'err' we need to pass
|
// Open the file. Because we did not initialize 'err' we need to pass
|
||||||
// in NULL (which always means kCCMIONoErr) and then assign the return
|
// in nullptr (which always means kCCMIONoErr) and then assign the
|
||||||
// value to 'err'.).
|
// return value to 'err'.).
|
||||||
CCMIOID root;
|
CCMIOID root;
|
||||||
CCMIOError err = CCMIOOpenFile
|
CCMIOError err = CCMIOOpenFile
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
ccmFile.c_str(),
|
ccmFile.c_str(),
|
||||||
kCCMIORead,
|
kCCMIORead,
|
||||||
&root
|
&root
|
||||||
@ -659,9 +687,9 @@ int main(int argc, char *argv[])
|
|||||||
CheckError(err, "Error opening state");
|
CheckError(err, "Error opening state");
|
||||||
|
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
CCMIOEntityDescription(&err, state, &size, NULL);
|
CCMIOEntityDescription(&err, state, &size, nullptr);
|
||||||
char *desc = new char[size + 1];
|
char *desc = new char[size + 1];
|
||||||
CCMIOEntityDescription(&err, state, NULL, desc);
|
CCMIOEntityDescription(&err, state, nullptr, desc);
|
||||||
Pout<< "Reading state '" << kDefaultState << "' (" << desc << ")"
|
Pout<< "Reading state '" << kDefaultState << "' (" << desc << ")"
|
||||||
<< endl;
|
<< endl;
|
||||||
delete [] desc;
|
delete [] desc;
|
||||||
@ -678,7 +706,7 @@ int main(int argc, char *argv[])
|
|||||||
processor,
|
processor,
|
||||||
&vertices,
|
&vertices,
|
||||||
&topology,
|
&topology,
|
||||||
NULL,
|
nullptr,
|
||||||
&solution
|
&solution
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -692,8 +720,8 @@ int main(int argc, char *argv[])
|
|||||||
processor,
|
processor,
|
||||||
&vertices,
|
&vertices,
|
||||||
&topology,
|
&topology,
|
||||||
NULL,
|
nullptr,
|
||||||
NULL
|
nullptr
|
||||||
);
|
);
|
||||||
if (err != kCCMIONoErr)
|
if (err != kCCMIONoErr)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -47,7 +47,7 @@ cellShape extrudedQuadCellShape
|
|||||||
faceList& frontAndBackFaces
|
faceList& frontAndBackFaces
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static const cellModel* hexModelPtr_ = NULL;
|
static const cellModel* hexModelPtr_ = nullptr;
|
||||||
|
|
||||||
if (!hexModelPtr_)
|
if (!hexModelPtr_)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -48,7 +48,7 @@ cellShape extrudedTriangleCellShape
|
|||||||
faceList& frontAndBackFaces
|
faceList& frontAndBackFaces
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static const cellModel* prismModelPtr_ = NULL;
|
static const cellModel* prismModelPtr_ = nullptr;
|
||||||
|
|
||||||
if (!prismModelPtr_)
|
if (!prismModelPtr_)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -258,84 +258,84 @@ YIELD STRESS
|
|||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
PRESSURE PASCAL
|
PRESSURE PASCAL
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
CONVECTIVE FILM COEFFICIENT
|
CONVECTIVE FILM COEFFICIENT
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
CONVECTION COEFFICIENT J/M^2/K/SEC
|
CONVECTION COEFFICIENT J/M^2/K/SEC
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
THERMAL CAPACITY PER UNIT AREA
|
THERMAL CAPACITY PER UNIT AREA
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
THERMAL CAPACITY PER UNIT AREA J/M^2/K
|
THERMAL CAPACITY PER UNIT AREA J/M^2/K
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
SURFACE HEAT FLUX RATE
|
SURFACE HEAT FLUX RATE
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
HEAT FLUX PER UNIT AREA J/M^2/SEC
|
HEAT FLUX PER UNIT AREA J/M^2/SEC
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
VISCOSITY
|
VISCOSITY
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
VISCOSITY KG/M/SEC
|
VISCOSITY KG/M/SEC
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
COEFFICIENT OF FRICTION
|
COEFFICIENT OF FRICTION
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
DIMENSIONLESS UNITLESS
|
DIMENSIONLESS UNITLESS
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
AREA FACTOR
|
AREA FACTOR
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
DIMENSIONLESS UNITLESS
|
DIMENSIONLESS UNITLESS
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
EMISSIVITY
|
EMISSIVITY
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
DIMENSIONLESS UNITLESS
|
DIMENSIONLESS UNITLESS
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
ABSORPTIVITY
|
ABSORPTIVITY
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
DIMENSIONLESS UNITLESS
|
DIMENSIONLESS UNITLESS
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
HEAT FLUX RATE
|
HEAT FLUX RATE
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
HEAT FLUX PER UNIT LENGTH J/M/SEC
|
HEAT FLUX PER UNIT LENGTH J/M/SEC
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
INTERACTION TERM FOR TSAI-WU
|
INTERACTION TERM FOR TSAI-WU
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
DIMENSIONLESS UNITLESS
|
DIMENSIONLESS UNITLESS
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
SWELLING COEFFICIENT
|
SWELLING COEFFICIENT
|
||||||
1 VERSION NUMBER
|
1 VERSION NUMBER
|
||||||
0 LINE(S) OF TEXT
|
0 LINE(S) OF TEXT
|
||||||
DIMENSIONS AND UNITS:
|
DIMENSIONS AND UNITS:
|
||||||
DIMENSIONLESS UNITLESS
|
DIMENSIONLESS UNITLESS
|
||||||
NULL_PROPERTY
|
nullptr_PROPERTY
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
DEFAULT MATERIAL PROPERT(IES):
|
DEFAULT MATERIAL PROPERT(IES):
|
||||||
MODULUS OF ELASTICITY VERSION : 1
|
MODULUS OF ELASTICITY VERSION : 1
|
||||||
|
|||||||
@ -185,7 +185,7 @@ Foam::sammMesh::sammMesh
|
|||||||
cellPolys_(0),
|
cellPolys_(0),
|
||||||
nInternalFaces_(0),
|
nInternalFaces_(0),
|
||||||
polyBoundaryPatchStartIndices_(0),
|
polyBoundaryPatchStartIndices_(0),
|
||||||
pointCellsPtr_(NULL),
|
pointCellsPtr_(nullptr),
|
||||||
isShapeMesh_(true)
|
isShapeMesh_(true)
|
||||||
{
|
{
|
||||||
// Fill in the lookup tables
|
// Fill in the lookup tables
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -255,7 +255,7 @@ Foam::starMesh::starMesh
|
|||||||
cellPolys_(0),
|
cellPolys_(0),
|
||||||
nInternalFaces_(0),
|
nInternalFaces_(0),
|
||||||
polyBoundaryPatchStartIndices_(0),
|
polyBoundaryPatchStartIndices_(0),
|
||||||
pointCellsPtr_(NULL),
|
pointCellsPtr_(nullptr),
|
||||||
couples_(0),
|
couples_(0),
|
||||||
isShapeMesh_(true)
|
isShapeMesh_(true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1177,7 +1177,11 @@ void setCouplingInfo
|
|||||||
{
|
{
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
List<polyPatch*> newPatches(patches.size(), static_cast<polyPatch*>(NULL));
|
List<polyPatch*> newPatches
|
||||||
|
(
|
||||||
|
patches.size(),
|
||||||
|
static_cast<polyPatch*>(nullptr)
|
||||||
|
);
|
||||||
|
|
||||||
forAll(zoneToPatch, zoneI)
|
forAll(zoneToPatch, zoneI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -866,7 +866,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
|||||||
"backgroundMeshDecomposition"
|
"backgroundMeshDecomposition"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: NULL
|
: nullptr
|
||||||
),
|
),
|
||||||
cellShapeControl_
|
cellShapeControl_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1810,7 +1810,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Error if startCell is null
|
// Error if startCell is null
|
||||||
if (startCell == NULL)
|
if (startCell == nullptr)
|
||||||
{
|
{
|
||||||
Pout<< "Start cell is null!" << endl;
|
Pout<< "Start cell is null!" << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
virtual autoPtr<searchableSurfaceFeatures> clone() const
|
virtual autoPtr<searchableSurfaceFeatures> clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<searchableSurfaceFeatures>(NULL);
|
return autoPtr<searchableSurfaceFeatures>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,7 +109,7 @@ public:
|
|||||||
autoPtr<faceSelection> clone() const
|
autoPtr<faceSelection> clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<faceSelection>(NULL);
|
return autoPtr<faceSelection>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,7 +86,7 @@ public:
|
|||||||
autoPtr<faceSelection> clone() const
|
autoPtr<faceSelection> clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<faceSelection>(NULL);
|
return autoPtr<faceSelection>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,7 +79,7 @@ public:
|
|||||||
autoPtr<faceSelection> clone() const
|
autoPtr<faceSelection> clone() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return autoPtr<faceSelection>(NULL);
|
return autoPtr<faceSelection>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
mirrorMeshPtr_(NULL)
|
mirrorMeshPtr_(nullptr)
|
||||||
{
|
{
|
||||||
plane mirrorPlane(mirrorMeshDict_);
|
plane mirrorPlane(mirrorMeshDict_);
|
||||||
|
|
||||||
|
|||||||
@ -871,7 +871,7 @@ int main(int argc, char *argv[])
|
|||||||
// Main command read & execute loop
|
// Main command read & execute loop
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
autoPtr<IFstream> fileStreamPtr(NULL);
|
autoPtr<IFstream> fileStreamPtr(nullptr);
|
||||||
|
|
||||||
if (batch)
|
if (batch)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -680,7 +680,7 @@ int main(int argc, char *argv[])
|
|||||||
new List<SLList<indexedParticle*>*>
|
new List<SLList<indexedParticle*>*>
|
||||||
(
|
(
|
||||||
mesh.nCells(),
|
mesh.nCells(),
|
||||||
static_cast<SLList<indexedParticle*>*>(NULL)
|
static_cast<SLList<indexedParticle*>*>(nullptr)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -947,7 +947,7 @@ int main(int argc, char *argv[])
|
|||||||
if (times.size() == 1)
|
if (times.size() == 1)
|
||||||
{
|
{
|
||||||
// Clear cached decomposer
|
// Clear cached decomposer
|
||||||
fieldDecomposerList.set(proci, NULL);
|
fieldDecomposerList.set(proci, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -978,7 +978,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (times.size() == 1)
|
if (times.size() == 1)
|
||||||
{
|
{
|
||||||
dimFieldDecomposerList.set(proci, NULL);
|
dimFieldDecomposerList.set(proci, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1029,8 +1029,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (times.size() == 1)
|
if (times.size() == 1)
|
||||||
{
|
{
|
||||||
pointProcAddressingList.set(proci, NULL);
|
pointProcAddressingList.set(proci, nullptr);
|
||||||
pointFieldDecomposerList.set(proci, NULL);
|
pointFieldDecomposerList.set(proci, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1133,11 +1133,11 @@ int main(int argc, char *argv[])
|
|||||||
// times, otherwise it is just extra storage.
|
// times, otherwise it is just extra storage.
|
||||||
if (times.size() == 1)
|
if (times.size() == 1)
|
||||||
{
|
{
|
||||||
boundaryProcAddressingList.set(proci, NULL);
|
boundaryProcAddressingList.set(proci, nullptr);
|
||||||
cellProcAddressingList.set(proci, NULL);
|
cellProcAddressingList.set(proci, nullptr);
|
||||||
faceProcAddressingList.set(proci, NULL);
|
faceProcAddressingList.set(proci, nullptr);
|
||||||
procMeshList.set(proci, NULL);
|
procMeshList.set(proci, nullptr);
|
||||||
processorDbList.set(proci, NULL);
|
processorDbList.set(proci, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,7 +88,7 @@ Foam::domainDecomposition::domainDecomposition(const IOobject& io)
|
|||||||
false
|
false
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: NULL
|
: nullptr
|
||||||
),
|
),
|
||||||
nProcs_
|
nProcs_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -89,7 +89,7 @@ Foam::pointFieldDecomposer::pointFieldDecomposer
|
|||||||
patchFieldDecomposerPtrs_
|
patchFieldDecomposerPtrs_
|
||||||
(
|
(
|
||||||
procMesh_.boundary().size(),
|
procMesh_.boundary().size(),
|
||||||
static_cast<patchFieldDecomposer*>(NULL)
|
static_cast<patchFieldDecomposer*>(nullptr)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(boundaryAddressing_, patchi)
|
forAll(boundaryAddressing_, patchi)
|
||||||
|
|||||||
@ -227,7 +227,7 @@ autoPtr<mapPolyMesh> mergeSharedPoints
|
|||||||
|
|
||||||
if (returnReduce(pointToMaster.size(), sumOp<label>()) == 0)
|
if (returnReduce(pointToMaster.size(), sumOp<label>()) == 0)
|
||||||
{
|
{
|
||||||
return autoPtr<mapPolyMesh>(NULL);
|
return autoPtr<mapPolyMesh>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
polyTopoChange meshMod(mesh);
|
polyTopoChange meshMod(mesh);
|
||||||
|
|||||||
@ -216,7 +216,7 @@ void writePatchField
|
|||||||
|
|
||||||
word timeFile = prepend + itoa(timeIndex);
|
word timeFile = prepend + itoa(timeIndex);
|
||||||
|
|
||||||
ensightStream* ensightFilePtr = NULL;
|
ensightStream* ensightFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (timeIndex == 0)
|
if (timeIndex == 0)
|
||||||
@ -330,7 +330,7 @@ void ensightField
|
|||||||
const labelList& hexes = meshCellSets.hexes;
|
const labelList& hexes = meshCellSets.hexes;
|
||||||
const labelList& polys = meshCellSets.polys;
|
const labelList& polys = meshCellSets.polys;
|
||||||
|
|
||||||
ensightStream* ensightFilePtr = NULL;
|
ensightStream* ensightFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
@ -548,7 +548,7 @@ void ensightPointField
|
|||||||
const wordHashSet& faceZoneNames = eMesh.faceZoneNames();
|
const wordHashSet& faceZoneNames = eMesh.faceZoneNames();
|
||||||
|
|
||||||
|
|
||||||
ensightStream* ensightFilePtr = NULL;
|
ensightStream* ensightFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
|
|||||||
@ -1041,7 +1041,7 @@ void Foam::ensightMesh::write
|
|||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
fileName ensightGeometryFileName = timeFile + "mesh";
|
fileName ensightGeometryFileName = timeFile + "mesh";
|
||||||
|
|
||||||
ensightStream* ensightGeometryFilePtr = NULL;
|
ensightStream* ensightGeometryFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (binary_)
|
if (binary_)
|
||||||
|
|||||||
@ -196,7 +196,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const word prepend = args.globalCaseName() + '.';
|
const word prepend = args.globalCaseName() + '.';
|
||||||
|
|
||||||
OFstream *ensightCaseFilePtr = NULL;
|
OFstream *ensightCaseFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
fileName caseFileName = prepend + "case";
|
fileName caseFileName = prepend + "case";
|
||||||
|
|||||||
@ -381,7 +381,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// check that the positions field is present for this time
|
// check that the positions field is present for this time
|
||||||
IOobject* positionPtr = cloudObjs.lookup(word("positions"));
|
IOobject* positionPtr = cloudObjs.lookup(word("positions"));
|
||||||
if (positionPtr != NULL)
|
if (positionPtr != nullptr)
|
||||||
{
|
{
|
||||||
ensightParticlePositions
|
ensightParticlePositions
|
||||||
(
|
(
|
||||||
|
|||||||
@ -111,8 +111,8 @@ Pout<< "zoneName:" << zoneName
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
INTEGER4 *PassiveVarArray = NULL;
|
INTEGER4 *PassiveVarArray = nullptr;
|
||||||
INTEGER4 *VarShareArray = NULL;
|
INTEGER4 *VarShareArray = nullptr;
|
||||||
INTEGER4 ShrConn = 0;
|
INTEGER4 ShrConn = 0;
|
||||||
|
|
||||||
INTEGER4 NumBConns = 0; /* No Boundary Connections */
|
INTEGER4 NumBConns = 0; /* No Boundary Connections */
|
||||||
@ -191,8 +191,8 @@ Pout<< "zoneName:" << zoneName
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
INTEGER4 *PassiveVarArray = NULL;
|
INTEGER4 *PassiveVarArray = nullptr;
|
||||||
INTEGER4 *VarShareArray = NULL;
|
INTEGER4 *VarShareArray = nullptr;
|
||||||
INTEGER4 ShrConn = 0;
|
INTEGER4 ShrConn = 0;
|
||||||
|
|
||||||
INTEGER4 NumBConns = 0; /* No Boundary Connections */
|
INTEGER4 NumBConns = 0; /* No Boundary Connections */
|
||||||
@ -273,8 +273,8 @@ Pout<< "zoneName:" << zoneName
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
INTEGER4 *PassiveVarArray = NULL;
|
INTEGER4 *PassiveVarArray = nullptr;
|
||||||
INTEGER4 *VarShareArray = NULL;
|
INTEGER4 *VarShareArray = nullptr;
|
||||||
INTEGER4 ShrConn = 0;
|
INTEGER4 ShrConn = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -373,9 +373,9 @@ void Foam::tecplotWriter::writeConnectivity(const fvMesh& mesh) const
|
|||||||
FaceNodes.begin(), /* The face nodes array */
|
FaceNodes.begin(), /* The face nodes array */
|
||||||
FaceLeftElems.begin(), /* The left elements array */
|
FaceLeftElems.begin(), /* The left elements array */
|
||||||
FaceRightElems.begin(), /* The right elements array */
|
FaceRightElems.begin(), /* The right elements array */
|
||||||
NULL, /* No boundary connection counts */
|
nullptr, /* No boundary connection counts */
|
||||||
NULL, /* No boundary connection elements */
|
nullptr, /* No boundary connection elements */
|
||||||
NULL /* No boundary connection zones */
|
nullptr /* No boundary connection zones */
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -487,9 +487,9 @@ void Foam::tecplotWriter::writeConnectivity
|
|||||||
FaceNodes.begin(), /* The face nodes array */
|
FaceNodes.begin(), /* The face nodes array */
|
||||||
FaceLeftElems.begin(), /* The left elements array */
|
FaceLeftElems.begin(), /* The left elements array */
|
||||||
FaceRightElems.begin(), /* The right elements array */
|
FaceRightElems.begin(), /* The right elements array */
|
||||||
NULL, /* No boundary connection counts */
|
nullptr, /* No boundary connection counts */
|
||||||
NULL, /* No boundary connection elements */
|
nullptr, /* No boundary connection elements */
|
||||||
NULL /* No boundary connection zones */
|
nullptr /* No boundary connection zones */
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -206,14 +206,14 @@ int main(int argc, char *argv[])
|
|||||||
sFields[i]->correctBoundaryConditions();
|
sFields[i]->correctBoundaryConditions();
|
||||||
sFields[i]->write();
|
sFields[i]->write();
|
||||||
delete sFields[i];
|
delete sFields[i];
|
||||||
sFields[i] = NULL;
|
sFields[i] = nullptr;
|
||||||
}
|
}
|
||||||
else if (vFields[i])
|
else if (vFields[i])
|
||||||
{
|
{
|
||||||
vFields[i]->correctBoundaryConditions();
|
vFields[i]->correctBoundaryConditions();
|
||||||
vFields[i]->write();
|
vFields[i]->write();
|
||||||
delete vFields[i];
|
delete vFields[i];
|
||||||
vFields[i] = NULL;
|
vFields[i] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,10 +58,10 @@ vtkPV3FoamReader::vtkPV3FoamReader()
|
|||||||
|
|
||||||
SetNumberOfInputPorts(0);
|
SetNumberOfInputPorts(0);
|
||||||
|
|
||||||
FileName = NULL;
|
FileName = nullptr;
|
||||||
foamData_ = NULL;
|
foamData_ = nullptr;
|
||||||
|
|
||||||
output0_ = NULL;
|
output0_ = nullptr;
|
||||||
|
|
||||||
#ifdef VTKPV3FOAM_DUALPORT
|
#ifdef VTKPV3FOAM_DUALPORT
|
||||||
// Add second output for the Lagrangian
|
// Add second output for the Lagrangian
|
||||||
@ -217,7 +217,7 @@ int vtkPV3FoamReader::RequestInformation
|
|||||||
|
|
||||||
// delete foamData and flag it as fatal error
|
// delete foamData and flag it as fatal error
|
||||||
delete foamData_;
|
delete foamData_;
|
||||||
foamData_ = NULL;
|
foamData_ = nullptr;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ void Foam::vtkPV3Foam::reduceMemory()
|
|||||||
if (!reader_->GetCacheMesh())
|
if (!reader_->GetCacheMesh())
|
||||||
{
|
{
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
meshPtr_ = NULL;
|
meshPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +226,8 @@ Foam::vtkPV3Foam::vtkPV3Foam
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
reader_(reader),
|
reader_(reader),
|
||||||
dbPtr_(NULL),
|
dbPtr_(nullptr),
|
||||||
meshPtr_(NULL),
|
meshPtr_(nullptr),
|
||||||
meshRegion_(polyMesh::defaultRegion),
|
meshRegion_(polyMesh::defaultRegion),
|
||||||
meshDir_(polyMesh::meshSubDir),
|
meshDir_(polyMesh::meshSubDir),
|
||||||
timeIndex_(-1),
|
timeIndex_(-1),
|
||||||
@ -347,7 +347,7 @@ void Foam::vtkPV3Foam::updateInfo()
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::updateInfo"
|
Info<< "<beg> Foam::vtkPV3Foam::updateInfo"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex="
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] timeIndex="
|
||||||
<< timeIndex_ << endl;
|
<< timeIndex_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ void Foam::vtkPV3Foam::updateFoamMesh()
|
|||||||
if (!reader_->GetCacheMesh())
|
if (!reader_->GetCacheMesh())
|
||||||
{
|
{
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
meshPtr_ = NULL;
|
meshPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if the OpenFOAM mesh has been created
|
// Check to see if the OpenFOAM mesh has been created
|
||||||
@ -551,7 +551,7 @@ void Foam::vtkPV3Foam::CleanUp()
|
|||||||
double* Foam::vtkPV3Foam::findTimes(int& nTimeSteps)
|
double* Foam::vtkPV3Foam::findTimes(int& nTimeSteps)
|
||||||
{
|
{
|
||||||
int nTimes = 0;
|
int nTimes = 0;
|
||||||
double* tsteps = NULL;
|
double* tsteps = nullptr;
|
||||||
|
|
||||||
if (dbPtr_.valid())
|
if (dbPtr_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -190,7 +190,7 @@ void Foam::vtkPV3Foam::convertMeshPatches
|
|||||||
<< patchName << endl;
|
<< patchName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = NULL;
|
vtkPolyData* vtkmesh = nullptr;
|
||||||
if (patchIds.size() == 1)
|
if (patchIds.size() == 1)
|
||||||
{
|
{
|
||||||
vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]);
|
vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPV3Foam::lagrangianVTKMesh
|
|||||||
const word& cloudName
|
const word& cloudName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
vtkPolyData* vtkmesh = NULL;
|
vtkPolyData* vtkmesh = nullptr;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -228,7 +228,7 @@ void Foam::vtkPV3Foam::updateInfoPatches
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::updateInfoPatches"
|
Info<< "<beg> Foam::vtkPV3Foam::updateInfoPatches"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -476,7 +476,7 @@ void Foam::vtkPV3Foam::updateInfoZones
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::updateInfoZones"
|
Info<< "<beg> Foam::vtkPV3Foam::updateInfoZones"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
wordList namesLst;
|
wordList namesLst;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void Foam::vtkPV3Foam::updateInfoFields
|
|||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3Foam::updateInfoFields <"
|
Info<< "<beg> Foam::vtkPV3Foam::updateInfoFields <"
|
||||||
<< meshType::Mesh::typeName
|
<< meshType::Mesh::typeName
|
||||||
<< "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
|
<< "> [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,8 +56,8 @@ vtkPV3blockMeshReader::vtkPV3blockMeshReader()
|
|||||||
|
|
||||||
SetNumberOfInputPorts(0);
|
SetNumberOfInputPorts(0);
|
||||||
|
|
||||||
FileName = NULL;
|
FileName = nullptr;
|
||||||
foamData_ = NULL;
|
foamData_ = nullptr;
|
||||||
|
|
||||||
ShowPointNumbers = 1;
|
ShowPointNumbers = 1;
|
||||||
UpdateGUI = 0;
|
UpdateGUI = 0;
|
||||||
@ -165,7 +165,7 @@ int vtkPV3blockMeshReader::RequestInformation
|
|||||||
//
|
//
|
||||||
// // delete foamData and flag it as fatal error
|
// // delete foamData and flag it as fatal error
|
||||||
// delete foamData_;
|
// delete foamData_;
|
||||||
// foamData_ = NULL;
|
// foamData_ = nullptr;
|
||||||
// return 0;
|
// return 0;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ void Foam::vtkPV3blockMesh::updateInfoBlocks
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3blockMesh::updateInfoBlocks"
|
Info<< "<beg> Foam::vtkPV3blockMesh::updateInfoBlocks"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
arrayRangeBlocks_.reset( arraySelection->GetNumberOfArrays() );
|
arrayRangeBlocks_.reset( arraySelection->GetNumberOfArrays() );
|
||||||
@ -109,7 +109,7 @@ void Foam::vtkPV3blockMesh::updateInfoEdges
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3blockMesh::updateInfoEdges"
|
Info<< "<beg> Foam::vtkPV3blockMesh::updateInfoEdges"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
arrayRangeEdges_.reset( arraySelection->GetNumberOfArrays() );
|
arrayRangeEdges_.reset( arraySelection->GetNumberOfArrays() );
|
||||||
@ -150,8 +150,8 @@ Foam::vtkPV3blockMesh::vtkPV3blockMesh
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
reader_(reader),
|
reader_(reader),
|
||||||
dbPtr_(NULL),
|
dbPtr_(nullptr),
|
||||||
meshPtr_(NULL),
|
meshPtr_(nullptr),
|
||||||
meshRegion_(polyMesh::defaultRegion),
|
meshRegion_(polyMesh::defaultRegion),
|
||||||
meshDir_(polyMesh::meshSubDir),
|
meshDir_(polyMesh::meshSubDir),
|
||||||
arrayRangeBlocks_("block"),
|
arrayRangeBlocks_("block"),
|
||||||
@ -269,7 +269,7 @@ void Foam::vtkPV3blockMesh::updateInfo()
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPV3blockMesh::updateInfo"
|
Info<< "<beg> Foam::vtkPV3blockMesh::updateInfo"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] " << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetCounters();
|
resetCounters();
|
||||||
|
|||||||
@ -58,10 +58,10 @@ vtkPVFoamReader::vtkPVFoamReader()
|
|||||||
|
|
||||||
SetNumberOfInputPorts(0);
|
SetNumberOfInputPorts(0);
|
||||||
|
|
||||||
FileName = NULL;
|
FileName = nullptr;
|
||||||
foamData_ = NULL;
|
foamData_ = nullptr;
|
||||||
|
|
||||||
output0_ = NULL;
|
output0_ = nullptr;
|
||||||
|
|
||||||
#ifdef VTKPVFOAM_DUALPORT
|
#ifdef VTKPVFOAM_DUALPORT
|
||||||
// Add second output for the Lagrangian
|
// Add second output for the Lagrangian
|
||||||
@ -217,7 +217,7 @@ int vtkPVFoamReader::RequestInformation
|
|||||||
|
|
||||||
// delete foamData and flag it as fatal error
|
// delete foamData and flag it as fatal error
|
||||||
delete foamData_;
|
delete foamData_;
|
||||||
foamData_ = NULL;
|
foamData_ = nullptr;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ void Foam::vtkPVFoam::reduceMemory()
|
|||||||
if (!reader_->GetCacheMesh())
|
if (!reader_->GetCacheMesh())
|
||||||
{
|
{
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
meshPtr_ = NULL;
|
meshPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +226,8 @@ Foam::vtkPVFoam::vtkPVFoam
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
reader_(reader),
|
reader_(reader),
|
||||||
dbPtr_(NULL),
|
dbPtr_(nullptr),
|
||||||
meshPtr_(NULL),
|
meshPtr_(nullptr),
|
||||||
meshRegion_(polyMesh::defaultRegion),
|
meshRegion_(polyMesh::defaultRegion),
|
||||||
meshDir_(polyMesh::meshSubDir),
|
meshDir_(polyMesh::meshSubDir),
|
||||||
timeIndex_(-1),
|
timeIndex_(-1),
|
||||||
@ -347,7 +347,7 @@ void Foam::vtkPVFoam::updateInfo()
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPVFoam::updateInfo"
|
Info<< "<beg> Foam::vtkPVFoam::updateInfo"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex="
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] timeIndex="
|
||||||
<< timeIndex_ << endl;
|
<< timeIndex_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ void Foam::vtkPVFoam::updateFoamMesh()
|
|||||||
if (!reader_->GetCacheMesh())
|
if (!reader_->GetCacheMesh())
|
||||||
{
|
{
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
meshPtr_ = NULL;
|
meshPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if the OpenFOAM mesh has been created
|
// Check to see if the OpenFOAM mesh has been created
|
||||||
@ -551,7 +551,7 @@ void Foam::vtkPVFoam::CleanUp()
|
|||||||
double* Foam::vtkPVFoam::findTimes(int& nTimeSteps)
|
double* Foam::vtkPVFoam::findTimes(int& nTimeSteps)
|
||||||
{
|
{
|
||||||
int nTimes = 0;
|
int nTimes = 0;
|
||||||
double* tsteps = NULL;
|
double* tsteps = nullptr;
|
||||||
|
|
||||||
if (dbPtr_.valid())
|
if (dbPtr_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -188,7 +188,7 @@ void Foam::vtkPVFoam::convertMeshPatches
|
|||||||
<< patchName << endl;
|
<< patchName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkPolyData* vtkmesh = NULL;
|
vtkPolyData* vtkmesh = nullptr;
|
||||||
if (patchIds.size() == 1)
|
if (patchIds.size() == 1)
|
||||||
{
|
{
|
||||||
vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]);
|
vtkmesh = patchVTKMesh(patchName, patches[patchIds.begin().key()]);
|
||||||
|
|||||||
@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPVFoam::lagrangianVTKMesh
|
|||||||
const word& cloudName
|
const word& cloudName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
vtkPolyData* vtkmesh = NULL;
|
vtkPolyData* vtkmesh = nullptr;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -228,7 +228,7 @@ void Foam::vtkPVFoam::updateInfoPatches
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPVFoam::updateInfoPatches"
|
Info<< "<beg> Foam::vtkPVFoam::updateInfoPatches"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -476,7 +476,7 @@ void Foam::vtkPVFoam::updateInfoZones
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPVFoam::updateInfoZones"
|
Info<< "<beg> Foam::vtkPVFoam::updateInfoZones"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
wordList namesLst;
|
wordList namesLst;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void Foam::vtkPVFoam::updateInfoFields
|
|||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPVFoam::updateInfoFields <"
|
Info<< "<beg> Foam::vtkPVFoam::updateInfoFields <"
|
||||||
<< meshType::Mesh::typeName
|
<< meshType::Mesh::typeName
|
||||||
<< "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
|
<< "> [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,8 +56,8 @@ vtkPVblockMeshReader::vtkPVblockMeshReader()
|
|||||||
|
|
||||||
SetNumberOfInputPorts(0);
|
SetNumberOfInputPorts(0);
|
||||||
|
|
||||||
FileName = NULL;
|
FileName = nullptr;
|
||||||
foamData_ = NULL;
|
foamData_ = nullptr;
|
||||||
|
|
||||||
ShowPointNumbers = 1;
|
ShowPointNumbers = 1;
|
||||||
UpdateGUI = 0;
|
UpdateGUI = 0;
|
||||||
@ -165,7 +165,7 @@ int vtkPVblockMeshReader::RequestInformation
|
|||||||
//
|
//
|
||||||
// // delete foamData and flag it as fatal error
|
// // delete foamData and flag it as fatal error
|
||||||
// delete foamData_;
|
// delete foamData_;
|
||||||
// foamData_ = NULL;
|
// foamData_ = nullptr;
|
||||||
// return 0;
|
// return 0;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ void Foam::vtkPVblockMesh::updateInfoBlocks
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPVblockMesh::updateInfoBlocks"
|
Info<< "<beg> Foam::vtkPVblockMesh::updateInfoBlocks"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
arrayRangeBlocks_.reset( arraySelection->GetNumberOfArrays() );
|
arrayRangeBlocks_.reset( arraySelection->GetNumberOfArrays() );
|
||||||
@ -109,7 +109,7 @@ void Foam::vtkPVblockMesh::updateInfoEdges
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPVblockMesh::updateInfoEdges"
|
Info<< "<beg> Foam::vtkPVblockMesh::updateInfoEdges"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "]" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
arrayRangeEdges_.reset( arraySelection->GetNumberOfArrays() );
|
arrayRangeEdges_.reset( arraySelection->GetNumberOfArrays() );
|
||||||
@ -150,8 +150,8 @@ Foam::vtkPVblockMesh::vtkPVblockMesh
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
reader_(reader),
|
reader_(reader),
|
||||||
dbPtr_(NULL),
|
dbPtr_(nullptr),
|
||||||
meshPtr_(NULL),
|
meshPtr_(nullptr),
|
||||||
meshRegion_(polyMesh::defaultRegion),
|
meshRegion_(polyMesh::defaultRegion),
|
||||||
meshDir_(polyMesh::meshSubDir),
|
meshDir_(polyMesh::meshSubDir),
|
||||||
arrayRangeBlocks_("block"),
|
arrayRangeBlocks_("block"),
|
||||||
@ -269,7 +269,7 @@ void Foam::vtkPVblockMesh::updateInfo()
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "<beg> Foam::vtkPVblockMesh::updateInfo"
|
Info<< "<beg> Foam::vtkPVblockMesh::updateInfo"
|
||||||
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl;
|
<< " [meshPtr=" << (meshPtr_ ? "set" : "nullptr") << "] " << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetCounters();
|
resetCounters();
|
||||||
|
|||||||
@ -32,7 +32,7 @@ bool Foam::fieldOk(const IOobjectList& cloudObjs, const word& name)
|
|||||||
{
|
{
|
||||||
IOobjectList objects(cloudObjs.lookupClass(IOField<Type>::typeName));
|
IOobjectList objects(cloudObjs.lookupClass(IOField<Type>::typeName));
|
||||||
|
|
||||||
return (objects.lookup(name) != NULL);
|
return (objects.lookup(name) != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ Foam::tmp<Foam::Field<Type>> Foam::readParticleField
|
|||||||
IOobjectList objects(cloudObjs.lookupClass(IOField<Type>::typeName));
|
IOobjectList objects(cloudObjs.lookupClass(IOField<Type>::typeName));
|
||||||
|
|
||||||
const IOobject* obj = objects.lookup(name);
|
const IOobject* obj = objects.lookup(name);
|
||||||
if (obj != NULL)
|
if (obj != nullptr)
|
||||||
{
|
{
|
||||||
IOField<Type> newField(*obj);
|
IOField<Type> newField(*obj);
|
||||||
return tmp<Field<Type>>(new Field<Type>(newField.xfer()));
|
return tmp<Field<Type>>(new Field<Type>(newField.xfer()));
|
||||||
@ -73,7 +73,7 @@ void Foam::readFields
|
|||||||
forAll(fieldNames, j)
|
forAll(fieldNames, j)
|
||||||
{
|
{
|
||||||
const IOobject* obj = objects.lookup(fieldNames[j]);
|
const IOobject* obj = objects.lookup(fieldNames[j]);
|
||||||
if (obj != NULL)
|
if (obj != nullptr)
|
||||||
{
|
{
|
||||||
Info<< " reading field " << fieldNames[j] << endl;
|
Info<< " reading field " << fieldNames[j] << endl;
|
||||||
IOField<Type> newField(*obj);
|
IOField<Type> newField(*obj);
|
||||||
@ -158,7 +158,7 @@ void Foam::processFields
|
|||||||
forAll(userFieldNames, i)
|
forAll(userFieldNames, i)
|
||||||
{
|
{
|
||||||
IOobject* obj = objects.lookup(userFieldNames[i]);
|
IOobject* obj = objects.lookup(userFieldNames[i]);
|
||||||
if (obj != NULL)
|
if (obj != nullptr)
|
||||||
{
|
{
|
||||||
fieldNames.append(obj->name());
|
fieldNames.append(obj->name());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
const scalar xMin = p->minValue();
|
const scalar xMin = p->minValue();
|
||||||
const scalar xMax = p->maxValue();
|
const scalar xMax = p->maxValue();
|
||||||
|
|
||||||
autoPtr<OFstream> filePtr(NULL);
|
autoPtr<OFstream> filePtr(nullptr);
|
||||||
if (writeData)
|
if (writeData)
|
||||||
{
|
{
|
||||||
fileName fName = pdfPath/(p->type() + ".data");
|
fileName fName = pdfPath/(p->type() + ".data");
|
||||||
|
|||||||
@ -49,7 +49,7 @@ void processField
|
|||||||
|
|
||||||
IOobjectList fieldObjbjects(objects.lookupClass(fieldType::typeName));
|
IOobjectList fieldObjbjects(objects.lookupClass(fieldType::typeName));
|
||||||
|
|
||||||
if (fieldObjbjects.lookup(fieldName) != NULL)
|
if (fieldObjbjects.lookup(fieldName) != nullptr)
|
||||||
{
|
{
|
||||||
fieldType vtf(*fieldObjbjects.lookup(fieldName), mesh);
|
fieldType vtf(*fieldObjbjects.lookup(fieldName), mesh);
|
||||||
const typename fieldType::Boundary& bf =
|
const typename fieldType::Boundary& bf =
|
||||||
|
|||||||
@ -133,7 +133,7 @@ void rewriteBoundary
|
|||||||
|
|
||||||
if (patchDict.found("neighbourPatch"))
|
if (patchDict.found("neighbourPatch"))
|
||||||
{
|
{
|
||||||
patches.set(patchi, oldPatches.set(patchi, NULL));
|
patches.set(patchi, oldPatches.set(patchi, nullptr));
|
||||||
oldToNew[patchi] = newPatchi++;
|
oldToNew[patchi] = newPatchi++;
|
||||||
|
|
||||||
// Check if patches come from automatic conversion
|
// Check if patches come from automatic conversion
|
||||||
@ -181,7 +181,7 @@ void rewriteBoundary
|
|||||||
const dictionary patchDict(patches[patchi].dict());
|
const dictionary patchDict(patches[patchi].dict());
|
||||||
|
|
||||||
// Change entry on this side
|
// Change entry on this side
|
||||||
patches.set(patchi, oldPatches.set(patchi, NULL));
|
patches.set(patchi, oldPatches.set(patchi, nullptr));
|
||||||
oldToNew[patchi] = newPatchi++;
|
oldToNew[patchi] = newPatchi++;
|
||||||
dictionary& thisPatchDict = patches[patchi].dict();
|
dictionary& thisPatchDict = patches[patchi].dict();
|
||||||
thisPatchDict.add("neighbourPatch", nbrName);
|
thisPatchDict.add("neighbourPatch", nbrName);
|
||||||
@ -226,7 +226,7 @@ void rewriteBoundary
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
patches.set(patchi, oldPatches.set(patchi, NULL));
|
patches.set(patchi, oldPatches.set(patchi, nullptr));
|
||||||
oldToNew[patchi] = newPatchi++;
|
oldToNew[patchi] = newPatchi++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ template<class Type>
|
|||||||
List<Type>::List(int s){
|
List<Type>::List(int s){
|
||||||
num=0;
|
num=0;
|
||||||
array_size = 0;
|
array_size = 0;
|
||||||
element = NULL;
|
element = nullptr;
|
||||||
if(s) {
|
if(s) {
|
||||||
allocate(s);
|
allocate(s);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -198,12 +198,12 @@ void ComputeEdgeCostAtVertex(Vertex *v) {
|
|||||||
// cost (in member variable objdist).
|
// cost (in member variable objdist).
|
||||||
if(v->neighbor.num==0) {
|
if(v->neighbor.num==0) {
|
||||||
// v doesn't have neighbors so it costs nothing to collapse
|
// v doesn't have neighbors so it costs nothing to collapse
|
||||||
v->collapse=NULL;
|
v->collapse=nullptr;
|
||||||
v->objdist=-0.01f;
|
v->objdist=-0.01f;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
v->objdist = 1000000;
|
v->objdist = 1000000;
|
||||||
v->collapse=NULL;
|
v->collapse=nullptr;
|
||||||
// search all neighboring edges for "least cost" edge
|
// search all neighboring edges for "least cost" edge
|
||||||
for(int i=0;i<v->neighbor.num;i++) {
|
for(int i=0;i<v->neighbor.num;i++) {
|
||||||
float dist;
|
float dist;
|
||||||
|
|||||||
@ -271,35 +271,35 @@ HWND CreateOpenGLWindow(char* title)
|
|||||||
|
|
||||||
/* only register the window class once - use hInstance as a flag. */
|
/* only register the window class once - use hInstance as a flag. */
|
||||||
if (!hInstance) {
|
if (!hInstance) {
|
||||||
hInstance = GetModuleHandle(NULL);
|
hInstance = GetModuleHandle(nullptr);
|
||||||
wc.style = CS_OWNDC;
|
wc.style = CS_OWNDC;
|
||||||
wc.lpfnWndProc = (WNDPROC)WindowProc;
|
wc.lpfnWndProc = (WNDPROC)WindowProc;
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
wc.cbWndExtra = 0;
|
wc.cbWndExtra = 0;
|
||||||
wc.hInstance = hInstance;
|
wc.hInstance = hInstance;
|
||||||
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
|
wc.hIcon = LoadIcon(nullptr, IDI_WINLOGO);
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||||
wc.hbrBackground = NULL;
|
wc.hbrBackground = nullptr;
|
||||||
wc.lpszMenuName = NULL;
|
wc.lpszMenuName = nullptr;
|
||||||
wc.lpszClassName = "OpenGL";
|
wc.lpszClassName = "OpenGL";
|
||||||
|
|
||||||
if (!RegisterClass(&wc)) {
|
if (!RegisterClass(&wc)) {
|
||||||
MessageBox(NULL, "RegisterClass() failed: "
|
MessageBox(nullptr, "RegisterClass() failed: "
|
||||||
"Cannot register window class.",
|
"Cannot register window class.",
|
||||||
"Error", MB_OK);
|
"Error", MB_OK);
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hWnd = CreateWindow("OpenGL", title, WS_OVERLAPPEDWINDOW |
|
hWnd = CreateWindow("OpenGL", title, WS_OVERLAPPEDWINDOW |
|
||||||
WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
|
WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
|
||||||
0,0,Width,Height, NULL, NULL, hInstance, NULL);
|
0,0,Width,Height, nullptr, nullptr, hInstance, nullptr);
|
||||||
|
|
||||||
if (hWnd == NULL) {
|
if (hWnd == nullptr) {
|
||||||
MessageBox(NULL,
|
MessageBox(nullptr,
|
||||||
"CreateWindow() failed: Cannot create a window.",
|
"CreateWindow() failed: Cannot create a window.",
|
||||||
"Error", MB_OK);
|
"Error", MB_OK);
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
hDC = GetDC(hWnd);
|
hDC = GetDC(hWnd);
|
||||||
@ -318,14 +318,14 @@ HWND CreateOpenGLWindow(char* title)
|
|||||||
|
|
||||||
pf = ChoosePixelFormat(hDC, &pfd);
|
pf = ChoosePixelFormat(hDC, &pfd);
|
||||||
if (pf == 0) {
|
if (pf == 0) {
|
||||||
MessageBox(NULL, "ChoosePixelFormat() failed: "
|
MessageBox(nullptr, "ChoosePixelFormat() failed: "
|
||||||
"Cannot find a suitable pixel format.",
|
"Cannot find a suitable pixel format.",
|
||||||
"Error", MB_OK);
|
"Error", MB_OK);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SetPixelFormat(hDC, pf, &pfd) == FALSE) {
|
if (SetPixelFormat(hDC, pf, &pfd) == FALSE) {
|
||||||
MessageBox(NULL, "SetPixelFormat() failed: "
|
MessageBox(nullptr, "SetPixelFormat() failed: "
|
||||||
"Cannot set format specified.", "Error", MB_OK);
|
"Cannot set format specified.", "Error", MB_OK);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -414,7 +414,7 @@ int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst,
|
|||||||
CalcFPSDeltaT();
|
CalcFPSDeltaT();
|
||||||
|
|
||||||
hWnd = CreateOpenGLWindow("bunnylod by Stan Melax");
|
hWnd = CreateOpenGLWindow("bunnylod by Stan Melax");
|
||||||
if (hWnd == NULL) exit(1);
|
if (hWnd == nullptr) exit(1);
|
||||||
|
|
||||||
hDC = GetDC(hWnd);
|
hDC = GetDC(hWnd);
|
||||||
hRC = wglCreateContext(hDC);
|
hRC = wglCreateContext(hDC);
|
||||||
@ -444,7 +444,7 @@ int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst,
|
|||||||
}
|
}
|
||||||
|
|
||||||
quit:
|
quit:
|
||||||
wglMakeCurrent(NULL, NULL);
|
wglMakeCurrent(nullptr, nullptr);
|
||||||
ReleaseDC(hDC, hWnd);
|
ReleaseDC(hDC, hWnd);
|
||||||
wglDeleteContext(hRC);
|
wglDeleteContext(hRC);
|
||||||
DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
|
|||||||
@ -95,7 +95,7 @@ pid_t Foam::pgid()
|
|||||||
|
|
||||||
bool Foam::env(const word& envName)
|
bool Foam::env(const word& envName)
|
||||||
{
|
{
|
||||||
return ::getenv(envName.c_str()) != NULL;
|
return ::getenv(envName.c_str()) != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ Foam::string Foam::userName()
|
|||||||
{
|
{
|
||||||
struct passwd* pw = ::getpwuid(::getuid());
|
struct passwd* pw = ::getpwuid(::getuid());
|
||||||
|
|
||||||
if (pw != NULL)
|
if (pw != nullptr)
|
||||||
{
|
{
|
||||||
return pw->pw_name;
|
return pw->pw_name;
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ Foam::fileName Foam::home()
|
|||||||
{
|
{
|
||||||
char* env = ::getenv("HOME");
|
char* env = ::getenv("HOME");
|
||||||
|
|
||||||
if (env != NULL)
|
if (env != nullptr)
|
||||||
{
|
{
|
||||||
return fileName(env);
|
return fileName(env);
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ Foam::fileName Foam::home()
|
|||||||
{
|
{
|
||||||
struct passwd* pw = ::getpwuid(getuid());
|
struct passwd* pw = ::getpwuid(getuid());
|
||||||
|
|
||||||
if (pw != NULL)
|
if (pw != nullptr)
|
||||||
{
|
{
|
||||||
return pw->pw_dir;
|
return pw->pw_dir;
|
||||||
}
|
}
|
||||||
@ -224,7 +224,7 @@ Foam::fileName Foam::home(const string& userName)
|
|||||||
{
|
{
|
||||||
char* env = ::getenv("HOME");
|
char* env = ::getenv("HOME");
|
||||||
|
|
||||||
if (env != NULL)
|
if (env != nullptr)
|
||||||
{
|
{
|
||||||
return fileName(env);
|
return fileName(env);
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ Foam::fileName Foam::home(const string& userName)
|
|||||||
pw = ::getpwuid(::getuid());
|
pw = ::getpwuid(::getuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pw != NULL)
|
if (pw != nullptr)
|
||||||
{
|
{
|
||||||
return pw->pw_dir;
|
return pw->pw_dir;
|
||||||
}
|
}
|
||||||
@ -551,7 +551,7 @@ Foam::fileNameList Foam::readDir
|
|||||||
label nEntries = 0;
|
label nEntries = 0;
|
||||||
|
|
||||||
// Attempt to open directory and set the structure pointer
|
// Attempt to open directory and set the structure pointer
|
||||||
if ((source = ::opendir(directory.c_str())) == NULL)
|
if ((source = ::opendir(directory.c_str())) == nullptr)
|
||||||
{
|
{
|
||||||
dirEntries.setSize(0);
|
dirEntries.setSize(0);
|
||||||
|
|
||||||
@ -564,7 +564,7 @@ Foam::fileNameList Foam::readDir
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Read and parse all the entries in the directory
|
// Read and parse all the entries in the directory
|
||||||
while ((list = ::readdir(source)) != NULL)
|
while ((list = ::readdir(source)) != nullptr)
|
||||||
{
|
{
|
||||||
fileName fName(list->d_name);
|
fileName fName(list->d_name);
|
||||||
|
|
||||||
@ -849,7 +849,7 @@ bool Foam::rmDir(const fileName& directory)
|
|||||||
struct dirent *list;
|
struct dirent *list;
|
||||||
|
|
||||||
// Attempt to open directory and set the structure pointer
|
// Attempt to open directory and set the structure pointer
|
||||||
if ((source = ::opendir(directory.c_str())) == NULL)
|
if ((source = ::opendir(directory.c_str())) == nullptr)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "cannot open directory " << directory << endl;
|
<< "cannot open directory " << directory << endl;
|
||||||
@ -859,7 +859,7 @@ bool Foam::rmDir(const fileName& directory)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Read and parse all the entries in the directory
|
// Read and parse all the entries in the directory
|
||||||
while ((list = ::readdir(source)) != NULL)
|
while ((list = ::readdir(source)) != nullptr)
|
||||||
{
|
{
|
||||||
fileName fName(list->d_name);
|
fileName fName(list->d_name);
|
||||||
|
|
||||||
@ -945,7 +945,7 @@ bool Foam::ping
|
|||||||
struct sockaddr_in destAddr; // will hold the destination addr
|
struct sockaddr_in destAddr; // will hold the destination addr
|
||||||
u_int addr;
|
u_int addr;
|
||||||
|
|
||||||
if ((hostPtr = ::gethostbyname(destName.c_str())) == NULL)
|
if ((hostPtr = ::gethostbyname(destName.c_str())) == nullptr)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "gethostbyname error " << h_errno << " for host " << destName
|
<< "gethostbyname error " << h_errno << " for host " << destName
|
||||||
|
|||||||
@ -313,8 +313,8 @@ void Foam::fileMonitor::checkFiles() const
|
|||||||
(
|
(
|
||||||
watcher_->inotifyFd_+1, // num filedescriptors in fdSet
|
watcher_->inotifyFd_+1, // num filedescriptors in fdSet
|
||||||
&fdSet, // fdSet with only inotifyFd
|
&fdSet, // fdSet with only inotifyFd
|
||||||
NULL, // No writefds
|
nullptr, // No writefds
|
||||||
NULL, // No errorfds
|
nullptr, // No errorfds
|
||||||
&zeroTimeout // eNo timeout
|
&zeroTimeout // eNo timeout
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,7 @@ string pOpen(const string &cmd, label line=0)
|
|||||||
|
|
||||||
if (cmdPipe)
|
if (cmdPipe)
|
||||||
{
|
{
|
||||||
char *buf = NULL;
|
char *buf = nullptr;
|
||||||
|
|
||||||
// Read line number of lines
|
// Read line number of lines
|
||||||
for (label cnt = 0; cnt <= line; cnt++)
|
for (label cnt = 0; cnt <= line; cnt++)
|
||||||
@ -69,7 +69,7 @@ string pOpen(const string &cmd, label line=0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf != NULL)
|
if (buf != nullptr)
|
||||||
{
|
{
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ word demangleSymbol(const char* sn)
|
|||||||
char* cxx_sname = abi::__cxa_demangle
|
char* cxx_sname = abi::__cxa_demangle
|
||||||
(
|
(
|
||||||
sn,
|
sn,
|
||||||
NULL,
|
nullptr,
|
||||||
0,
|
0,
|
||||||
&st
|
&st
|
||||||
);
|
);
|
||||||
@ -227,13 +227,13 @@ void Foam::error::printStack(Ostream& os)
|
|||||||
int st = dladdr(callstack[i], info);
|
int st = dladdr(callstack[i], info);
|
||||||
|
|
||||||
os << '#' << label(i) << " ";
|
os << '#' << label(i) << " ";
|
||||||
if (st != 0 && info->dli_fname != NULL && info->dli_fname[0] != '\0')
|
if (st != 0 && info->dli_fname != nullptr && info->dli_fname[0] != '\0')
|
||||||
{
|
{
|
||||||
fname = absolutePath(info->dli_fname);
|
fname = absolutePath(info->dli_fname);
|
||||||
|
|
||||||
os <<
|
os <<
|
||||||
(
|
(
|
||||||
(info->dli_sname != NULL)
|
(info->dli_sname != nullptr)
|
||||||
? demangleSymbol(info->dli_sname)
|
? demangleSymbol(info->dli_sname)
|
||||||
: "?"
|
: "?"
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -117,7 +117,7 @@ void Foam::regExp::set(const char* pattern, const bool ignoreCase) const
|
|||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
// Avoid NULL pointer and zero-length patterns
|
// Avoid nullptr pointer and zero-length patterns
|
||||||
if (pattern && *pattern)
|
if (pattern && *pattern)
|
||||||
{
|
{
|
||||||
int cflags = REG_EXTENDED;
|
int cflags = REG_EXTENDED;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -90,7 +90,7 @@ void* Foam::sigFpe::mallocNan(size_t size)
|
|||||||
void Foam::sigFpe::sigHandler(int)
|
void Foam::sigFpe::sigHandler(int)
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (sigaction(SIGFPE, &oldAction_, NULL) < 0)
|
if (sigaction(SIGFPE, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGFPE trapping"
|
<< "Cannot reset SIGFPE trapping"
|
||||||
@ -112,7 +112,7 @@ void Foam::sigFpe::sigHandler(int)
|
|||||||
|
|
||||||
Foam::sigFpe::sigFpe()
|
Foam::sigFpe::sigFpe()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -124,7 +124,11 @@ Foam::sigFpe::~sigFpe()
|
|||||||
{
|
{
|
||||||
#ifdef LINUX_GNUC
|
#ifdef LINUX_GNUC
|
||||||
// Reset signal
|
// Reset signal
|
||||||
if (oldAction_.sa_handler && sigaction(SIGFPE, &oldAction_, NULL) < 0)
|
if
|
||||||
|
(
|
||||||
|
oldAction_.sa_handler
|
||||||
|
&& sigaction(SIGFPE, &oldAction_, nullptr) < 0
|
||||||
|
)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGFPE trapping"
|
<< "Cannot reset SIGFPE trapping"
|
||||||
@ -199,7 +203,7 @@ void Foam::sigFpe::set(const bool verbose)
|
|||||||
| _EN_OVERFL,
|
| _EN_OVERFL,
|
||||||
0,
|
0,
|
||||||
_ABORT_ON_ERROR,
|
_ABORT_ON_ERROR,
|
||||||
NULL
|
nullptr
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,7 +38,7 @@ struct sigaction Foam::sigInt::oldAction_;
|
|||||||
void Foam::sigInt::sigHandler(int)
|
void Foam::sigInt::sigHandler(int)
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (sigaction(SIGINT, &oldAction_, NULL) < 0)
|
if (sigaction(SIGINT, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGINT trapping"
|
<< "Cannot reset SIGINT trapping"
|
||||||
@ -57,7 +57,7 @@ void Foam::sigInt::sigHandler(int)
|
|||||||
|
|
||||||
Foam::sigInt::sigInt()
|
Foam::sigInt::sigInt()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ Foam::sigInt::sigInt()
|
|||||||
Foam::sigInt::~sigInt()
|
Foam::sigInt::~sigInt()
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (sigaction(SIGINT, &oldAction_, NULL) < 0)
|
if (sigaction(SIGINT, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGINT trapping"
|
<< "Cannot reset SIGINT trapping"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,7 +38,7 @@ struct sigaction Foam::sigQuit::oldAction_;
|
|||||||
void Foam::sigQuit::sigHandler(int)
|
void Foam::sigQuit::sigHandler(int)
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (sigaction(SIGQUIT, &oldAction_, NULL) < 0)
|
if (sigaction(SIGQUIT, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGQUIT trapping"
|
<< "Cannot reset SIGQUIT trapping"
|
||||||
@ -59,7 +59,7 @@ void Foam::sigQuit::sigHandler(int)
|
|||||||
|
|
||||||
Foam::sigQuit::sigQuit()
|
Foam::sigQuit::sigQuit()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ Foam::sigQuit::sigQuit()
|
|||||||
Foam::sigQuit::~sigQuit()
|
Foam::sigQuit::~sigQuit()
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (oldAction_.sa_handler && sigaction(SIGQUIT, &oldAction_, NULL) < 0)
|
if (oldAction_.sa_handler && sigaction(SIGQUIT, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGQUIT trapping"
|
<< "Cannot reset SIGQUIT trapping"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,7 +38,7 @@ struct sigaction Foam::sigSegv::oldAction_;
|
|||||||
void Foam::sigSegv::sigHandler(int)
|
void Foam::sigSegv::sigHandler(int)
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (sigaction(SIGSEGV, &oldAction_, NULL) < 0)
|
if (sigaction(SIGSEGV, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGSEGV trapping"
|
<< "Cannot reset SIGSEGV trapping"
|
||||||
@ -59,7 +59,7 @@ void Foam::sigSegv::sigHandler(int)
|
|||||||
|
|
||||||
Foam::sigSegv::sigSegv()
|
Foam::sigSegv::sigSegv()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ Foam::sigSegv::sigSegv()
|
|||||||
Foam::sigSegv::~sigSegv()
|
Foam::sigSegv::~sigSegv()
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (sigaction(SIGSEGV, &oldAction_, NULL) < 0)
|
if (sigaction(SIGSEGV, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset SIGSEGV trapping"
|
<< "Cannot reset SIGSEGV trapping"
|
||||||
|
|||||||
@ -67,7 +67,7 @@ addstopAtWriteNowSignalToOpt addstopAtWriteNowSignalToOpt_
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Foam::Time const* runTimePtr_ = NULL;
|
static Foam::Time const* runTimePtr_ = nullptr;
|
||||||
|
|
||||||
|
|
||||||
struct sigaction Foam::sigStopAtWriteNow::oldAction_;
|
struct sigaction Foam::sigStopAtWriteNow::oldAction_;
|
||||||
@ -78,7 +78,7 @@ struct sigaction Foam::sigStopAtWriteNow::oldAction_;
|
|||||||
void Foam::sigStopAtWriteNow::sigHandler(int)
|
void Foam::sigStopAtWriteNow::sigHandler(int)
|
||||||
{
|
{
|
||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (sigaction(signal_, &oldAction_, NULL) < 0)
|
if (sigaction(signal_, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset " << signal_ << " trapping"
|
<< "Cannot reset " << signal_ << " trapping"
|
||||||
@ -123,7 +123,7 @@ Foam::sigStopAtWriteNow::~sigStopAtWriteNow()
|
|||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (signal_ > 0)
|
if (signal_ > 0)
|
||||||
{
|
{
|
||||||
if (sigaction(signal_, &oldAction_, NULL) < 0)
|
if (sigaction(signal_, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset " << signal_ << " trapping"
|
<< "Cannot reset " << signal_ << " trapping"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -65,7 +65,7 @@ addwriteNowSignalToOpt addwriteNowSignalToOpt_("writeNowSignal");
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Foam::Time* runTimePtr_ = NULL;
|
static Foam::Time* runTimePtr_ = nullptr;
|
||||||
|
|
||||||
|
|
||||||
struct sigaction Foam::sigWriteNow::oldAction_;
|
struct sigaction Foam::sigWriteNow::oldAction_;
|
||||||
@ -106,7 +106,7 @@ Foam::sigWriteNow::~sigWriteNow()
|
|||||||
// Reset old handling
|
// Reset old handling
|
||||||
if (signal_ > 0)
|
if (signal_ > 0)
|
||||||
{
|
{
|
||||||
if (sigaction(signal_, &oldAction_, NULL) < 0)
|
if (sigaction(signal_, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot reset " << signal_ << " trapping"
|
<< "Cannot reset " << signal_ << " trapping"
|
||||||
|
|||||||
@ -118,7 +118,7 @@ Foam::timer::~timer()
|
|||||||
oldTimeOut_ = 0;
|
oldTimeOut_ = 0;
|
||||||
|
|
||||||
// Restore signal handler
|
// Restore signal handler
|
||||||
if (sigaction(SIGALRM, &oldAction_, NULL) < 0)
|
if (sigaction(SIGALRM, &oldAction_, nullptr) < 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "sigaction(SIGALRM) error"
|
<< "sigaction(SIGALRM) error"
|
||||||
|
|||||||
@ -109,7 +109,7 @@ const T* Foam::DictionaryBase<IDLListType, T>::lookupPtr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ T* Foam::DictionaryBase<IDLListType, T>::lookupPtr(const word& keyword)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ T* Foam::DictionaryBase<IDLListType, T>::remove(const word& keyword)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,10 +113,10 @@ public:
|
|||||||
//- Search DictionaryBase for given keyword
|
//- Search DictionaryBase for given keyword
|
||||||
bool found(const word&) const;
|
bool found(const word&) const;
|
||||||
|
|
||||||
//- Find and return an entry if present, otherwise return NULL
|
//- Find and return an entry if present, otherwise return nullptr
|
||||||
const T* lookupPtr(const word&) const;
|
const T* lookupPtr(const word&) const;
|
||||||
|
|
||||||
//- Find and return an entry if present, otherwise return NULL
|
//- Find and return an entry if present, otherwise return nullptr
|
||||||
T* lookupPtr(const word&);
|
T* lookupPtr(const word&);
|
||||||
|
|
||||||
//- Find and return entry
|
//- Find and return entry
|
||||||
@ -141,7 +141,7 @@ public:
|
|||||||
void append(const word&, T*);
|
void append(const word&, T*);
|
||||||
|
|
||||||
//- Remove and return entry specified by keyword.
|
//- Remove and return entry specified by keyword.
|
||||||
// Return NULL if the keyword was not found.
|
// Return nullptr if the keyword was not found.
|
||||||
T* remove(const word&);
|
T* remove(const word&);
|
||||||
|
|
||||||
//- Clear the dictionary
|
//- Clear the dictionary
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(const label size)
|
|||||||
HashTableCore(),
|
HashTableCore(),
|
||||||
nElmts_(0),
|
nElmts_(0),
|
||||||
tableSize_(HashTableCore::canonicalSize(size)),
|
tableSize_(HashTableCore::canonicalSize(size)),
|
||||||
table_(NULL)
|
table_(nullptr)
|
||||||
{
|
{
|
||||||
if (tableSize_)
|
if (tableSize_)
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht)
|
|||||||
HashTableCore(),
|
HashTableCore(),
|
||||||
nElmts_(0),
|
nElmts_(0),
|
||||||
tableSize_(ht.tableSize_),
|
tableSize_(ht.tableSize_),
|
||||||
table_(NULL)
|
table_(nullptr)
|
||||||
{
|
{
|
||||||
if (tableSize_)
|
if (tableSize_)
|
||||||
{
|
{
|
||||||
@ -84,7 +84,7 @@ Foam::HashTable<T, Key, Hash>::HashTable
|
|||||||
HashTableCore(),
|
HashTableCore(),
|
||||||
nElmts_(0),
|
nElmts_(0),
|
||||||
tableSize_(0),
|
tableSize_(0),
|
||||||
table_(NULL)
|
table_(nullptr)
|
||||||
{
|
{
|
||||||
transfer(ht());
|
transfer(ht());
|
||||||
}
|
}
|
||||||
@ -304,7 +304,7 @@ bool Foam::HashTable<T, Key, Hash>::set
|
|||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
|
bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
|
||||||
{
|
{
|
||||||
// Note: entryPtr_ is NULL for end(), so this catches that too
|
// Note: entryPtr_ is nullptr for end(), so this catches that too
|
||||||
if (entryPtr_)
|
if (entryPtr_)
|
||||||
{
|
{
|
||||||
// Search element before entryPtr_
|
// Search element before entryPtr_
|
||||||
@ -337,7 +337,7 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
|
|||||||
hashTable_->table_[hashIndex_] = entryPtr_->next_;
|
hashTable_->table_[hashIndex_] = entryPtr_->next_;
|
||||||
delete entryPtr_;
|
delete entryPtr_;
|
||||||
|
|
||||||
// Assign any non-NULL pointer value so it doesn't look
|
// Assign any non-nullptr pointer value so it doesn't look
|
||||||
// like end()/cend()
|
// like end()/cend()
|
||||||
entryPtr_ = reinterpret_cast<hashedEntry*>(this);
|
entryPtr_ = reinterpret_cast<hashedEntry*>(this);
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ void Foam::HashTable<T, Key, Hash>::transfer(HashTable<T, Key, Hash>& ht)
|
|||||||
ht.tableSize_ = 0;
|
ht.tableSize_ = 0;
|
||||||
|
|
||||||
table_ = ht.table_;
|
table_ = ht.table_;
|
||||||
ht.table_ = NULL;
|
ht.table_ = nullptr;
|
||||||
|
|
||||||
nElmts_ = ht.nElmts_;
|
nElmts_ = ht.nElmts_;
|
||||||
ht.nElmts_ = 0;
|
ht.nElmts_ = 0;
|
||||||
|
|||||||
@ -181,7 +181,7 @@ inline Foam::HashTable<T, Key, Hash>::iteratorBase::iteratorBase
|
|||||||
{
|
{
|
||||||
if (hashTable_->nElmts_)
|
if (hashTable_->nElmts_)
|
||||||
{
|
{
|
||||||
// find first non-NULL table entry
|
// find first non-nullptr table entry
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
!(entryPtr_ = hashTable_->table_[hashIndex_])
|
!(entryPtr_ = hashTable_->table_[hashIndex_])
|
||||||
@ -235,7 +235,7 @@ Foam::HashTable<T, Key, Hash>::iteratorBase::increment()
|
|||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// // if we reach here (entryPtr_ is NULL) it is already at the end()
|
// // if we reach here (entryPtr_ is nullptr) it is already at the end()
|
||||||
// // we should probably stop
|
// // we should probably stop
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,7 +35,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(Istream& is, const label size)
|
|||||||
HashTableCore(),
|
HashTableCore(),
|
||||||
nElmts_(0),
|
nElmts_(0),
|
||||||
tableSize_(HashTableCore::canonicalSize(size)),
|
tableSize_(HashTableCore::canonicalSize(size)),
|
||||||
table_(NULL)
|
table_(nullptr)
|
||||||
{
|
{
|
||||||
if (tableSize_)
|
if (tableSize_)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -197,7 +197,7 @@ public:
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Construct for a given SLListBase with NULL element and link.
|
//- Construct for a given SLListBase with nullptr element and link.
|
||||||
// Only used to create endIter
|
// Only used to create endIter
|
||||||
inline iterator(DLListBase&);
|
inline iterator(DLListBase&);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -190,7 +190,7 @@ inline Foam::DLListBase::iterator::iterator(DLListBase& s, link* elmt)
|
|||||||
inline Foam::DLListBase::iterator::iterator(DLListBase& s)
|
inline Foam::DLListBase::iterator::iterator(DLListBase& s)
|
||||||
:
|
:
|
||||||
curList_(s),
|
curList_(s),
|
||||||
curElmt_(NULL),
|
curElmt_(nullptr),
|
||||||
curLink_()
|
curLink_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -179,7 +179,7 @@ public:
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Construct for a given SLListBase with NULL element and link.
|
//- Construct for a given SLListBase with nullptr element and link.
|
||||||
// Only used to create endIter
|
// Only used to create endIter
|
||||||
inline iterator(SLListBase&);
|
inline iterator(SLListBase&);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -166,7 +166,7 @@ inline Foam::SLListBase::iterator::iterator(SLListBase& s, link* elmt)
|
|||||||
inline Foam::SLListBase::iterator::iterator(SLListBase& s)
|
inline Foam::SLListBase::iterator::iterator(SLListBase& s)
|
||||||
:
|
:
|
||||||
curList_(s),
|
curList_(s),
|
||||||
curElmt_(NULL),
|
curElmt_(nullptr),
|
||||||
curLink_()
|
curLink_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ template<class T>
|
|||||||
template<class InputIterator>
|
template<class InputIterator>
|
||||||
Foam::List<T>::List(InputIterator first, InputIterator last, const label s)
|
Foam::List<T>::List(InputIterator first, InputIterator last, const label s)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, s)
|
UList<T>(nullptr, s)
|
||||||
{
|
{
|
||||||
if (this->size_)
|
if (this->size_)
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ Foam::List<T>::List(InputIterator first, InputIterator last, const label s)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const label s)
|
Foam::List<T>::List(const label s)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, s)
|
UList<T>(nullptr, s)
|
||||||
{
|
{
|
||||||
if (this->size_ < 0)
|
if (this->size_ < 0)
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@ Foam::List<T>::List(const label s)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const label s, const T& a)
|
Foam::List<T>::List(const label s, const T& a)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, s)
|
UList<T>(nullptr, s)
|
||||||
{
|
{
|
||||||
if (this->size_ < 0)
|
if (this->size_ < 0)
|
||||||
{
|
{
|
||||||
@ -118,7 +118,7 @@ Foam::List<T>::List(const label s, const T& a)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const label s, const zero)
|
Foam::List<T>::List(const label s, const zero)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, s)
|
UList<T>(nullptr, s)
|
||||||
{
|
{
|
||||||
if (this->size_ < 0)
|
if (this->size_ < 0)
|
||||||
{
|
{
|
||||||
@ -142,7 +142,7 @@ Foam::List<T>::List(const label s, const zero)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const List<T>& a)
|
Foam::List<T>::List(const List<T>& a)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, a.size_)
|
UList<T>(nullptr, a.size_)
|
||||||
{
|
{
|
||||||
if (this->size_)
|
if (this->size_)
|
||||||
{
|
{
|
||||||
@ -170,7 +170,7 @@ template<class T>
|
|||||||
template<class T2>
|
template<class T2>
|
||||||
Foam::List<T>::List(const List<T2>& a)
|
Foam::List<T>::List(const List<T2>& a)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, a.size())
|
UList<T>(nullptr, a.size())
|
||||||
{
|
{
|
||||||
if (this->size_)
|
if (this->size_)
|
||||||
{
|
{
|
||||||
@ -195,7 +195,7 @@ Foam::List<T>::List(const Xfer<List<T>>& lst)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(List<T>& a, bool reuse)
|
Foam::List<T>::List(List<T>& a, bool reuse)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, a.size_)
|
UList<T>(nullptr, a.size_)
|
||||||
{
|
{
|
||||||
if (reuse)
|
if (reuse)
|
||||||
{
|
{
|
||||||
@ -228,7 +228,7 @@ Foam::List<T>::List(List<T>& a, bool reuse)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const UList<T>& a, const labelUList& map)
|
Foam::List<T>::List(const UList<T>& a, const labelUList& map)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, map.size())
|
UList<T>(nullptr, map.size())
|
||||||
{
|
{
|
||||||
if (this->size_)
|
if (this->size_)
|
||||||
{
|
{
|
||||||
@ -256,7 +256,7 @@ template<class T>
|
|||||||
template<unsigned Size>
|
template<unsigned Size>
|
||||||
Foam::List<T>::List(const FixedList<T, Size>& lst)
|
Foam::List<T>::List(const FixedList<T, Size>& lst)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, Size)
|
UList<T>(nullptr, Size)
|
||||||
{
|
{
|
||||||
CopyList(lst);
|
CopyList(lst);
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ Foam::List<T>::List(const FixedList<T, Size>& lst)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const PtrList<T>& lst)
|
Foam::List<T>::List(const PtrList<T>& lst)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, lst.size())
|
UList<T>(nullptr, lst.size())
|
||||||
{
|
{
|
||||||
CopyList(lst);
|
CopyList(lst);
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ Foam::List<T>::List(const SLList<T>& lst)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const UIndirectList<T>& lst)
|
Foam::List<T>::List(const UIndirectList<T>& lst)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, lst.size())
|
UList<T>(nullptr, lst.size())
|
||||||
{
|
{
|
||||||
CopyList(lst);
|
CopyList(lst);
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ Foam::List<T>::List(const UIndirectList<T>& lst)
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const BiIndirectList<T>& lst)
|
Foam::List<T>::List(const BiIndirectList<T>& lst)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, lst.size())
|
UList<T>(nullptr, lst.size())
|
||||||
{
|
{
|
||||||
CopyList(lst);
|
CopyList(lst);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ License
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(Istream& is)
|
Foam::List<T>::List(Istream& is)
|
||||||
:
|
:
|
||||||
UList<T>(NULL, 0)
|
UList<T>(nullptr, 0)
|
||||||
{
|
{
|
||||||
operator>>(is, *this);
|
operator>>(is, *this);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,7 +164,7 @@ void Foam::PtrList<T>::setSize(const label newSize)
|
|||||||
label i;
|
label i;
|
||||||
for (i=oldSize; i<newSize; i++)
|
for (i=oldSize; i<newSize; i++)
|
||||||
{
|
{
|
||||||
this->ptrs_[i] = NULL;
|
this->ptrs_[i] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public:
|
|||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Reset size of PtrList. If extending the PtrList, new entries are
|
//- Reset size of PtrList. If extending the PtrList, new entries are
|
||||||
// set to NULL. If truncating the PtrList, removed entries are
|
// set to nullptr. If truncating the PtrList, removed entries are
|
||||||
// deleted
|
// deleted
|
||||||
void setSize(const label);
|
void setSize(const label);
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ public:
|
|||||||
//- Is element set
|
//- Is element set
|
||||||
inline bool set(const label) const;
|
inline bool set(const label) const;
|
||||||
|
|
||||||
//- Set element to given T* and return old element (can be NULL)
|
//- Set element to given T* and return old element (can be nullptr)
|
||||||
inline autoPtr<T> set(const label, T*);
|
inline autoPtr<T> set(const label, T*);
|
||||||
|
|
||||||
//- Set element to given autoPtr<T> and return old element
|
//- Set element to given autoPtr<T> and return old element
|
||||||
|
|||||||
@ -64,7 +64,7 @@ inline void Foam::PtrList<T>::append
|
|||||||
template<class T>
|
template<class T>
|
||||||
inline bool Foam::PtrList<T>::set(const label i) const
|
inline bool Foam::PtrList<T>::set(const label i) const
|
||||||
{
|
{
|
||||||
return this->ptrs_[i] != NULL;
|
return this->ptrs_[i] != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -74,10 +74,10 @@ void Foam::UPtrList<T>::setSize(const label newSize)
|
|||||||
{
|
{
|
||||||
ptrs_.setSize(newSize);
|
ptrs_.setSize(newSize);
|
||||||
|
|
||||||
// set new elements to NULL
|
// set new elements to nullptr
|
||||||
for (label i=oldSize; i<newSize; i++)
|
for (label i=oldSize; i<newSize; i++)
|
||||||
{
|
{
|
||||||
ptrs_[i] = NULL;
|
ptrs_[i] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -200,7 +200,7 @@ public:
|
|||||||
//- Is element set
|
//- Is element set
|
||||||
inline bool set(const label) const;
|
inline bool set(const label) const;
|
||||||
|
|
||||||
//- Set element. Return old element (can be NULL).
|
//- Set element. Return old element (can be nullptr).
|
||||||
// No checks on new element
|
// No checks on new element
|
||||||
inline T* set(const label, T*);
|
inline T* set(const label, T*);
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ inline void Foam::UPtrList<T>::resize(const label newSize)
|
|||||||
template<class T>
|
template<class T>
|
||||||
inline bool Foam::UPtrList<T>::set(const label i) const
|
inline bool Foam::UPtrList<T>::set(const label i) const
|
||||||
{
|
{
|
||||||
return ptrs_[i] != NULL;
|
return ptrs_[i] != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -387,12 +387,12 @@ Foam::Istream* Foam::IOobject::objectStream(const fileName& fName)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
delete isPtr;
|
delete isPtr;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -160,11 +160,11 @@ protected:
|
|||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Construct and return an IFstream for the object.
|
//- Construct and return an IFstream for the object.
|
||||||
// The results is NULL if the stream construction failed
|
// The results is nullptr if the stream construction failed
|
||||||
Istream* objectStream();
|
Istream* objectStream();
|
||||||
|
|
||||||
//- Construct and return an IFstream for the object given the
|
//- Construct and return an IFstream for the object given the
|
||||||
// exact file. The results is NULL if the stream construction failed
|
// exact file. The results is nullptr if the stream construction failed
|
||||||
Istream* objectStream(const fileName&);
|
Istream* objectStream(const fileName&);
|
||||||
|
|
||||||
//- Set the object state to bad
|
//- Set the object state to bad
|
||||||
|
|||||||
@ -145,7 +145,7 @@ Foam::IOobject* Foam::IOobjectList::lookup(const word& name) const
|
|||||||
InfoInFunction << "Could not find " << name << endl;
|
InfoInFunction << "Could not find " << name << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,7 +92,7 @@ public:
|
|||||||
//- Remove an IOobject from the list
|
//- Remove an IOobject from the list
|
||||||
bool remove(IOobject&);
|
bool remove(IOobject&);
|
||||||
|
|
||||||
//- Lookup a given name and return IOobject ptr if found else NULL
|
//- Lookup a given name and return IOobject ptr if found else nullptr
|
||||||
IOobject* lookup(const word& name) const;
|
IOobject* lookup(const word& name) const;
|
||||||
|
|
||||||
//- Return the list for all IOobects whose name matches name
|
//- Return the list for all IOobects whose name matches name
|
||||||
|
|||||||
@ -39,7 +39,7 @@ namespace Foam
|
|||||||
|
|
||||||
Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
|
Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
|
||||||
:
|
:
|
||||||
ifPtr_(NULL),
|
ifPtr_(nullptr),
|
||||||
compression_(IOstream::UNCOMPRESSED)
|
compression_(IOstream::UNCOMPRESSED)
|
||||||
{
|
{
|
||||||
if (pathname.empty())
|
if (pathname.empty())
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::OFstreamAllocator::OFstreamAllocator
|
|||||||
IOstream::compressionType compression
|
IOstream::compressionType compression
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ofPtr_(NULL)
|
ofPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (pathname.empty())
|
if (pathname.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -94,7 +94,7 @@ public:
|
|||||||
//- Standard punctuation tokens
|
//- Standard punctuation tokens
|
||||||
enum punctuationToken
|
enum punctuationToken
|
||||||
{
|
{
|
||||||
NULL_TOKEN = '\0',
|
nullptr_TOKEN = '\0',
|
||||||
SPACE = ' ',
|
SPACE = ' ',
|
||||||
TAB = '\t',
|
TAB = '\t',
|
||||||
NL = '\n',
|
NL = '\n',
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user