mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: avoid autoPtr copy assignment and implicit casting
This commit is contained in:
@ -593,8 +593,6 @@ void Foam::radiation::laserDTRM::calculate()
|
|||||||
|
|
||||||
labelField reflectingCells(mesh_.nCells(), -1);
|
labelField reflectingCells(mesh_.nCells(), -1);
|
||||||
|
|
||||||
autoPtr<interpolationCellPoint<vector>> nHatIntrPtr;
|
|
||||||
|
|
||||||
UPtrList<reflectionModel> reflectionUPtr;
|
UPtrList<reflectionModel> reflectionUPtr;
|
||||||
|
|
||||||
if (reflectionSwitch_)
|
if (reflectionSwitch_)
|
||||||
@ -653,10 +651,7 @@ void Foam::radiation::laserDTRM::calculate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nHatIntrPtr.reset
|
interpolationCellPoint<vector> nHatInterp(nHat);
|
||||||
(
|
|
||||||
new interpolationCellPoint<vector>(nHat)
|
|
||||||
);
|
|
||||||
|
|
||||||
DTRMParticle::trackingData td
|
DTRMParticle::trackingData td
|
||||||
(
|
(
|
||||||
@ -665,7 +660,7 @@ void Foam::radiation::laserDTRM::calculate()
|
|||||||
eInterp,
|
eInterp,
|
||||||
EInterp,
|
EInterp,
|
||||||
TInterp,
|
TInterp,
|
||||||
nHatIntrPtr,
|
nHatInterp,
|
||||||
reflectingCells,
|
reflectingCells,
|
||||||
reflectionUPtr,
|
reflectionUPtr,
|
||||||
Q_
|
Q_
|
||||||
|
|||||||
@ -1754,7 +1754,7 @@ int main(int argc, char *argv[])
|
|||||||
distributor,
|
distributor,
|
||||||
globalToMasterPatch,
|
globalToMasterPatch,
|
||||||
globalToSlavePatch,
|
globalToSlavePatch,
|
||||||
setFormatter,
|
setFormatter(),
|
||||||
dryRun
|
dryRun
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -288,7 +288,7 @@ void Foam::AMIInterpolation::agglomerate
|
|||||||
// Agglomerate weights and indices
|
// Agglomerate weights and indices
|
||||||
if (targetMapPtr)
|
if (targetMapPtr)
|
||||||
{
|
{
|
||||||
const mapDistribute& map = targetMapPtr();
|
const mapDistribute& map = *targetMapPtr;
|
||||||
|
|
||||||
// Get all restriction addressing.
|
// Get all restriction addressing.
|
||||||
labelList allRestrict(targetRestrictAddressing);
|
labelList allRestrict(targetRestrictAddressing);
|
||||||
@ -828,8 +828,8 @@ void Foam::AMIInterpolation::reset
|
|||||||
tgtWeightsSum_[facei] = sum(tgtWeights_[facei]);
|
tgtWeightsSum_[facei] = sum(tgtWeights_[facei]);
|
||||||
}
|
}
|
||||||
|
|
||||||
srcMapPtr_ = srcToTgtMap;
|
srcMapPtr_ = std::move(srcToTgtMap);
|
||||||
tgtMapPtr_ = tgtToSrcMap;
|
tgtMapPtr_ = std::move(tgtToSrcMap);
|
||||||
|
|
||||||
upToDate_ = true;
|
upToDate_ = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,8 +107,9 @@ Foam::rawIOField<Type>::rawIOField(const IOobject& io, const bool readAverage)
|
|||||||
{
|
{
|
||||||
if (io.readOpt() != IOobject::READ_IF_PRESENT)
|
if (io.readOpt() != IOobject::READ_IF_PRESENT)
|
||||||
{
|
{
|
||||||
FatalIOErrorInFunction(isPtr)
|
FatalIOErrorInFunction(*isPtr)
|
||||||
<< "Trying to read raw field" << exit(FatalIOError);
|
<< "Trying to read raw field" << endl
|
||||||
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user