Update to c++-11 standard: nullptr and compilation flags
This commit is contained in:
parent
0da8433b5d
commit
c6babd359a
677 changed files with 2344 additions and 3647 deletions
|
@ -1,11 +1,11 @@
|
||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
volScalarField* pPtr = NULL;
|
volScalarField* pPtr = nullptr;
|
||||||
volScalarField* hPtr = NULL;
|
volScalarField* hPtr = nullptr;
|
||||||
const volScalarField* TPtr = NULL;
|
const volScalarField* TPtr = nullptr;
|
||||||
|
|
||||||
volScalarField* psisPtr = NULL;
|
volScalarField* psisPtr = nullptr;
|
||||||
basicThermo* thermoPtr = NULL;
|
basicThermo* thermoPtr = nullptr;
|
||||||
|
|
||||||
Switch compressible;
|
Switch compressible;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
volScalarField* pPtr = NULL;
|
volScalarField* pPtr = nullptr;
|
||||||
volScalarField* hPtr = NULL;
|
volScalarField* hPtr = nullptr;
|
||||||
const volScalarField* TPtr = NULL;
|
const volScalarField* TPtr = nullptr;
|
||||||
|
|
||||||
volScalarField* psisPtr = NULL;
|
volScalarField* psisPtr = nullptr;
|
||||||
basicThermo* thermoPtr = NULL;
|
basicThermo* thermoPtr = nullptr;
|
||||||
|
|
||||||
Switch compressible;
|
Switch compressible;
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ Foam::phase::phase
|
||||||
Foam::autoPtr<Foam::phase> Foam::phase::clone() const
|
Foam::autoPtr<Foam::phase> Foam::phase::clone() const
|
||||||
{
|
{
|
||||||
notImplemented("phase::clone() const");
|
notImplemented("phase::clone() const");
|
||||||
return autoPtr<phase>(NULL);
|
return autoPtr<phase>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("NULL", dimless, 1.0),
|
dimensionedScalar("nullptr", dimless, 1.0),
|
||||||
"zeroGradient"
|
"zeroGradient"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("NULL", dimless, 1.0),
|
dimensionedScalar("nullptr", dimless, 1.0),
|
||||||
"zeroGradient"
|
"zeroGradient"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ cohesiveLawFvPatchVectorField::cohesiveLawFvPatchVectorField
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedGradientFvPatchVectorField(p, iF),
|
fixedGradientFvPatchVectorField(p, iF),
|
||||||
cohesiveLawPtr_(NULL),
|
cohesiveLawPtr_(nullptr),
|
||||||
relaxationFactor_(1.0),
|
relaxationFactor_(1.0),
|
||||||
traction_(p.size(), vector::zero)
|
traction_(p.size(), vector::zero)
|
||||||
{}
|
{}
|
||||||
|
@ -131,10 +131,10 @@ void cohesiveLawFvPatchVectorField::autoMap
|
||||||
const fvPatchFieldMapper& m
|
const fvPatchFieldMapper& m
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (cohesiveLawPtr_ == NULL)
|
if (cohesiveLawPtr_ == nullptr)
|
||||||
{
|
{
|
||||||
FatalErrorIn("cohesiveFvPatchVectorField::autoMap")
|
FatalErrorIn("cohesiveFvPatchVectorField::autoMap")
|
||||||
<< "NULL cohesive law"
|
<< "nullptr cohesive law"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ cohesiveZoneFvPatchVectorField::cohesiveZoneFvPatchVectorField
|
||||||
directionMixedFvPatchVectorField(p, iF),
|
directionMixedFvPatchVectorField(p, iF),
|
||||||
UName_("undefined"),
|
UName_("undefined"),
|
||||||
rheologyName_("undefined"),
|
rheologyName_("undefined"),
|
||||||
cohesiveLawPtr_(NULL),
|
cohesiveLawPtr_(nullptr),
|
||||||
relaxationFactor_(1.0)
|
relaxationFactor_(1.0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -161,10 +161,10 @@ void cohesiveZoneFvPatchVectorField::autoMap
|
||||||
const fvPatchFieldMapper& m
|
const fvPatchFieldMapper& m
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (cohesiveLawPtr_ == NULL)
|
if (cohesiveLawPtr_ == nullptr)
|
||||||
{
|
{
|
||||||
FatalErrorIn("cohesiveZoneFvPatchVectorField::autoMap")
|
FatalErrorIn("cohesiveZoneFvPatchVectorField::autoMap")
|
||||||
<< "NULL cohesive law"
|
<< "nullptr cohesive law"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ volVectorField D
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
autoPtr<volScalarField> Tptr(NULL);
|
autoPtr<volScalarField> Tptr(nullptr);
|
||||||
|
|
||||||
if (thermalStress)
|
if (thermalStress)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
volScalarField* Tptr = NULL;
|
volScalarField* Tptr = nullptr;
|
||||||
|
|
||||||
if (thermalStress)
|
if (thermalStress)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
label cohesivePatchID = -1;
|
label cohesivePatchID = -1;
|
||||||
|
|
||||||
solidCohesiveFvPatchVectorField* cohesivePatchUPtr = NULL;
|
solidCohesiveFvPatchVectorField* cohesivePatchUPtr = nullptr;
|
||||||
solidCohesiveFixedModeMixFvPatchVectorField* cohesivePatchUFixedModePtr = NULL;
|
solidCohesiveFixedModeMixFvPatchVectorField* cohesivePatchUFixedModePtr = nullptr;
|
||||||
|
|
||||||
forAll (U.boundaryField(), patchI)
|
forAll (U.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream* filePtr(NULL);
|
OFstream* filePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
label cohesivePatchID = -1;
|
label cohesivePatchID = -1;
|
||||||
|
|
||||||
solidCohesiveFvPatchVectorField* cohesivePatchDUPtr = NULL;
|
solidCohesiveFvPatchVectorField* cohesivePatchDUPtr = nullptr;
|
||||||
solidCohesiveFixedModeMixFvPatchVectorField* cohesivePatchDUFixedModePtr = NULL;
|
solidCohesiveFixedModeMixFvPatchVectorField* cohesivePatchDUFixedModePtr = nullptr;
|
||||||
|
|
||||||
forAll (DU.boundaryField(), patchI)
|
forAll (DU.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream * filePtr(NULL);
|
OFstream * filePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Switch solidInterfaceCorr(false);
|
Switch solidInterfaceCorr(false);
|
||||||
|
|
||||||
solidInterface* solidInterfacePtr(NULL);
|
solidInterface* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
{
|
{
|
||||||
const dictionary& stressControl =
|
const dictionary& stressControl =
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream * filePtr(NULL);
|
OFstream * filePtr(nullptr);
|
||||||
|
|
||||||
if(Pstream::master())
|
if(Pstream::master())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
bool solidInterfaceCorr = rheology.solidInterfaceActive();
|
bool solidInterfaceCorr = rheology.solidInterfaceActive();
|
||||||
|
|
||||||
solidInterface* solidInterfacePtr(NULL);
|
solidInterface* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
if(solidInterfaceCorr)
|
if(solidInterfaceCorr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream * filePtr(NULL);
|
OFstream * filePtr(nullptr);
|
||||||
|
|
||||||
if(Pstream::master())
|
if(Pstream::master())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Switch solidInterfaceCorr(false);
|
Switch solidInterfaceCorr(false);
|
||||||
|
|
||||||
solidInterface* solidInterfacePtr(NULL);
|
solidInterface* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
{
|
{
|
||||||
const dictionary& stressControl =
|
const dictionary& stressControl =
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
bool solidInterfaceCorr = rheology.solidInterfaceActive();
|
bool solidInterfaceCorr = rheology.solidInterfaceActive();
|
||||||
|
|
||||||
solidInterface* solidInterfacePtr(NULL);
|
solidInterface* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
if(solidInterfaceCorr)
|
if(solidInterfaceCorr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
label cohesivePatchID = -1;
|
label cohesivePatchID = -1;
|
||||||
|
|
||||||
solidCohesiveFvPatchVectorField* cohesivePatchUPtr = NULL;
|
solidCohesiveFvPatchVectorField* cohesivePatchUPtr = nullptr;
|
||||||
solidCohesiveFixedModeMixFvPatchVectorField* cohesivePatchUFixedModePtr = NULL;
|
solidCohesiveFixedModeMixFvPatchVectorField* cohesivePatchUFixedModePtr = nullptr;
|
||||||
|
|
||||||
forAll (U.boundaryField(), patchI)
|
forAll (U.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream* filePtr(NULL);
|
OFstream* filePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream * filePtr(NULL);
|
OFstream * filePtr(nullptr);
|
||||||
|
|
||||||
if(Pstream::master())
|
if(Pstream::master())
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,7 +84,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
//- div(sigmaOld) should be zero but I will include
|
//- div(sigmaOld) should be zero but I will include
|
||||||
//- it to make sure errors don't accumulate
|
//- it to make sure errors don't accumulate
|
||||||
volVectorField* oldErrorPtr = NULL;
|
volVectorField* oldErrorPtr = nullptr;
|
||||||
if (ensureTotalEquilibrium)
|
if (ensureTotalEquilibrium)
|
||||||
{
|
{
|
||||||
oldErrorPtr = new volVectorField
|
oldErrorPtr = new volVectorField
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream* filePtr(NULL);
|
OFstream* filePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
OFstream* forceFilePtr(NULL);
|
OFstream* forceFilePtr(nullptr);
|
||||||
OFstream* stressFilePtr(NULL);
|
OFstream* stressFilePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream * filePtr(NULL);
|
OFstream * filePtr(nullptr);
|
||||||
|
|
||||||
if(Pstream::master())
|
if(Pstream::master())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
OFstream* forceFilePtr(NULL);
|
OFstream* forceFilePtr(nullptr);
|
||||||
OFstream* stressFilePtr(NULL);
|
OFstream* stressFilePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Switch solidInterfaceCorr(false);
|
Switch solidInterfaceCorr(false);
|
||||||
|
|
||||||
solidInterface* solidInterfacePtr(NULL);
|
solidInterface* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
{
|
{
|
||||||
const dictionary& stressControl =
|
const dictionary& stressControl =
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Switch solidInterfaceCorr(false);
|
Switch solidInterfaceCorr(false);
|
||||||
|
|
||||||
solidInterfaceNonLin* solidInterfacePtr(NULL);
|
solidInterfaceNonLin* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
{
|
{
|
||||||
const dictionary& stressControl =
|
const dictionary& stressControl =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
OFstream* forceFilePtr(NULL);
|
OFstream* forceFilePtr(nullptr);
|
||||||
OFstream* stressFilePtr(NULL);
|
OFstream* stressFilePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Switch solidInterfaceCorr(false);
|
Switch solidInterfaceCorr(false);
|
||||||
|
|
||||||
solidInterface* solidInterfacePtr(NULL);
|
solidInterface* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
{
|
{
|
||||||
const dictionary& stressControl =
|
const dictionary& stressControl =
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
OFstream* filePtr(NULL);
|
OFstream* filePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Switch solidInterfaceCorr(false);
|
Switch solidInterfaceCorr(false);
|
||||||
|
|
||||||
solidInterface* solidInterfacePtr(NULL);
|
solidInterface* solidInterfacePtr(nullptr);
|
||||||
|
|
||||||
{
|
{
|
||||||
const dictionary& stressControl =
|
const dictionary& stressControl =
|
||||||
|
|
|
@ -62,7 +62,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while(runTime.loop())
|
while (runTime.loop())
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
@ -147,7 +147,6 @@ int main(int argc, char *argv[])
|
||||||
||
|
||
|
||||||
(
|
(
|
||||||
solverPerf.initialResidual() > convergenceTolerance
|
solverPerf.initialResidual() > convergenceTolerance
|
||||||
//relativeResidual > convergenceTolerance
|
|
||||||
&& iCorr < nCorr
|
&& iCorr < nCorr
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
zoneToZoneInterpolation* interpolatorFluidSolidPtr = NULL;
|
zoneToZoneInterpolation* interpolatorFluidSolidPtr = nullptr;
|
||||||
zoneToZoneInterpolation* interpolatorSolidFluidPtr = NULL;
|
zoneToZoneInterpolation* interpolatorSolidFluidPtr = nullptr;
|
||||||
|
|
||||||
|
|
||||||
if(!interpolatorFluidSolidPtr || !interpolatorSolidFluidPtr)
|
if(!interpolatorFluidSolidPtr || !interpolatorSolidFluidPtr)
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
);
|
);
|
||||||
|
|
||||||
vectorField* accumulatedFluidInterfaceDisplacementPtr = NULL;
|
vectorField* accumulatedFluidInterfaceDisplacementPtr = nullptr;
|
||||||
|
|
||||||
if(accumulatedFluidInterfaceDisplacementHeader.headerOk())
|
if(accumulatedFluidInterfaceDisplacementHeader.headerOk())
|
||||||
{
|
{
|
||||||
|
|
|
@ -95,8 +95,8 @@ int main(int argc, char *argv[])
|
||||||
Info<< nl;
|
Info<< nl;
|
||||||
|
|
||||||
// gradU needed for nonLinear
|
// gradU needed for nonLinear
|
||||||
volTensorField* gradUPtr = NULL;
|
volTensorField* gradUPtr = nullptr;
|
||||||
volSymmTensorField* sigmaCauchyPtr = NULL;
|
volSymmTensorField* sigmaCauchyPtr = nullptr;
|
||||||
if (nonLinear)
|
if (nonLinear)
|
||||||
{
|
{
|
||||||
gradUPtr = new volTensorField
|
gradUPtr = new volTensorField
|
||||||
|
|
|
@ -123,7 +123,7 @@ int main(int argc, char *argv[])
|
||||||
dimensionedVector("zero", dimForce/dimArea, vector::zero)
|
dimensionedVector("zero", dimForce/dimArea, vector::zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
volTensorField* gradUPtr = NULL;
|
volTensorField* gradUPtr = nullptr;
|
||||||
if (nonLinear)
|
if (nonLinear)
|
||||||
{
|
{
|
||||||
gradUPtr = new volTensorField
|
gradUPtr = new volTensorField
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
OFstream* forceFilePtr(NULL);
|
OFstream* forceFilePtr(nullptr);
|
||||||
// OFstream* stressFilePtr(NULL);
|
// OFstream* stressFilePtr(nullptr);
|
||||||
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
|
||||||
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
|
||||||
if(historyPatchID == -1)
|
if(historyPatchID == -1)
|
||||||
|
|
|
@ -50,7 +50,7 @@ volScalarField rho
|
||||||
freeSurface interface(mesh, rho, U, p, phi);
|
freeSurface interface(mesh, rho, U, p, phi);
|
||||||
|
|
||||||
|
|
||||||
volScalarField* fluidIndicatorPtr = NULL;
|
volScalarField* fluidIndicatorPtr = nullptr;
|
||||||
|
|
||||||
if(Pstream::parRun())
|
if(Pstream::parRun())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// Volume surfactant concentration
|
// Volume surfactant concentration
|
||||||
|
|
||||||
volScalarField* CPtr = NULL;
|
volScalarField* CPtr = nullptr;
|
||||||
|
|
||||||
if(!interface.cleanInterface() && interface.surfactant().soluble())
|
if(!interface.cleanInterface() && interface.surfactant().soluble())
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,7 @@ correctedFvPatchField<Type>::correctedFvPatchField
|
||||||
correctionVectors_(p.size(), vector::zero),
|
correctionVectors_(p.size(), vector::zero),
|
||||||
corrVecGrad_(p.size(), pTraits<Type>::zero),
|
corrVecGrad_(p.size(), pTraits<Type>::zero),
|
||||||
nGradInternal_(p.size(), pTraits<Type>::zero),
|
nGradInternal_(p.size(), pTraits<Type>::zero),
|
||||||
patchSubMeshPtr_(NULL),
|
patchSubMeshPtr_(nullptr),
|
||||||
subMeshPatchID_(-1)
|
subMeshPatchID_(-1)
|
||||||
{
|
{
|
||||||
updateCorrectionVectors();
|
updateCorrectionVectors();
|
||||||
|
@ -75,7 +75,7 @@ correctedFvPatchField<Type>::correctedFvPatchField
|
||||||
correctionVectors_(p.size(), vector::zero),
|
correctionVectors_(p.size(), vector::zero),
|
||||||
corrVecGrad_(p.size(), pTraits<Type>::zero),
|
corrVecGrad_(p.size(), pTraits<Type>::zero),
|
||||||
nGradInternal_(p.size(), pTraits<Type>::zero),
|
nGradInternal_(p.size(), pTraits<Type>::zero),
|
||||||
patchSubMeshPtr_(NULL),
|
patchSubMeshPtr_(nullptr),
|
||||||
subMeshPatchID_(-1)
|
subMeshPatchID_(-1)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -95,7 +95,7 @@ correctedFvPatchField<Type>::correctedFvPatchField
|
||||||
correctionVectors_(p.size(), vector::zero),
|
correctionVectors_(p.size(), vector::zero),
|
||||||
corrVecGrad_(p.size(), pTraits<Type>::zero),
|
corrVecGrad_(p.size(), pTraits<Type>::zero),
|
||||||
nGradInternal_(p.size(), pTraits<Type>::zero),
|
nGradInternal_(p.size(), pTraits<Type>::zero),
|
||||||
patchSubMeshPtr_(NULL),
|
patchSubMeshPtr_(nullptr),
|
||||||
subMeshPatchID_(-1)
|
subMeshPatchID_(-1)
|
||||||
{
|
{
|
||||||
updateCorrectionVectors();
|
updateCorrectionVectors();
|
||||||
|
@ -121,7 +121,7 @@ correctedFvPatchField<Type>::correctedFvPatchField
|
||||||
correctionVectors_(ptf.correctionVectors_, mapper),
|
correctionVectors_(ptf.correctionVectors_, mapper),
|
||||||
corrVecGrad_(ptf.corrVecGrad_, mapper),
|
corrVecGrad_(ptf.corrVecGrad_, mapper),
|
||||||
nGradInternal_(ptf.nGradInternal_, mapper),
|
nGradInternal_(ptf.nGradInternal_, mapper),
|
||||||
patchSubMeshPtr_(NULL),
|
patchSubMeshPtr_(nullptr),
|
||||||
subMeshPatchID_(-1)
|
subMeshPatchID_(-1)
|
||||||
{
|
{
|
||||||
updateCorrectionVectors();
|
updateCorrectionVectors();
|
||||||
|
@ -139,7 +139,7 @@ correctedFvPatchField<Type>::correctedFvPatchField
|
||||||
correctionVectors_(ptf.correctionVectors_),
|
correctionVectors_(ptf.correctionVectors_),
|
||||||
corrVecGrad_(ptf.corrVecGrad_),
|
corrVecGrad_(ptf.corrVecGrad_),
|
||||||
nGradInternal_(ptf.nGradInternal_),
|
nGradInternal_(ptf.nGradInternal_),
|
||||||
patchSubMeshPtr_(NULL),
|
patchSubMeshPtr_(nullptr),
|
||||||
subMeshPatchID_(-1)
|
subMeshPatchID_(-1)
|
||||||
{
|
{
|
||||||
updateCorrectionVectors();
|
updateCorrectionVectors();
|
||||||
|
|
|
@ -162,20 +162,20 @@ freeSurface::freeSurface
|
||||||
readInt(this->lookup("nFreeSurfaceCorrectors"))
|
readInt(this->lookup("nFreeSurfaceCorrectors"))
|
||||||
),
|
),
|
||||||
smoothing_(false),
|
smoothing_(false),
|
||||||
interpolatorABPtr_(NULL),
|
interpolatorABPtr_(nullptr),
|
||||||
interpolatorBAPtr_(NULL),
|
interpolatorBAPtr_(nullptr),
|
||||||
controlPointsPtr_(NULL),
|
controlPointsPtr_(nullptr),
|
||||||
motionPointsMaskPtr_(NULL),
|
motionPointsMaskPtr_(nullptr),
|
||||||
pointsDisplacementDirPtr_(NULL),
|
pointsDisplacementDirPtr_(nullptr),
|
||||||
facesDisplacementDirPtr_(NULL),
|
facesDisplacementDirPtr_(nullptr),
|
||||||
totalDisplacementPtr_(NULL),
|
totalDisplacementPtr_(nullptr),
|
||||||
aMeshPtr_(NULL),
|
aMeshPtr_(nullptr),
|
||||||
UsPtr_(NULL),
|
UsPtr_(nullptr),
|
||||||
phisPtr_(NULL),
|
phisPtr_(nullptr),
|
||||||
surfactConcPtr_(NULL),
|
surfactConcPtr_(nullptr),
|
||||||
surfaceTensionPtr_(NULL),
|
surfaceTensionPtr_(nullptr),
|
||||||
surfactantPtr_(NULL),
|
surfactantPtr_(nullptr),
|
||||||
fluidIndicatorPtr_(NULL)
|
fluidIndicatorPtr_(nullptr)
|
||||||
{
|
{
|
||||||
//Read motion direction
|
//Read motion direction
|
||||||
if (!normalMotionDir_)
|
if (!normalMotionDir_)
|
||||||
|
|
|
@ -64,7 +64,7 @@ Foam::bubbleHistory::bubbleHistory
|
||||||
time_(t),
|
time_(t),
|
||||||
regionName_(polyMesh::defaultRegion),
|
regionName_(polyMesh::defaultRegion),
|
||||||
V0_(SMALL),
|
V0_(SMALL),
|
||||||
historyFilePtr_(NULL)
|
historyFilePtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (dict.found("region"))
|
if (dict.found("region"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@ Foam::sloshingHistory::sloshingHistory
|
||||||
name_(name),
|
name_(name),
|
||||||
time_(t),
|
time_(t),
|
||||||
regionName_(polyMesh::defaultRegion),
|
regionName_(polyMesh::defaultRegion),
|
||||||
historyFilePtr_(NULL),
|
historyFilePtr_(nullptr),
|
||||||
freeSurfacePatchID_(-1),
|
freeSurfacePatchID_(-1),
|
||||||
leftPointID_(-1),
|
leftPointID_(-1),
|
||||||
rightPointID_(-1)
|
rightPointID_(-1)
|
||||||
|
|
|
@ -50,7 +50,7 @@ volScalarField rho
|
||||||
freeSurface interface(mesh, rho, U, p, phi);
|
freeSurface interface(mesh, rho, U, p, phi);
|
||||||
|
|
||||||
|
|
||||||
volScalarField* fluidIndicatorPtr = NULL;
|
volScalarField* fluidIndicatorPtr = nullptr;
|
||||||
|
|
||||||
if(Pstream::parRun())
|
if(Pstream::parRun())
|
||||||
{
|
{
|
||||||
|
|
|
@ -665,7 +665,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())
|
||||||
{
|
{
|
||||||
|
|
|
@ -411,9 +411,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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,7 +185,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);
|
||||||
|
@ -201,9 +201,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;
|
||||||
|
|
||||||
|
@ -239,7 +239,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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -251,10 +251,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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -277,7 +277,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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -289,7 +289,7 @@ void ReadProblem
|
||||||
int prostarI = -1;
|
int prostarI = -1;
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOpti(NULL, boundary, "ProstarRegionNumber", &prostarI)
|
CCMIOReadOpti(nullptr, boundary, "ProstarRegionNumber", &prostarI)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -315,12 +315,12 @@ void ReadProblem
|
||||||
int size;
|
int size;
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, NULL)
|
CCMIOReadOptstr(nullptr, boundary, "BoundaryType", &size, nullptr)
|
||||||
== kCCMIONoErr
|
== 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;
|
||||||
|
@ -337,12 +337,12 @@ void ReadProblem
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, NULL)
|
CCMIOReadOptstr(nullptr, boundary, "BoundaryName", &size, nullptr)
|
||||||
== kCCMIONoErr
|
== 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));
|
||||||
|
@ -351,12 +351,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));
|
||||||
|
@ -405,7 +405,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);
|
||||||
|
@ -429,7 +429,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
|
||||||
|
@ -437,12 +437,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;
|
||||||
|
@ -461,10 +461,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],
|
||||||
|
@ -501,19 +501,19 @@ 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(&err, id, kCCMIOBoundaryFaces, &mapID, nullptr, &faces[0],
|
||||||
kCCMIOStart, kCCMIOEnd);
|
kCCMIOStart, kCCMIOEnd);
|
||||||
CCMIOReadFaceCells(&err, id, kCCMIOBoundaryFaces, &faceCells[0],
|
CCMIOReadFaceCells(&err, id, kCCMIOBoundaryFaces, &faceCells[0],
|
||||||
kCCMIOStart, kCCMIOEnd);
|
kCCMIOStart, kCCMIOEnd);
|
||||||
|
@ -524,7 +524,7 @@ void ReadCells
|
||||||
int prostarI;
|
int prostarI;
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
CCMIOReadOpti(NULL, id, "ProstarRegionNumber", &prostarI)
|
CCMIOReadOpti(nullptr, id, "ProstarRegionNumber", &prostarI)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -634,11 +634,11 @@ 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 return
|
||||||
// value to 'err'.).
|
// value to 'err'.).
|
||||||
CCMIOID root;
|
CCMIOID root;
|
||||||
CCMIOError err =
|
CCMIOError err =
|
||||||
CCMIOOpenFile(NULL, ccmFile.c_str(), kCCMIORead, &root);
|
CCMIOOpenFile(nullptr, ccmFile.c_str(), kCCMIORead, &root);
|
||||||
|
|
||||||
// We are going to assume that we have a state with a known name.
|
// We are going to assume that we have a state with a known name.
|
||||||
// We could instead use CCMIONextEntity() to walk through all the
|
// We could instead use CCMIONextEntity() to walk through all the
|
||||||
|
@ -649,9 +649,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;
|
||||||
|
@ -668,7 +668,7 @@ int main(int argc, char *argv[])
|
||||||
processor,
|
processor,
|
||||||
&vertices,
|
&vertices,
|
||||||
&topology,
|
&topology,
|
||||||
NULL,
|
nullptr,
|
||||||
&solution
|
&solution
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -682,8 +682,8 @@ int main(int argc, char *argv[])
|
||||||
processor,
|
processor,
|
||||||
&vertices,
|
&vertices,
|
||||||
&topology,
|
&topology,
|
||||||
NULL,
|
nullptr,
|
||||||
NULL
|
nullptr
|
||||||
);
|
);
|
||||||
if (err != kCCMIONoErr)
|
if (err != kCCMIONoErr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
autoPtr<block> clone() const
|
autoPtr<block> clone() const
|
||||||
{
|
{
|
||||||
notImplemented("block::clone()");
|
notImplemented("block::clone()");
|
||||||
return autoPtr<block>(NULL);
|
return autoPtr<block>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -47,7 +47,7 @@ cellShape extrudedQuadCellShape
|
||||||
faceList& frontAndBackFaces
|
faceList& frontAndBackFaces
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const static cellModel* hexModelPtr_ = NULL;
|
const static cellModel* hexModelPtr_ = nullptr;
|
||||||
|
|
||||||
if (!hexModelPtr_)
|
if (!hexModelPtr_)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ cellShape extrudedTriangleCellShape
|
||||||
faceList& frontAndBackFaces
|
faceList& frontAndBackFaces
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const static cellModel* prismModelPtr_ = NULL;
|
const static cellModel* prismModelPtr_ = nullptr;
|
||||||
|
|
||||||
if (!prismModelPtr_)
|
if (!prismModelPtr_)
|
||||||
{
|
{
|
||||||
|
|
|
@ -172,7 +172,7 @@ 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
|
||||||
|
|
|
@ -161,7 +161,7 @@ meshReader::meshReader
|
||||||
cellFaces_(0),
|
cellFaces_(0),
|
||||||
baffleFaces_(0),
|
baffleFaces_(0),
|
||||||
cellTableId_(0),
|
cellTableId_(0),
|
||||||
pointCellsPtr_(NULL)
|
pointCellsPtr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -399,7 +399,7 @@ void starMeshReader::readCells
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine the foam cell shape
|
// determine the foam cell shape
|
||||||
const cellModel* curModelPtr = NULL;
|
const cellModel* curModelPtr = nullptr;
|
||||||
|
|
||||||
// fluid/solid cells
|
// fluid/solid cells
|
||||||
switch (shapeId)
|
switch (shapeId)
|
||||||
|
|
|
@ -249,7 +249,7 @@ 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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@ int main(int argc, char *argv[])
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTimeExtruded.H"
|
# include "createTimeExtruded.H"
|
||||||
|
|
||||||
autoPtr<extrudedMesh> meshPtr(NULL);
|
autoPtr<extrudedMesh> meshPtr(nullptr);
|
||||||
|
|
||||||
IOdictionary dict
|
IOdictionary dict
|
||||||
(
|
(
|
||||||
|
|
|
@ -107,7 +107,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
|
||||||
// Load set to work
|
// Load set to work
|
||||||
autoPtr<topoSet> currentSetPtr(NULL);
|
autoPtr<topoSet> currentSetPtr(nullptr);
|
||||||
IOobject::readOption r;
|
IOobject::readOption r;
|
||||||
|
|
||||||
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
||||||
|
|
|
@ -107,7 +107,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
|
||||||
// Load set to work
|
// Load set to work
|
||||||
autoPtr<topoSet> currentSetPtr(NULL);
|
autoPtr<topoSet> currentSetPtr(nullptr);
|
||||||
IOobject::readOption r;
|
IOobject::readOption r;
|
||||||
|
|
||||||
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
||||||
|
|
|
@ -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_);
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
|
||||||
// Load set to work
|
// Load set to work
|
||||||
autoPtr<topoSet> currentSetPtr(NULL);
|
autoPtr<topoSet> currentSetPtr(nullptr);
|
||||||
IOobject::readOption r;
|
IOobject::readOption r;
|
||||||
|
|
||||||
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
||||||
|
|
|
@ -768,7 +768,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::ifstream* fileStreamPtr(NULL);
|
std::ifstream* fileStreamPtr(nullptr);
|
||||||
|
|
||||||
if (args.optionFound("batch"))
|
if (args.optionFound("batch"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -384,7 +384,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
// Construct the tetPoint fields
|
// Construct the tetPoint fields
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
tetPolyMesh* tetMeshPtr = NULL;
|
tetPolyMesh* tetMeshPtr = nullptr;
|
||||||
|
|
||||||
PtrList<tetPointScalarField> tetPointScalarFields;
|
PtrList<tetPointScalarField> tetPointScalarFields;
|
||||||
PtrList<tetPointVectorField> tetPointVectorFields;
|
PtrList<tetPointVectorField> tetPointVectorFields;
|
||||||
|
@ -491,7 +491,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)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -895,7 +895,7 @@ int main(int argc, char *argv[])
|
||||||
if (tetMeshPtr)
|
if (tetMeshPtr)
|
||||||
{
|
{
|
||||||
delete tetMeshPtr;
|
delete tetMeshPtr;
|
||||||
tetMeshPtr = NULL;
|
tetMeshPtr = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -430,7 +430,7 @@ void writePatchField
|
||||||
|
|
||||||
word timeFile = prepend + itoa(timeIndex);
|
word timeFile = prepend + itoa(timeIndex);
|
||||||
|
|
||||||
OFstream *ensightFilePtr = NULL;
|
OFstream *ensightFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (timeIndex == 0)
|
if (timeIndex == 0)
|
||||||
|
@ -533,7 +533,7 @@ void ensightFieldAscii
|
||||||
const labelList& hexes = meshCellSets.hexes;
|
const labelList& hexes = meshCellSets.hexes;
|
||||||
const labelList& polys = meshCellSets.polys;
|
const labelList& polys = meshCellSets.polys;
|
||||||
|
|
||||||
OFstream *ensightFilePtr = NULL;
|
OFstream *ensightFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
|
@ -708,7 +708,7 @@ void ensightFieldBinary
|
||||||
const labelList& hexes = meshCellSets.hexes;
|
const labelList& hexes = meshCellSets.hexes;
|
||||||
const labelList& polys = meshCellSets.polys;
|
const labelList& polys = meshCellSets.polys;
|
||||||
|
|
||||||
std::ofstream *ensightFilePtr = NULL;
|
std::ofstream *ensightFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
|
|
|
@ -966,7 +966,7 @@ void Foam::ensightMesh::writeAllFacePrims
|
||||||
{
|
{
|
||||||
ensightGeometryFile << key << nl << setw(10) << nPrims << nl;
|
ensightGeometryFile << key << nl << setw(10) << nPrims << nl;
|
||||||
|
|
||||||
if (&prims != NULL)
|
if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
writeFacePrims
|
writeFacePrims
|
||||||
(
|
(
|
||||||
|
@ -993,7 +993,7 @@ void Foam::ensightMesh::writeAllFacePrims
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (&prims != NULL)
|
else if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
toMaster<< ensMap(patchFaces, prims);
|
toMaster<< ensMap(patchFaces, prims);
|
||||||
|
@ -1053,7 +1053,7 @@ void Foam::ensightMesh::writeAllNSided
|
||||||
// Number of points for each face
|
// Number of points for each face
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (&prims != NULL)
|
if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
writeNSidedNPointsPerFace
|
writeNSidedNPointsPerFace
|
||||||
(
|
(
|
||||||
|
@ -1078,7 +1078,7 @@ void Foam::ensightMesh::writeAllNSided
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (&prims != NULL)
|
else if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
toMaster<< ensMap(patchFaces, prims);
|
toMaster<< ensMap(patchFaces, prims);
|
||||||
|
@ -1087,7 +1087,7 @@ void Foam::ensightMesh::writeAllNSided
|
||||||
// List of points id for each face
|
// List of points id for each face
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (&prims != NULL)
|
if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
writeNSidedPoints
|
writeNSidedPoints
|
||||||
(
|
(
|
||||||
|
@ -1114,7 +1114,7 @@ void Foam::ensightMesh::writeAllNSided
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (&prims != NULL)
|
else if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
toMaster<< ensMap(patchFaces, prims);
|
toMaster<< ensMap(patchFaces, prims);
|
||||||
|
@ -1177,7 +1177,7 @@ void Foam::ensightMesh::writeAllNSidedBinary
|
||||||
// Number of points for each face
|
// Number of points for each face
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (&prims != NULL)
|
if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
writeNSidedNPointsPerFaceBinary
|
writeNSidedNPointsPerFaceBinary
|
||||||
(
|
(
|
||||||
|
@ -1202,7 +1202,7 @@ void Foam::ensightMesh::writeAllNSidedBinary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (&prims != NULL)
|
else if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
toMaster<< ensMap(patchFaces, prims);
|
toMaster<< ensMap(patchFaces, prims);
|
||||||
|
@ -1211,7 +1211,7 @@ void Foam::ensightMesh::writeAllNSidedBinary
|
||||||
// List of points id for each face
|
// List of points id for each face
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (&prims != NULL)
|
if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
writeNSidedPointsBinary
|
writeNSidedPointsBinary
|
||||||
(
|
(
|
||||||
|
@ -1238,7 +1238,7 @@ void Foam::ensightMesh::writeAllNSidedBinary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (&prims != NULL)
|
else if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
toMaster<< ensMap(patchFaces, prims);
|
toMaster<< ensMap(patchFaces, prims);
|
||||||
|
@ -1265,7 +1265,7 @@ void Foam::ensightMesh::writeAllFacePrimsBinary
|
||||||
writeEnsDataBinary(key,ensightGeometryFile);
|
writeEnsDataBinary(key,ensightGeometryFile);
|
||||||
writeEnsDataBinary(nPrims,ensightGeometryFile);
|
writeEnsDataBinary(nPrims,ensightGeometryFile);
|
||||||
|
|
||||||
if (&prims != NULL)
|
if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
writeFacePrimsBinary
|
writeFacePrimsBinary
|
||||||
(
|
(
|
||||||
|
@ -1292,7 +1292,7 @@ void Foam::ensightMesh::writeAllFacePrimsBinary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (&prims != NULL)
|
else if (&prims != nullptr)
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
toMaster<< ensMap(patchFaces, prims);
|
toMaster<< ensMap(patchFaces, prims);
|
||||||
|
@ -1346,7 +1346,7 @@ void Foam::ensightMesh::writeAscii
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
fileName ensightGeometryFileName = timeFile + "mesh";
|
fileName ensightGeometryFileName = timeFile + "mesh";
|
||||||
|
|
||||||
OFstream *ensightGeometryFilePtr = NULL;
|
OFstream *ensightGeometryFilePtr = nullptr;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightGeometryFilePtr = new OFstream
|
ensightGeometryFilePtr = new OFstream
|
||||||
|
@ -1475,12 +1475,12 @@ void Foam::ensightMesh::writeAscii
|
||||||
{
|
{
|
||||||
const nFacePrimitives& nfp = nPatchPrims_.find(patchName)();
|
const nFacePrimitives& nfp = nPatchPrims_.find(patchName)();
|
||||||
|
|
||||||
const labelList *trisPtr = NULL;
|
const labelList *trisPtr = nullptr;
|
||||||
const labelList *quadsPtr = NULL;
|
const labelList *quadsPtr = nullptr;
|
||||||
const labelList *polysPtr = NULL;
|
const labelList *polysPtr = nullptr;
|
||||||
|
|
||||||
const pointField *patchPointsPtr = NULL;
|
const pointField *patchPointsPtr = nullptr;
|
||||||
const faceList *patchFacesPtr = NULL;
|
const faceList *patchFacesPtr = nullptr;
|
||||||
|
|
||||||
if (mesh_.boundary()[patchi].size())
|
if (mesh_.boundary()[patchi].size())
|
||||||
{
|
{
|
||||||
|
@ -1641,7 +1641,7 @@ void Foam::ensightMesh::writeBinary
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
fileName ensightGeometryFileName = timeFile + "mesh";
|
fileName ensightGeometryFileName = timeFile + "mesh";
|
||||||
|
|
||||||
std::ofstream *ensightGeometryFilePtr = NULL;
|
std::ofstream *ensightGeometryFilePtr = nullptr;
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
@ -1763,12 +1763,12 @@ void Foam::ensightMesh::writeBinary
|
||||||
{
|
{
|
||||||
const nFacePrimitives& nfp = nPatchPrims_.find(patchName)();
|
const nFacePrimitives& nfp = nPatchPrims_.find(patchName)();
|
||||||
|
|
||||||
const labelList *trisPtr = NULL;
|
const labelList *trisPtr = nullptr;
|
||||||
const labelList *quadsPtr = NULL;
|
const labelList *quadsPtr = nullptr;
|
||||||
const labelList *polysPtr = NULL;
|
const labelList *polysPtr = nullptr;
|
||||||
|
|
||||||
const pointField *patchPointsPtr = NULL;
|
const pointField *patchPointsPtr = nullptr;
|
||||||
const faceList *patchFacesPtr = NULL;
|
const faceList *patchFacesPtr = nullptr;
|
||||||
|
|
||||||
if (mesh_.boundary()[patchi].size())
|
if (mesh_.boundary()[patchi].size())
|
||||||
{
|
{
|
||||||
|
|
|
@ -150,7 +150,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";
|
||||||
|
|
|
@ -277,7 +277,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
// Current mesh. Start off from unloaded mesh.
|
// Current mesh. Start off from unloaded mesh.
|
||||||
autoPtr<fieldviewTopology> topoPtr(NULL);
|
autoPtr<fieldviewTopology> topoPtr(nullptr);
|
||||||
|
|
||||||
label fieldViewTime = 0;
|
label fieldViewTime = 0;
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ int main(int argc, char *argv[])
|
||||||
writeInt(fvFile, volFieldNames.size());
|
writeInt(fvFile, volFieldNames.size());
|
||||||
forAll(volFieldNames, fieldI)
|
forAll(volFieldNames, fieldI)
|
||||||
{
|
{
|
||||||
if (volFieldPtrs[fieldI] == NULL)
|
if (volFieldPtrs[fieldI] == nullptr)
|
||||||
{
|
{
|
||||||
Info<< " dummy field for "
|
Info<< " dummy field for "
|
||||||
<< volFieldNames[fieldI].c_str() << endl;
|
<< volFieldNames[fieldI].c_str() << endl;
|
||||||
|
@ -436,7 +436,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
forAll(surfFieldNames, fieldI)
|
forAll(surfFieldNames, fieldI)
|
||||||
{
|
{
|
||||||
if (surfFieldPtrs[fieldI] == NULL)
|
if (surfFieldPtrs[fieldI] == nullptr)
|
||||||
{
|
{
|
||||||
Info<< " dummy surface field for "
|
Info<< " dummy surface field for "
|
||||||
<< surfFieldNames[fieldI].c_str() << endl;
|
<< surfFieldNames[fieldI].c_str() << endl;
|
||||||
|
@ -644,7 +644,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
forAll(volFieldPtrs, fieldI)
|
forAll(volFieldPtrs, fieldI)
|
||||||
{
|
{
|
||||||
if (volFieldPtrs[fieldI] != NULL)
|
if (volFieldPtrs[fieldI] != nullptr)
|
||||||
{
|
{
|
||||||
const volScalarField& vField = *volFieldPtrs[fieldI];
|
const volScalarField& vField = *volFieldPtrs[fieldI];
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
forAll(volFieldPtrs, fieldI)
|
forAll(volFieldPtrs, fieldI)
|
||||||
{
|
{
|
||||||
if (volFieldPtrs[fieldI] != NULL)
|
if (volFieldPtrs[fieldI] != nullptr)
|
||||||
{
|
{
|
||||||
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
||||||
|
|
||||||
|
@ -730,7 +730,7 @@ int main(int argc, char *argv[])
|
||||||
// surfFields
|
// surfFields
|
||||||
forAll(surfFieldPtrs, fieldI)
|
forAll(surfFieldPtrs, fieldI)
|
||||||
{
|
{
|
||||||
if (surfFieldPtrs[fieldI] != NULL)
|
if (surfFieldPtrs[fieldI] != nullptr)
|
||||||
{
|
{
|
||||||
const surfaceScalarField& ssf = *surfFieldPtrs[fieldI];
|
const surfaceScalarField& ssf = *surfFieldPtrs[fieldI];
|
||||||
|
|
||||||
|
@ -778,7 +778,7 @@ int main(int argc, char *argv[])
|
||||||
writeInt(fvFile, FV_ARB_POLY_BNDRY_VARS);
|
writeInt(fvFile, FV_ARB_POLY_BNDRY_VARS);
|
||||||
forAll(volFieldPtrs, fieldI)
|
forAll(volFieldPtrs, fieldI)
|
||||||
{
|
{
|
||||||
if (volFieldPtrs[fieldI] != NULL)
|
if (volFieldPtrs[fieldI] != nullptr)
|
||||||
{
|
{
|
||||||
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
||||||
|
|
||||||
|
@ -815,7 +815,7 @@ int main(int argc, char *argv[])
|
||||||
// surfFields
|
// surfFields
|
||||||
forAll(surfFieldPtrs, fieldI)
|
forAll(surfFieldPtrs, fieldI)
|
||||||
{
|
{
|
||||||
if (surfFieldPtrs[fieldI] != NULL)
|
if (surfFieldPtrs[fieldI] != nullptr)
|
||||||
{
|
{
|
||||||
const surfaceScalarField& ssf = *surfFieldPtrs[fieldI];
|
const surfaceScalarField& ssf = *surfFieldPtrs[fieldI];
|
||||||
|
|
||||||
|
@ -920,7 +920,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
forAll(sprayScalarFieldPtrs, fieldI)
|
forAll(sprayScalarFieldPtrs, fieldI)
|
||||||
{
|
{
|
||||||
if (sprayScalarFieldPtrs[fieldI] != NULL)
|
if (sprayScalarFieldPtrs[fieldI] != nullptr)
|
||||||
{
|
{
|
||||||
const IOField<scalar>& sprayField =
|
const IOField<scalar>& sprayField =
|
||||||
*sprayScalarFieldPtrs[fieldI];
|
*sprayScalarFieldPtrs[fieldI];
|
||||||
|
@ -937,7 +937,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
forAll(sprayVectorFieldPtrs, fieldI)
|
forAll(sprayVectorFieldPtrs, fieldI)
|
||||||
{
|
{
|
||||||
if (sprayVectorFieldPtrs[fieldI] != NULL)
|
if (sprayVectorFieldPtrs[fieldI] != nullptr)
|
||||||
{
|
{
|
||||||
const IOField<vector>& sprayVectorField =
|
const IOField<vector>& sprayVectorField =
|
||||||
*sprayVectorFieldPtrs[fieldI];
|
*sprayVectorFieldPtrs[fieldI];
|
||||||
|
|
|
@ -112,8 +112,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 */
|
||||||
|
@ -192,8 +192,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 */
|
||||||
|
@ -274,8 +274,8 @@ Pout<< "zoneName:" << zoneName
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
INTEGER4 *PassiveVarArray = NULL;
|
INTEGER4 *PassiveVarArray = nullptr;
|
||||||
INTEGER4 *VarShareArray = NULL;
|
INTEGER4 *VarShareArray = nullptr;
|
||||||
INTEGER4 ShrConn = 0;
|
INTEGER4 ShrConn = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -374,9 +374,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 */
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -488,9 +488,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 */
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -204,14 +204,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ void Foam::vtkPVFoam::reduceMemory()
|
||||||
if (!reader_->GetCacheMesh())
|
if (!reader_->GetCacheMesh())
|
||||||
{
|
{
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
meshPtr_ = NULL;
|
meshPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,8 +222,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),
|
||||||
|
@ -343,7 +343,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ void Foam::vtkPVFoam::updateFoamMesh()
|
||||||
if (!reader_->GetCacheMesh())
|
if (!reader_->GetCacheMesh())
|
||||||
{
|
{
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
meshPtr_ = NULL;
|
meshPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if the FOAM mesh has been created
|
// Check to see if the FOAM mesh has been created
|
||||||
|
@ -533,7 +533,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())
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,7 @@ vtkPolyData* Foam::vtkPVFoam::lagrangianVTKMesh
|
||||||
const word& cloudName
|
const word& cloudName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
vtkPolyData* vtkmesh = NULL;
|
vtkPolyData* vtkmesh = nullptr;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|
|
@ -198,7 +198,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkDataArraySelection* partSelection = reader_->GetPartSelection();
|
vtkDataArraySelection* partSelection = reader_->GetPartSelection();
|
||||||
|
@ -292,7 +292,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkDataArraySelection* partSelection = reader_->GetPartSelection();
|
vtkDataArraySelection* partSelection = reader_->GetPartSelection();
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ int USERD_set_filenames
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#ifdef ENSIGHTDEBUG
|
#ifdef ENSIGHTDEBUG
|
||||||
Info << "Entering: USERD_set_filenames" << endl << flush;
|
Info<< "Entering: USERD_set_filenames" << endl << flush;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char tmp[100];
|
char tmp[100];
|
||||||
|
@ -28,7 +28,7 @@ int USERD_set_filenames
|
||||||
// remove the last '/' from rootDir
|
// remove the last '/' from rootDir
|
||||||
if (the_path[lRoot-1] == '/')
|
if (the_path[lRoot-1] == '/')
|
||||||
{
|
{
|
||||||
the_path[lRoot-1] = (char)NULL;
|
the_path[lRoot-1] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ int USERD_set_filenames
|
||||||
label nVar = 0;
|
label nVar = 0;
|
||||||
wordList scalars = objects.names(scalarName);
|
wordList scalars = objects.names(scalarName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll (fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitScalar = false;
|
bool isitScalar = false;
|
||||||
forAll(scalars,i)
|
forAll(scalars,i)
|
||||||
|
@ -115,7 +115,7 @@ int USERD_set_filenames
|
||||||
|
|
||||||
wordList vectors = objects.names(vectorName);
|
wordList vectors = objects.names(vectorName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll (fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitVector = false;
|
bool isitVector = false;
|
||||||
forAll(vectors,i)
|
forAll(vectors,i)
|
||||||
|
@ -131,7 +131,7 @@ int USERD_set_filenames
|
||||||
|
|
||||||
wordList tensors = objects.names(tensorName);
|
wordList tensors = objects.names(tensorName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll (fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitTensor = false;
|
bool isitTensor = false;
|
||||||
forAll(tensors,i)
|
forAll(tensors,i)
|
||||||
|
@ -151,10 +151,10 @@ int USERD_set_filenames
|
||||||
{
|
{
|
||||||
runTime.setTime(timeDirs[n+1], n+1);
|
runTime.setTime(timeDirs[n+1], n+1);
|
||||||
|
|
||||||
Cloud<passiveParticle> lagrangian(*meshPtr);
|
Cloud<passiveParticle> lagrangian(*meshPtr, cloud::defaultName);
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
if (lagrangian.size())
|
if (lagrangian.size() > 0)
|
||||||
{
|
{
|
||||||
lagrangianNamesFound = true;
|
lagrangianNamesFound = true;
|
||||||
}
|
}
|
||||||
|
@ -171,20 +171,19 @@ int USERD_set_filenames
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if (sprayHeader.headerOk())
|
if (sprayHeader.headerOk())
|
||||||
{
|
{
|
||||||
Info << "[Found lagrangian]" << endl;
|
Info << "[Found lagrangian]" << endl;
|
||||||
|
|
||||||
delete sprayPtr;
|
delete sprayPtr;
|
||||||
|
|
||||||
sprayPtr = new Cloud<passiveParticle>(*meshPtr);
|
sprayPtr = new Cloud<passiveParticle>(*meshPtr, cloud::defaultName);
|
||||||
|
|
||||||
IOobjectList objects(*meshPtr, runTime.timeName(), cloud::prefix);
|
IOobjectList objects(*meshPtr, runTime.timeName(), cloud::prefix);
|
||||||
|
|
||||||
lagrangianScalarNames =
|
lagrangianScalarNames = objects.names(sprayScalarFieldName);
|
||||||
(const wordList&)objects.names(sprayScalarFieldName);
|
lagrangianVectorNames = objects.names(sprayVectorFieldName);
|
||||||
lagrangianVectorNames =
|
|
||||||
(const wordList&)objects.names(sprayVectorFieldName);
|
|
||||||
|
|
||||||
isSpray[fieldNames.size()] = true;
|
isSpray[fieldNames.size()] = true;
|
||||||
|
|
||||||
|
@ -201,9 +200,8 @@ int USERD_set_filenames
|
||||||
Numparts_available = Num_unstructured_parts + Num_structured_parts + nPatches;
|
Numparts_available = Num_unstructured_parts + Num_structured_parts + nPatches;
|
||||||
|
|
||||||
#ifdef ENSIGHTDEBUG
|
#ifdef ENSIGHTDEBUG
|
||||||
Info << "Leaving: USERD_set_filenames" << endl << flush;
|
Info<< "Leaving: USERD_set_filenames" << endl << flush;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return Z_OK;
|
return Z_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,8 @@ void Foam::readerDatabase::getPolyHedra()
|
||||||
Foam::readerDatabase::readerDatabase()
|
Foam::readerDatabase::readerDatabase()
|
||||||
:
|
:
|
||||||
fieldviewNames_(10),
|
fieldviewNames_(10),
|
||||||
runTimePtr_(NULL),
|
runTimePtr_(nullptr),
|
||||||
meshPtr_(NULL),
|
meshPtr_(nullptr),
|
||||||
setName_(""),
|
setName_(""),
|
||||||
polys_(),
|
polys_(),
|
||||||
volScalarNames_(),
|
volScalarNames_(),
|
||||||
|
|
|
@ -10,7 +10,7 @@ int USERD_set_filenames
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#ifdef ENSIGHTDEBUG
|
#ifdef ENSIGHTDEBUG
|
||||||
Info << "Entering: USERD_set_filenames" << endl << flush;
|
Info<< "Entering: USERD_set_filenames" << endl << flush;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char tmp[100];
|
char tmp[100];
|
||||||
|
@ -28,7 +28,7 @@ int USERD_set_filenames
|
||||||
// remove the last '/' from rootDir
|
// remove the last '/' from rootDir
|
||||||
if (the_path[lRoot-1] == '/')
|
if (the_path[lRoot-1] == '/')
|
||||||
{
|
{
|
||||||
the_path[lRoot-1] = (char)NULL;
|
the_path[lRoot-1] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,6 @@ int USERD_set_filenames
|
||||||
return Z_ERR;
|
return Z_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// construct the global pointers to the database and mesh
|
// construct the global pointers to the database and mesh
|
||||||
|
|
||||||
delete meshPtr;
|
delete meshPtr;
|
||||||
|
@ -80,7 +79,7 @@ int USERD_set_filenames
|
||||||
);
|
);
|
||||||
|
|
||||||
// set the available number of time-steps
|
// set the available number of time-steps
|
||||||
TimeList = (const instantList&)Foam::Time::findTimes(rootDir/caseDir);
|
TimeList = Foam::Time::findTimes(rootDir/caseDir);
|
||||||
|
|
||||||
Num_time_steps = TimeList.size() - 1;
|
Num_time_steps = TimeList.size() - 1;
|
||||||
|
|
||||||
|
@ -88,10 +87,10 @@ int USERD_set_filenames
|
||||||
|
|
||||||
// set the number of fields and store their names
|
// set the number of fields and store their names
|
||||||
// a valid field must exist for all time-steps
|
// a valid field must exist for all time-steps
|
||||||
runTime.setTime(TimeList[TimeList.size()-1], TimeList.size()-1);
|
runTime.setTime(TimeList.last(), TimeList.size() - 1);
|
||||||
IOobjectList objects(*meshPtr, runTime.timeName());
|
IOobjectList objects(*meshPtr, runTime.timeName());
|
||||||
|
|
||||||
fieldNames = (const wordList&)objects.names();
|
fieldNames = objects.names();
|
||||||
|
|
||||||
// because of the spray being a 'field' ...
|
// because of the spray being a 'field' ...
|
||||||
// get the availabe number of variables and
|
// get the availabe number of variables and
|
||||||
|
@ -100,7 +99,7 @@ int USERD_set_filenames
|
||||||
label nVar = 0;
|
label nVar = 0;
|
||||||
wordList scalars = objects.names(scalarName);
|
wordList scalars = objects.names(scalarName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll (fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitScalar = false;
|
bool isitScalar = false;
|
||||||
forAll(scalars,i)
|
forAll(scalars,i)
|
||||||
|
@ -116,7 +115,7 @@ int USERD_set_filenames
|
||||||
|
|
||||||
wordList vectors = objects.names(vectorName);
|
wordList vectors = objects.names(vectorName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll (fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitVector = false;
|
bool isitVector = false;
|
||||||
forAll(vectors,i)
|
forAll(vectors,i)
|
||||||
|
@ -132,7 +131,7 @@ int USERD_set_filenames
|
||||||
|
|
||||||
wordList tensors = objects.names(tensorName);
|
wordList tensors = objects.names(tensorName);
|
||||||
|
|
||||||
for (label n=0; n<fieldNames.size(); n++)
|
forAll (fieldNames, n)
|
||||||
{
|
{
|
||||||
bool isitTensor = false;
|
bool isitTensor = false;
|
||||||
forAll(tensors,i)
|
forAll(tensors,i)
|
||||||
|
@ -148,14 +147,14 @@ int USERD_set_filenames
|
||||||
|
|
||||||
bool lagrangianNamesFound = false;
|
bool lagrangianNamesFound = false;
|
||||||
label n = 0;
|
label n = 0;
|
||||||
while ((!lagrangianNamesFound) && (n<Num_time_steps))
|
while (!lagrangianNamesFound && n < Num_time_steps)
|
||||||
{
|
{
|
||||||
runTime.setTime(TimeList[n+1], n+1);
|
runTime.setTime(TimeList[n + 1], n + 1);
|
||||||
|
|
||||||
Cloud<passiveParticle> lagrangian(*meshPtr);
|
Cloud<passiveParticle> lagrangian(*meshPtr, cloud::defaultName);
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
if (lagrangian.size()>0)
|
if (lagrangian.size() > 0)
|
||||||
{
|
{
|
||||||
lagrangianNamesFound = true;
|
lagrangianNamesFound = true;
|
||||||
}
|
}
|
||||||
|
@ -179,14 +178,12 @@ int USERD_set_filenames
|
||||||
|
|
||||||
delete sprayPtr;
|
delete sprayPtr;
|
||||||
|
|
||||||
sprayPtr = new Cloud<passiveParticle>(*meshPtr);
|
sprayPtr = new Cloud<passiveParticle>(*meshPtr, cloud::defaultName);
|
||||||
|
|
||||||
IOobjectList objects(*meshPtr, runTime.timeName(), "lagrangian");
|
IOobjectList objects(*meshPtr, runTime.timeName(), cloud::prefix);
|
||||||
|
|
||||||
lagrangianScalarNames =
|
lagrangianScalarNames = objects.names(sprayScalarFieldName);
|
||||||
(const wordList&)objects.names(sprayScalarFieldName);
|
lagrangianVectorNames = objects.names(sprayVectorFieldName);
|
||||||
lagrangianVectorNames =
|
|
||||||
(const wordList&)objects.names(sprayVectorFieldName);
|
|
||||||
|
|
||||||
isSpray[fieldNames.size()] = true;
|
isSpray[fieldNames.size()] = true;
|
||||||
|
|
||||||
|
@ -281,7 +278,7 @@ int USERD_set_filenames
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(secondMeshPtr)
|
if (secondMeshPtr)
|
||||||
{
|
{
|
||||||
Num_unstructured_parts += 1;
|
Num_unstructured_parts += 1;
|
||||||
|
|
||||||
|
@ -443,9 +440,8 @@ int USERD_set_filenames
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENSIGHTDEBUG
|
#ifdef ENSIGHTDEBUG
|
||||||
Info << "Leaving: USERD_set_filenames" << endl << flush;
|
Info<< "Leaving: USERD_set_filenames" << endl << flush;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return Z_OK;
|
return Z_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,12 +197,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,33 +271,33 @@ 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.", "Error", MB_OK);
|
"Cannot register window class.", "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, "CreateWindow() failed: Cannot create a window.",
|
MessageBox(nullptr, "CreateWindow() failed: Cannot create a window.",
|
||||||
"Error", MB_OK);
|
"Error", MB_OK);
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
hDC = GetDC(hWnd);
|
hDC = GetDC(hWnd);
|
||||||
|
@ -314,13 +314,13 @@ 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.", "Error", MB_OK);
|
"Cannot find a suitable pixel format.", "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;
|
||||||
}
|
}
|
||||||
|
@ -406,7 +406,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);
|
||||||
|
@ -435,7 +435,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);
|
||||||
|
|
|
@ -434,7 +434,7 @@ void Foam::boundaryMesh::markZone
|
||||||
// Null constructor
|
// Null constructor
|
||||||
Foam::boundaryMesh::boundaryMesh()
|
Foam::boundaryMesh::boundaryMesh()
|
||||||
:
|
:
|
||||||
meshPtr_(NULL),
|
meshPtr_(nullptr),
|
||||||
patches_(),
|
patches_(),
|
||||||
meshFace_(),
|
meshFace_(),
|
||||||
featurePoints_(),
|
featurePoints_(),
|
||||||
|
@ -460,7 +460,7 @@ void Foam::boundaryMesh::clearOut()
|
||||||
{
|
{
|
||||||
delete meshPtr_;
|
delete meshPtr_;
|
||||||
|
|
||||||
meshPtr_ = NULL;
|
meshPtr_ = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,11 +96,11 @@ std::string MSwindows::getLastError()
|
||||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL,
|
nullptr,
|
||||||
dw,
|
dw,
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||||
(LPTSTR) &lpMsgBuf,
|
(LPTSTR) &lpMsgBuf,
|
||||||
0, NULL );
|
0, nullptr );
|
||||||
|
|
||||||
lpDisplayBuf = LocalAlloc(LMEM_ZEROINIT,
|
lpDisplayBuf = LocalAlloc(LMEM_ZEROINIT,
|
||||||
(lstrlen(static_cast<LPCTSTR>(lpMsgBuf))+40)*sizeof(TCHAR));
|
(lstrlen(static_cast<LPCTSTR>(lpMsgBuf))+40)*sizeof(TCHAR));
|
||||||
|
@ -343,7 +343,7 @@ std::string toUnixPath(const std::string & path)
|
||||||
bool env(const word& envName)
|
bool env(const word& envName)
|
||||||
{
|
{
|
||||||
const DWORD actualBufferSize =
|
const DWORD actualBufferSize =
|
||||||
::GetEnvironmentVariable(envName.c_str(), NULL, 0);
|
::GetEnvironmentVariable(envName.c_str(), nullptr, 0);
|
||||||
|
|
||||||
const bool envExists = (0 < actualBufferSize);
|
const bool envExists = (0 < actualBufferSize);
|
||||||
return envExists;
|
return envExists;
|
||||||
|
@ -355,7 +355,7 @@ string getEnv(const word& envName)
|
||||||
std::string envAsString;
|
std::string envAsString;
|
||||||
|
|
||||||
const DWORD actualBufferSize =
|
const DWORD actualBufferSize =
|
||||||
::GetEnvironmentVariable(envName.c_str(), NULL, 0);
|
::GetEnvironmentVariable(envName.c_str(), nullptr, 0);
|
||||||
|
|
||||||
if (0 < actualBufferSize)
|
if (0 < actualBufferSize)
|
||||||
{
|
{
|
||||||
|
@ -461,7 +461,7 @@ fileName cwd()
|
||||||
string currentDirectory;
|
string currentDirectory;
|
||||||
|
|
||||||
const DWORD actualBufferSize =
|
const DWORD actualBufferSize =
|
||||||
::GetCurrentDirectory(0, NULL);
|
::GetCurrentDirectory(0, nullptr);
|
||||||
|
|
||||||
if (0 < actualBufferSize)
|
if (0 < actualBufferSize)
|
||||||
{
|
{
|
||||||
|
@ -704,7 +704,7 @@ bool mkDir(const fileName& pathName, const mode_t mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool success = ::CreateDirectory(pathName.c_str(), NULL);
|
bool success = ::CreateDirectory(pathName.c_str(), nullptr);
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
|
@ -1294,7 +1294,7 @@ void* dlOpen(const fileName& libName, const bool check)
|
||||||
|
|
||||||
void* handle = ::LoadLibrary(winLibName.c_str());
|
void* handle = ::LoadLibrary(winLibName.c_str());
|
||||||
|
|
||||||
if (NULL == handle)
|
if (nullptr == handle)
|
||||||
{
|
{
|
||||||
// Assumes libName = name
|
// Assumes libName = name
|
||||||
winLibName = "lib";
|
winLibName = "lib";
|
||||||
|
@ -1304,7 +1304,7 @@ void* dlOpen(const fileName& libName, const bool check)
|
||||||
handle = ::LoadLibrary(winLibName.c_str());
|
handle = ::LoadLibrary(winLibName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != handle)
|
if (nullptr != handle)
|
||||||
{
|
{
|
||||||
getLoadedLibs()[handle] = libName;
|
getLoadedLibs()[handle] = libName;
|
||||||
}
|
}
|
||||||
|
@ -1357,7 +1357,7 @@ void* dlSym(void* handle, const std::string& symbol)
|
||||||
// get address of symbol
|
// get address of symbol
|
||||||
void* fun = (void*) ::GetProcAddress(static_cast<HMODULE>(handle), symbol.c_str());
|
void* fun = (void*) ::GetProcAddress(static_cast<HMODULE>(handle), symbol.c_str());
|
||||||
|
|
||||||
if (NULL == fun)
|
if (nullptr == fun)
|
||||||
{
|
{
|
||||||
WarningIn("dlSym(void*, const std::string&)")
|
WarningIn("dlSym(void*, const std::string&)")
|
||||||
<< "Cannot lookup symbol " << symbol << " : " << MSwindows::getLastError()
|
<< "Cannot lookup symbol " << symbol << " : " << MSwindows::getLastError()
|
||||||
|
@ -1381,7 +1381,7 @@ bool dlSymFound(void* handle, const std::string& symbol)
|
||||||
// get address of symbol
|
// get address of symbol
|
||||||
void* fun = (void*) ::GetProcAddress(static_cast<HMODULE>(handle), symbol.c_str());
|
void* fun = (void*) ::GetProcAddress(static_cast<HMODULE>(handle), symbol.c_str());
|
||||||
|
|
||||||
return (NULL != fun);
|
return (nullptr != fun);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Foam
|
||||||
|
|
||||||
void clockTime::getTime(struct timeval& t)
|
void clockTime::getTime(struct timeval& t)
|
||||||
{
|
{
|
||||||
gettimeofday(&t, NULL);
|
gettimeofday(&t, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ bool rwMutex::debug = false;
|
||||||
multiThreader::multiThreader(int numThreads)
|
multiThreader::multiThreader(int numThreads)
|
||||||
:
|
:
|
||||||
maxQueueSize_(10),
|
maxQueueSize_(10),
|
||||||
poolInfo_(NULL)
|
poolInfo_(nullptr)
|
||||||
{
|
{
|
||||||
if (numThreads > 0)
|
if (numThreads > 0)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ rwMutex::rwMutex()
|
||||||
|
|
||||||
Conditional::Conditional()
|
Conditional::Conditional()
|
||||||
{
|
{
|
||||||
if (pthread_cond_init(&condition_, NULL))
|
if (pthread_cond_init(&condition_, nullptr))
|
||||||
{
|
{
|
||||||
FatalErrorIn("multiThreader::Conditional::Conditional()")
|
FatalErrorIn("multiThreader::Conditional::Conditional()")
|
||||||
<< "Unable to initialize condition"
|
<< "Unable to initialize condition"
|
||||||
|
@ -190,8 +190,8 @@ void multiThreader::initializeThreadPool()
|
||||||
poolInfo_->numThreads = numThreads_;
|
poolInfo_->numThreads = numThreads_;
|
||||||
poolInfo_->queueSize = 0;
|
poolInfo_->queueSize = 0;
|
||||||
poolInfo_->threads = new pthread_t[numThreads_];
|
poolInfo_->threads = new pthread_t[numThreads_];
|
||||||
poolInfo_->head = NULL;
|
poolInfo_->head = nullptr;
|
||||||
poolInfo_->tail = NULL;
|
poolInfo_->tail = nullptr;
|
||||||
|
|
||||||
// Initialize flags
|
// Initialize flags
|
||||||
poolInfo_->queueClosed = false;
|
poolInfo_->queueClosed = false;
|
||||||
|
@ -265,7 +265,7 @@ threadReturnType multiThreader::poolThread(void *arg)
|
||||||
if (poolInfo->shutDown)
|
if (poolInfo->shutDown)
|
||||||
{
|
{
|
||||||
poolInfo->queueLock.unlock();
|
poolInfo->queueLock.unlock();
|
||||||
pthread_exit(NULL);
|
pthread_exit(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick an item off the queue, and get to work
|
// Pick an item off the queue, and get to work
|
||||||
|
@ -273,7 +273,7 @@ threadReturnType multiThreader::poolThread(void *arg)
|
||||||
poolInfo->queueSize--;
|
poolInfo->queueSize--;
|
||||||
if (poolInfo->queueSize == 0)
|
if (poolInfo->queueSize == 0)
|
||||||
{
|
{
|
||||||
poolInfo->head = poolInfo->tail = NULL;
|
poolInfo->head = poolInfo->tail = nullptr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -355,7 +355,7 @@ void multiThreader::addToWorkQueue
|
||||||
workQueueItem *newWorkItem = new workQueueItem;
|
workQueueItem *newWorkItem = new workQueueItem;
|
||||||
newWorkItem->function = tFunction;
|
newWorkItem->function = tFunction;
|
||||||
newWorkItem->arg = arg;
|
newWorkItem->arg = arg;
|
||||||
newWorkItem->next = NULL;
|
newWorkItem->next = nullptr;
|
||||||
|
|
||||||
// Add new work structure to the queue
|
// Add new work structure to the queue
|
||||||
if (poolInfo_->queueSize == 0)
|
if (poolInfo_->queueSize == 0)
|
||||||
|
@ -412,7 +412,7 @@ void multiThreader::destroyThreadPool()
|
||||||
// Wait for all workers to exit
|
// Wait for all workers to exit
|
||||||
for(int i=0; i < numThreads_; i++)
|
for(int i=0; i < numThreads_; i++)
|
||||||
{
|
{
|
||||||
if (pthread_join(poolInfo_->threads[i],NULL))
|
if (pthread_join(poolInfo_->threads[i],nullptr))
|
||||||
{
|
{
|
||||||
FatalErrorIn("multiThreader::destroyThreadPool()")
|
FatalErrorIn("multiThreader::destroyThreadPool()")
|
||||||
<< "pthread_join failed."
|
<< "pthread_join failed."
|
||||||
|
@ -427,7 +427,7 @@ void multiThreader::destroyThreadPool()
|
||||||
delete [] poolInfo_->threads;
|
delete [] poolInfo_->threads;
|
||||||
|
|
||||||
workQueueItem *currentNode;
|
workQueueItem *currentNode;
|
||||||
while(poolInfo_->head != NULL)
|
while(poolInfo_->head != nullptr)
|
||||||
{
|
{
|
||||||
currentNode = poolInfo_->head->next;
|
currentNode = poolInfo_->head->next;
|
||||||
poolInfo_->head = poolInfo_->head->next;
|
poolInfo_->head = poolInfo_->head->next;
|
||||||
|
|
|
@ -65,7 +65,7 @@ extern "C"
|
||||||
typedef void *(*threadFunctionType)(void *);
|
typedef void *(*threadFunctionType)(void *);
|
||||||
|
|
||||||
#define threadReturnType void *
|
#define threadReturnType void *
|
||||||
#define threadReturnValue NULL
|
#define threadReturnValue nullptr
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ threadHandler<T>::~threadHandler()
|
||||||
// to avoid multiple deallocations.
|
// to avoid multiple deallocations.
|
||||||
forAll(argList_, indexI)
|
forAll(argList_, indexI)
|
||||||
{
|
{
|
||||||
argList_[indexI] = NULL;
|
argList_[indexI] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ inline void threadHandler<T>::setSize
|
||||||
const label size
|
const label size
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
argList_.setSize(size, NULL);
|
argList_.setSize(size, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ string pOpen(const string &cmd, label line=0)
|
||||||
|
|
||||||
char* s = fgets(buffer, MAX-1, cmdPipe);
|
char* s = fgets(buffer, MAX-1, cmdPipe);
|
||||||
|
|
||||||
if (s == NULL)
|
if (s == nullptr)
|
||||||
{
|
{
|
||||||
#ifdef darwin
|
#ifdef darwin
|
||||||
// workaround for the Python-Script
|
// workaround for the Python-Script
|
||||||
|
@ -392,7 +392,7 @@ void error::printStack(Ostream& os)
|
||||||
char* cplusNamePtr = abi::__cxa_demangle
|
char* cplusNamePtr = abi::__cxa_demangle
|
||||||
(
|
(
|
||||||
cName.c_str(),
|
cName.c_str(),
|
||||||
NULL, // have it malloc itself
|
nullptr, // have it malloc itself
|
||||||
0,
|
0,
|
||||||
&status
|
&status
|
||||||
);
|
);
|
||||||
|
|
|
@ -76,7 +76,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 = EXTENDED;
|
int cflags = EXTENDED;
|
||||||
|
|
|
@ -44,7 +44,7 @@ jmp_buf Foam::timer::envAlarm;
|
||||||
|
|
||||||
__p_sig_fn_t Foam::timer::oldAction_ = SIG_DFL;
|
__p_sig_fn_t Foam::timer::oldAction_ = SIG_DFL;
|
||||||
|
|
||||||
static HANDLE hTimer_ = NULL;
|
static HANDLE hTimer_ = nullptr;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ Foam::timer::timer(const unsigned int newTimeOut)
|
||||||
if (newTimeOut > 0)
|
if (newTimeOut > 0)
|
||||||
{
|
{
|
||||||
// Is singleton since handler is static function
|
// Is singleton since handler is static function
|
||||||
if( NULL != hTimer_ )
|
if( nullptr != hTimer_ )
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
@ -110,15 +110,15 @@ Foam::timer::timer(const unsigned int newTimeOut)
|
||||||
|
|
||||||
const bool success =
|
const bool success =
|
||||||
::CreateTimerQueueTimer(&hTimer_,
|
::CreateTimerQueueTimer(&hTimer_,
|
||||||
NULL,
|
nullptr,
|
||||||
(WAITORTIMERCALLBACK)timerExpired,
|
(WAITORTIMERCALLBACK)timerExpired,
|
||||||
NULL ,
|
nullptr ,
|
||||||
newTimeOut * 1000,
|
newTimeOut * 1000,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
hTimer_ = NULL;
|
hTimer_ = nullptr;
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"Foam::timer::timer(const unsigned int)"
|
"Foam::timer::timer(const unsigned int)"
|
||||||
|
@ -138,8 +138,8 @@ Foam::timer::~timer()
|
||||||
{
|
{
|
||||||
// Reset timer
|
// Reset timer
|
||||||
const bool timerSuccess =
|
const bool timerSuccess =
|
||||||
::DeleteTimerQueueTimer(NULL, hTimer_, NULL);
|
::DeleteTimerQueueTimer(nullptr, hTimer_, nullptr);
|
||||||
hTimer_ = NULL;
|
hTimer_ = nullptr;
|
||||||
|
|
||||||
if (!timerSuccess)
|
if (!timerSuccess)
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,7 +82,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,7 +158,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;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,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);
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,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;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,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);
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,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;
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,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);
|
||||||
|
|
||||||
|
@ -683,7 +683,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);
|
||||||
|
|
||||||
|
@ -976,7 +976,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;
|
||||||
|
@ -986,7 +986,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);
|
||||||
|
|
||||||
|
@ -1074,7 +1074,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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Foam
|
||||||
|
|
||||||
void clockTime::getTime(struct timeval& t)
|
void clockTime::getTime(struct timeval& t)
|
||||||
{
|
{
|
||||||
gettimeofday(&t, NULL);
|
gettimeofday(&t, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ bool rwMutex::debug = false;
|
||||||
multiThreader::multiThreader(int numThreads)
|
multiThreader::multiThreader(int numThreads)
|
||||||
:
|
:
|
||||||
maxQueueSize_(10),
|
maxQueueSize_(10),
|
||||||
poolInfo_(NULL)
|
poolInfo_(nullptr)
|
||||||
{
|
{
|
||||||
if (numThreads > 0)
|
if (numThreads > 0)
|
||||||
{
|
{
|
||||||
|
@ -133,7 +133,7 @@ rwMutex::rwMutex()
|
||||||
|
|
||||||
Conditional::Conditional()
|
Conditional::Conditional()
|
||||||
{
|
{
|
||||||
if (pthread_cond_init(&condition_, NULL))
|
if (pthread_cond_init(&condition_, nullptr))
|
||||||
{
|
{
|
||||||
FatalErrorIn("multiThreader::Conditional::Conditional()")
|
FatalErrorIn("multiThreader::Conditional::Conditional()")
|
||||||
<< "Unable to initialize condition"
|
<< "Unable to initialize condition"
|
||||||
|
@ -197,8 +197,8 @@ void multiThreader::initializeThreadPool()
|
||||||
poolInfo_->numThreads = numThreads_;
|
poolInfo_->numThreads = numThreads_;
|
||||||
poolInfo_->queueSize = 0;
|
poolInfo_->queueSize = 0;
|
||||||
poolInfo_->threads = new pthread_t[numThreads_];
|
poolInfo_->threads = new pthread_t[numThreads_];
|
||||||
poolInfo_->head = NULL;
|
poolInfo_->head = nullptr;
|
||||||
poolInfo_->tail = NULL;
|
poolInfo_->tail = nullptr;
|
||||||
|
|
||||||
// Initialize flags
|
// Initialize flags
|
||||||
poolInfo_->queueClosed = false;
|
poolInfo_->queueClosed = false;
|
||||||
|
@ -272,7 +272,7 @@ threadReturnType multiThreader::poolThread(void *arg)
|
||||||
if (poolInfo->shutDown)
|
if (poolInfo->shutDown)
|
||||||
{
|
{
|
||||||
poolInfo->queueLock.unlock();
|
poolInfo->queueLock.unlock();
|
||||||
pthread_exit(NULL);
|
pthread_exit(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pick an item off the queue, and get to work
|
// Pick an item off the queue, and get to work
|
||||||
|
@ -280,7 +280,7 @@ threadReturnType multiThreader::poolThread(void *arg)
|
||||||
poolInfo->queueSize--;
|
poolInfo->queueSize--;
|
||||||
if (poolInfo->queueSize == 0)
|
if (poolInfo->queueSize == 0)
|
||||||
{
|
{
|
||||||
poolInfo->head = poolInfo->tail = NULL;
|
poolInfo->head = poolInfo->tail = nullptr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -362,7 +362,7 @@ void multiThreader::addToWorkQueue
|
||||||
workQueueItem *newWorkItem = new workQueueItem;
|
workQueueItem *newWorkItem = new workQueueItem;
|
||||||
newWorkItem->function = tFunction;
|
newWorkItem->function = tFunction;
|
||||||
newWorkItem->arg = arg;
|
newWorkItem->arg = arg;
|
||||||
newWorkItem->next = NULL;
|
newWorkItem->next = nullptr;
|
||||||
|
|
||||||
// Add new work structure to the queue
|
// Add new work structure to the queue
|
||||||
if (poolInfo_->queueSize == 0)
|
if (poolInfo_->queueSize == 0)
|
||||||
|
@ -419,7 +419,7 @@ void multiThreader::destroyThreadPool()
|
||||||
// Wait for all workers to exit
|
// Wait for all workers to exit
|
||||||
for(int i=0; i < numThreads_; i++)
|
for(int i=0; i < numThreads_; i++)
|
||||||
{
|
{
|
||||||
if (pthread_join(poolInfo_->threads[i],NULL))
|
if (pthread_join(poolInfo_->threads[i],nullptr))
|
||||||
{
|
{
|
||||||
FatalErrorIn("multiThreader::destroyThreadPool()")
|
FatalErrorIn("multiThreader::destroyThreadPool()")
|
||||||
<< "pthread_join failed."
|
<< "pthread_join failed."
|
||||||
|
@ -434,7 +434,7 @@ void multiThreader::destroyThreadPool()
|
||||||
delete [] poolInfo_->threads;
|
delete [] poolInfo_->threads;
|
||||||
|
|
||||||
workQueueItem *currentNode;
|
workQueueItem *currentNode;
|
||||||
while(poolInfo_->head != NULL)
|
while(poolInfo_->head != nullptr)
|
||||||
{
|
{
|
||||||
currentNode = poolInfo_->head->next;
|
currentNode = poolInfo_->head->next;
|
||||||
poolInfo_->head = poolInfo_->head->next;
|
poolInfo_->head = poolInfo_->head->next;
|
||||||
|
|
|
@ -65,7 +65,7 @@ extern "C"
|
||||||
typedef void *(*threadFunctionType)(void *);
|
typedef void *(*threadFunctionType)(void *);
|
||||||
|
|
||||||
#define threadReturnType void *
|
#define threadReturnType void *
|
||||||
#define threadReturnValue NULL
|
#define threadReturnValue nullptr
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ threadHandler<T>::~threadHandler()
|
||||||
// to avoid multiple deallocations.
|
// to avoid multiple deallocations.
|
||||||
forAll(argList_, indexI)
|
forAll(argList_, indexI)
|
||||||
{
|
{
|
||||||
argList_[indexI] = NULL;
|
argList_[indexI] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ inline void threadHandler<T>::setSize
|
||||||
const label size
|
const label size
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
argList_.setSize(size, NULL);
|
argList_.setSize(size, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ string pOpen(const string &cmd, label line=0)
|
||||||
|
|
||||||
char* s = fgets(buffer, MAX-1, cmdPipe);
|
char* s = fgets(buffer, MAX-1, cmdPipe);
|
||||||
|
|
||||||
if (s == NULL)
|
if (s == nullptr)
|
||||||
{
|
{
|
||||||
#ifdef darwin
|
#ifdef darwin
|
||||||
// workaround for the Python-Script
|
// workaround for the Python-Script
|
||||||
|
@ -346,7 +346,7 @@ void error::printStack(Ostream& os)
|
||||||
char* cplusNamePtr = abi::__cxa_demangle
|
char* cplusNamePtr = abi::__cxa_demangle
|
||||||
(
|
(
|
||||||
cName.c_str(),
|
cName.c_str(),
|
||||||
NULL, // have it malloc itself
|
nullptr, // have it malloc itself
|
||||||
0,
|
0,
|
||||||
&status
|
&status
|
||||||
);
|
);
|
||||||
|
|
|
@ -119,7 +119,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;
|
||||||
|
|
|
@ -99,7 +99,7 @@ void* Foam::sigFpe::mallocNan(size_t size)
|
||||||
|
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
|
||||||
void *(*Foam::sigFpe::system_malloc_)(malloc_zone_t *zone, size_t size)=NULL;
|
void *(*Foam::sigFpe::system_malloc_)(malloc_zone_t *zone, size_t size)=nullptr;
|
||||||
|
|
||||||
void* Foam::sigFpe::nan_malloc_(malloc_zone_t *zone, size_t size)
|
void* Foam::sigFpe::nan_malloc_(malloc_zone_t *zone, size_t size)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ void* Foam::sigFpe::nan_malloc_(malloc_zone_t *zone, 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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
@ -159,7 +159,7 @@ void Foam::sigFpe::sigHandler(int)
|
||||||
|
|
||||||
Foam::sigFpe::sigFpe()
|
Foam::sigFpe::sigFpe()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ 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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
@ -256,7 +256,7 @@ void Foam::sigFpe::set(const bool verbose)
|
||||||
| _EN_OVERFL,
|
| _EN_OVERFL,
|
||||||
0,
|
0,
|
||||||
_ABORT_ON_ERROR,
|
_ABORT_ON_ERROR,
|
||||||
NULL
|
nullptr
|
||||||
);
|
);
|
||||||
|
|
||||||
# elif defined(__APPLE__)
|
# elif defined(__APPLE__)
|
||||||
|
@ -305,7 +305,7 @@ void Foam::sigFpe::set(const bool verbose)
|
||||||
|
|
||||||
# elif defined(__APPLE__)
|
# elif defined(__APPLE__)
|
||||||
|
|
||||||
if(system_malloc_!=NULL) {
|
if(system_malloc_!=nullptr) {
|
||||||
FatalErrorIn("Foam__sigFpe::set")
|
FatalErrorIn("Foam__sigFpe::set")
|
||||||
<< "system_malloc_ already reset." << endl
|
<< "system_malloc_ already reset." << endl
|
||||||
<< "This should never happen"
|
<< "This should never happen"
|
||||||
|
@ -314,7 +314,7 @@ void Foam::sigFpe::set(const bool verbose)
|
||||||
}
|
}
|
||||||
|
|
||||||
malloc_zone_t *zone = malloc_default_zone();
|
malloc_zone_t *zone = malloc_default_zone();
|
||||||
if(zone==NULL) {
|
if(zone==nullptr) {
|
||||||
FatalErrorIn("Foam__sigFpe::set")
|
FatalErrorIn("Foam__sigFpe::set")
|
||||||
<< "Could not get malloc_default_zone()." << endl
|
<< "Could not get malloc_default_zone()." << endl
|
||||||
<< "Seems like this version of Mac OS X doesn't support FOAM_SETNAN"
|
<< "Seems like this version of Mac OS X doesn't support FOAM_SETNAN"
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
@ -59,7 +59,7 @@ void Foam::sigInt::sigHandler(int)
|
||||||
|
|
||||||
Foam::sigInt::sigInt()
|
Foam::sigInt::sigInt()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +68,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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
@ -61,7 +61,7 @@ void Foam::sigQuit::sigHandler(int)
|
||||||
|
|
||||||
Foam::sigQuit::sigQuit()
|
Foam::sigQuit::sigQuit()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,7 +70,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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|
|
@ -37,7 +37,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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
@ -60,7 +60,7 @@ void Foam::sigSegv::sigHandler(int)
|
||||||
|
|
||||||
Foam::sigSegv::sigSegv()
|
Foam::sigSegv::sigSegv()
|
||||||
{
|
{
|
||||||
oldAction_.sa_handler = NULL;
|
oldAction_.sa_handler = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|
|
@ -125,7 +125,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)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue