mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
STYLE: prefer autoPtr::reset() to autoPtr::set()
- in most cases already checked valid() so don't need additional check for setting an existing pointer
This commit is contained in:
@ -29,8 +29,10 @@ volVectorField U
|
||||
#include "createPhi.H"
|
||||
|
||||
// Creating e based thermo
|
||||
autoPtr<twoPhaseMixtureEThermo> thermo;
|
||||
thermo.set(new twoPhaseMixtureEThermo(U, phi));
|
||||
autoPtr<twoPhaseMixtureEThermo> thermo
|
||||
(
|
||||
new twoPhaseMixtureEThermo(U, phi)
|
||||
);
|
||||
|
||||
// Create mixture and
|
||||
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n" << endl;
|
||||
|
||||
@ -49,7 +49,7 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::ThermoPhaseModel
|
||||
{
|
||||
if (createThermo)
|
||||
{
|
||||
thermoPtr_.set
|
||||
thermoPtr_.reset
|
||||
(
|
||||
ThermoType::New(fluid.mesh(), this->name()).ptr()
|
||||
);
|
||||
|
||||
@ -76,7 +76,7 @@ Foam::BlendedInterfacialModel<modelType>::BlendedInterfacialModel
|
||||
{
|
||||
if (modelTable.found(pair_))
|
||||
{
|
||||
model_.set
|
||||
model_.reset
|
||||
(
|
||||
modelType::New
|
||||
(
|
||||
@ -88,7 +88,7 @@ Foam::BlendedInterfacialModel<modelType>::BlendedInterfacialModel
|
||||
|
||||
if (modelTable.found(pair1In2_))
|
||||
{
|
||||
model1In2_.set
|
||||
model1In2_.reset
|
||||
(
|
||||
modelType::New
|
||||
(
|
||||
@ -100,7 +100,7 @@ Foam::BlendedInterfacialModel<modelType>::BlendedInterfacialModel
|
||||
|
||||
if (modelTable.found(pair2In1_))
|
||||
{
|
||||
model2In1_.set
|
||||
model2In1_.reset
|
||||
(
|
||||
modelType::New
|
||||
(
|
||||
|
||||
@ -41,7 +41,7 @@ Foam::orderedPhasePair::orderedPhasePair
|
||||
{
|
||||
if (aspectRatioTable.found(*this))
|
||||
{
|
||||
aspectRatio_.set
|
||||
aspectRatio_.reset
|
||||
(
|
||||
aspectRatioModel::New
|
||||
(
|
||||
|
||||
@ -132,7 +132,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
phasePair::scalarTable sigmaTable(lookup("sigma"));
|
||||
phasePair::dictTable aspectRatioTable(lookup("aspectRatio"));
|
||||
|
||||
pair_.set
|
||||
pair_.reset
|
||||
(
|
||||
new phasePair
|
||||
(
|
||||
@ -143,7 +143,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
)
|
||||
);
|
||||
|
||||
pair1In2_.set
|
||||
pair1In2_.reset
|
||||
(
|
||||
new orderedPhasePair
|
||||
(
|
||||
@ -155,7 +155,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
)
|
||||
);
|
||||
|
||||
pair2In1_.set
|
||||
pair2In1_.reset
|
||||
(
|
||||
new orderedPhasePair
|
||||
(
|
||||
@ -170,7 +170,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
|
||||
// Models
|
||||
|
||||
drag_.set
|
||||
drag_.reset
|
||||
(
|
||||
new BlendedInterfacialModel<dragModel>
|
||||
(
|
||||
@ -187,7 +187,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
)
|
||||
);
|
||||
|
||||
virtualMass_.set
|
||||
virtualMass_.reset
|
||||
(
|
||||
new BlendedInterfacialModel<virtualMassModel>
|
||||
(
|
||||
@ -203,7 +203,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
)
|
||||
);
|
||||
|
||||
heatTransfer_.set
|
||||
heatTransfer_.reset
|
||||
(
|
||||
new BlendedInterfacialModel<heatTransferModel>
|
||||
(
|
||||
@ -219,7 +219,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
)
|
||||
);
|
||||
|
||||
lift_.set
|
||||
lift_.reset
|
||||
(
|
||||
new BlendedInterfacialModel<liftModel>
|
||||
(
|
||||
@ -235,7 +235,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
)
|
||||
);
|
||||
|
||||
wallLubrication_.set
|
||||
wallLubrication_.reset
|
||||
(
|
||||
new BlendedInterfacialModel<wallLubricationModel>
|
||||
(
|
||||
@ -251,7 +251,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
)
|
||||
);
|
||||
|
||||
turbulentDispersion_.set
|
||||
turbulentDispersion_.reset
|
||||
(
|
||||
new BlendedInterfacialModel<turbulentDispersionModel>
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user