mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use autoPtr::New and tmp::New for simple return types
This commit is contained in:
@ -100,7 +100,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<phaseModel> operator()(Istream& is) const
|
autoPtr<phaseModel> operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
return autoPtr<phaseModel>(new phaseModel(is, p_, T_));
|
return autoPtr<phaseModel>::New(is, p_, T_);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<Scalar> clone() const
|
autoPtr<Scalar> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<Scalar>(new Scalar(data_));
|
return autoPtr<Scalar>::New(data_);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream& os, const Scalar& val)
|
friend Ostream& operator<<(Ostream& os, const Scalar& val)
|
||||||
|
|||||||
@ -93,14 +93,11 @@ Foam::autoPtr<Foam::mapDistribute> Foam::smoothAlignmentSolver::buildReferredMap
|
|||||||
indices.transfer(dynIndices);
|
indices.transfer(dynIndices);
|
||||||
|
|
||||||
List<Map<label>> compactMap;
|
List<Map<label>> compactMap;
|
||||||
return autoPtr<mapDistribute>
|
return autoPtr<mapDistribute>::New
|
||||||
(
|
|
||||||
new mapDistribute
|
|
||||||
(
|
(
|
||||||
globalIndexing,
|
globalIndexing,
|
||||||
indices,
|
indices,
|
||||||
compactMap
|
compactMap
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,14 +154,11 @@ Foam::autoPtr<Foam::mapDistribute> Foam::smoothAlignmentSolver::buildMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Map<label>> compactMap;
|
List<Map<label>> compactMap;
|
||||||
return autoPtr<mapDistribute>
|
return autoPtr<mapDistribute>::New
|
||||||
(
|
|
||||||
new mapDistribute
|
|
||||||
(
|
(
|
||||||
globalIndexing,
|
globalIndexing,
|
||||||
pointPoints,
|
pointPoints,
|
||||||
compactMap
|
compactMap
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -518,39 +518,36 @@ autoPtr<mapPolyMesh> reorderMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return autoPtr<mapPolyMesh>
|
return autoPtr<mapPolyMesh>::New
|
||||||
(
|
|
||||||
new mapPolyMesh
|
|
||||||
(
|
(
|
||||||
mesh, // const polyMesh& mesh,
|
mesh, // const polyMesh& mesh,
|
||||||
mesh.nPoints(), // nOldPoints,
|
mesh.nPoints(), // nOldPoints,
|
||||||
mesh.nFaces(), // nOldFaces,
|
mesh.nFaces(), // nOldFaces,
|
||||||
mesh.nCells(), // nOldCells,
|
mesh.nCells(), // nOldCells,
|
||||||
identity(mesh.nPoints()), // pointMap,
|
identity(mesh.nPoints()), // pointMap,
|
||||||
List<objectMap>(0), // pointsFromPoints,
|
List<objectMap>(), // pointsFromPoints,
|
||||||
faceOrder, // faceMap,
|
faceOrder, // faceMap,
|
||||||
List<objectMap>(0), // facesFromPoints,
|
List<objectMap>(), // facesFromPoints,
|
||||||
List<objectMap>(0), // facesFromEdges,
|
List<objectMap>(), // facesFromEdges,
|
||||||
List<objectMap>(0), // facesFromFaces,
|
List<objectMap>(), // facesFromFaces,
|
||||||
cellOrder, // cellMap,
|
cellOrder, // cellMap,
|
||||||
List<objectMap>(0), // cellsFromPoints,
|
List<objectMap>(), // cellsFromPoints,
|
||||||
List<objectMap>(0), // cellsFromEdges,
|
List<objectMap>(), // cellsFromEdges,
|
||||||
List<objectMap>(0), // cellsFromFaces,
|
List<objectMap>(), // cellsFromFaces,
|
||||||
List<objectMap>(0), // cellsFromCells,
|
List<objectMap>(), // cellsFromCells,
|
||||||
identity(mesh.nPoints()), // reversePointMap,
|
identity(mesh.nPoints()), // reversePointMap,
|
||||||
reverseFaceOrder, // reverseFaceMap,
|
reverseFaceOrder, // reverseFaceMap,
|
||||||
reverseCellOrder, // reverseCellMap,
|
reverseCellOrder, // reverseCellMap,
|
||||||
flipFaceFlux, // flipFaceFlux,
|
flipFaceFlux, // flipFaceFlux,
|
||||||
patchPointMap, // patchPointMap,
|
patchPointMap, // patchPointMap,
|
||||||
labelListList(0), // pointZoneMap,
|
labelListList(), // pointZoneMap,
|
||||||
labelListList(0), // faceZonePointMap,
|
labelListList(), // faceZonePointMap,
|
||||||
labelListList(0), // faceZoneFaceMap,
|
labelListList(), // faceZoneFaceMap,
|
||||||
labelListList(0), // cellZoneMap,
|
labelListList(), // cellZoneMap,
|
||||||
pointField(0), // preMotionPoints,
|
pointField(), // preMotionPoints,
|
||||||
patchStarts, // oldPatchStarts,
|
patchStarts, // oldPatchStarts,
|
||||||
oldPatchNMeshPoints, // oldPatchNMeshPoints
|
oldPatchNMeshPoints, // oldPatchNMeshPoints
|
||||||
autoPtr<scalarField>() // oldCellVolumes
|
autoPtr<scalarField>() // oldCellVolumes
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -98,15 +98,12 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
|
|||||||
{
|
{
|
||||||
if (fullMatch || masterMesh.nCells() == 0)
|
if (fullMatch || masterMesh.nCells() == 0)
|
||||||
{
|
{
|
||||||
return autoPtr<faceCoupleInfo>
|
return autoPtr<faceCoupleInfo>::New
|
||||||
(
|
|
||||||
new faceCoupleInfo
|
|
||||||
(
|
(
|
||||||
masterMesh,
|
masterMesh,
|
||||||
meshToAdd,
|
meshToAdd,
|
||||||
mergeDist, // Absolute merging distance
|
mergeDist, // Absolute merging distance
|
||||||
true // Matching faces identical
|
true // Matching faces identical
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -215,9 +212,7 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
|
|||||||
}
|
}
|
||||||
addFaces.shrink();
|
addFaces.shrink();
|
||||||
|
|
||||||
return autoPtr<faceCoupleInfo>
|
return autoPtr<faceCoupleInfo>::New
|
||||||
(
|
|
||||||
new faceCoupleInfo
|
|
||||||
(
|
(
|
||||||
masterMesh,
|
masterMesh,
|
||||||
masterFaces,
|
masterFaces,
|
||||||
@ -228,7 +223,6 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
|
|||||||
false, // If perfect match are faces already ordered
|
false, // If perfect match are faces already ordered
|
||||||
// (e.g. processor patches)
|
// (e.g. processor patches)
|
||||||
false // are faces each on separate patch?
|
false // are faces each on separate patch?
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::tmp<Foam::Field<Type>> Foam::readParticleField
|
|||||||
if (obj != nullptr)
|
if (obj != nullptr)
|
||||||
{
|
{
|
||||||
IOField<Type> newField(*obj);
|
IOField<Type> newField(*obj);
|
||||||
return tmp<Field<Type>>(new Field<Type>(newField.xfer()));
|
return tmp<Field<Type>>::New(newField.xfer());
|
||||||
}
|
}
|
||||||
|
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
|
|||||||
@ -55,9 +55,7 @@ autoPtr<GeoFieldType> loadField
|
|||||||
Info<< "Reading " << GeoFieldType::typeName
|
Info<< "Reading " << GeoFieldType::typeName
|
||||||
<< ' ' << io->name() << endl;
|
<< ' ' << io->name() << endl;
|
||||||
|
|
||||||
return autoPtr<GeoFieldType>
|
return autoPtr<GeoFieldType>::New
|
||||||
(
|
|
||||||
new GeoFieldType
|
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -70,7 +68,6 @@ autoPtr<GeoFieldType> loadField
|
|||||||
io->registerObject()
|
io->registerObject()
|
||||||
),
|
),
|
||||||
mesh
|
mesh
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -244,7 +244,7 @@ tmp<volScalarField> calcNut
|
|||||||
// Correct nut
|
// Correct nut
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
|
|
||||||
return tmp<volScalarField>(new volScalarField(turbulence->nut()));
|
return tmp<volScalarField>::New(turbulence->nut());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ tmp<volScalarField> calcNut
|
|||||||
// Correct nut
|
// Correct nut
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
|
|
||||||
return tmp<volScalarField>(new volScalarField(turbulence->nut()));
|
return tmp<volScalarField>::New(turbulence->nut());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<setCellField> clone() const
|
autoPtr<setCellField> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<setCellField>(new setCellField());
|
return autoPtr<setCellField>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
class iNew
|
class iNew
|
||||||
@ -182,7 +182,7 @@ public:
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<setCellField>(new setCellField());
|
return autoPtr<setCellField>::New();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -332,7 +332,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<setFaceField> clone() const
|
autoPtr<setFaceField> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<setFaceField>(new setFaceField());
|
return autoPtr<setFaceField>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
class iNew
|
class iNew
|
||||||
@ -373,7 +373,7 @@ public:
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<setFaceField>(new setFaceField());
|
return autoPtr<setFaceField>::New();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1480,9 +1480,7 @@ autoPtr<extendedFeatureEdgeMesh> createEdgeMesh
|
|||||||
|
|
||||||
//calcFeaturePoints(inter.cutPoints(), inter.cutEdges());
|
//calcFeaturePoints(inter.cutPoints(), inter.cutEdges());
|
||||||
|
|
||||||
return autoPtr<extendedFeatureEdgeMesh>
|
return autoPtr<extendedFeatureEdgeMesh>::New
|
||||||
(
|
|
||||||
new extendedFeatureEdgeMesh
|
|
||||||
(
|
(
|
||||||
io,
|
io,
|
||||||
inter.cutPoints(),
|
inter.cutPoints(),
|
||||||
@ -1503,10 +1501,9 @@ autoPtr<extendedFeatureEdgeMesh> createEdgeMesh
|
|||||||
normalDirectionsTmp,
|
normalDirectionsTmp,
|
||||||
edgeNormalsTmp,
|
edgeNormalsTmp,
|
||||||
|
|
||||||
labelListList(0), // featurePointNormals,
|
labelListList(), // featurePointNormals,
|
||||||
labelListList(0), // featurePointEdges,
|
labelListList(), // featurePointEdges,
|
||||||
labelList(0) // regionEdges
|
labelList() // regionEdges
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,16 +86,13 @@ Foam::surfaceFeaturesExtraction::extractFromFile::features
|
|||||||
<< "Selecting edges based purely on geometric tests: "
|
<< "Selecting edges based purely on geometric tests: "
|
||||||
<< geometricTestOnly().c_str() << endl;
|
<< geometricTestOnly().c_str() << endl;
|
||||||
|
|
||||||
return autoPtr<surfaceFeatures>
|
return autoPtr<surfaceFeatures>::New
|
||||||
(
|
|
||||||
new surfaceFeatures
|
|
||||||
(
|
(
|
||||||
surf,
|
surf,
|
||||||
eMesh.points(),
|
eMesh.points(),
|
||||||
eMesh.edges(),
|
eMesh.edges(),
|
||||||
1e-6, // mergeTol
|
1e-6, // mergeTol
|
||||||
geometricTestOnly()
|
geometricTestOnly()
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Foam::surfaceFeaturesExtraction::extractFromNone::features
|
|||||||
const triSurface& surf
|
const triSurface& surf
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return autoPtr<surfaceFeatures>(new surfaceFeatures(surf));
|
return autoPtr<surfaceFeatures>::New(surf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -80,16 +80,13 @@ Foam::surfaceFeaturesExtraction::extractFromSurface::features
|
|||||||
<< "Selecting edges based purely on geometric tests: "
|
<< "Selecting edges based purely on geometric tests: "
|
||||||
<< geometricTestOnly().c_str() << endl;
|
<< geometricTestOnly().c_str() << endl;
|
||||||
|
|
||||||
return autoPtr<surfaceFeatures>
|
return autoPtr<surfaceFeatures>::New
|
||||||
(
|
|
||||||
new surfaceFeatures
|
|
||||||
(
|
(
|
||||||
surf,
|
surf,
|
||||||
includedAngle(),
|
includedAngle(),
|
||||||
0, // minLen
|
0, // minLen
|
||||||
0, // minElems
|
0, // minElems
|
||||||
geometricTestOnly()
|
geometricTestOnly()
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -418,10 +418,7 @@ public:
|
|||||||
//- Clone
|
//- Clone
|
||||||
autoPtr<dynamicIndexedOctree<Type>> clone() const
|
autoPtr<dynamicIndexedOctree<Type>> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<dynamicIndexedOctree<Type>>
|
return autoPtr<dynamicIndexedOctree<Type>>::New(*this);
|
||||||
(
|
|
||||||
new dynamicIndexedOctree<Type>(*this)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -432,10 +432,7 @@ public:
|
|||||||
//- Clone
|
//- Clone
|
||||||
autoPtr<indexedOctree<Type>> clone() const
|
autoPtr<indexedOctree<Type>> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<indexedOctree<Type>>
|
return autoPtr<indexedOctree<Type>>::New(*this);
|
||||||
(
|
|
||||||
new indexedOctree<Type>(*this)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -101,10 +101,7 @@ template<class T, class Container>
|
|||||||
inline Foam::autoPtr<Foam::CompactListList<T, Container>>
|
inline Foam::autoPtr<Foam::CompactListList<T, Container>>
|
||||||
Foam::CompactListList<T, Container>::clone() const
|
Foam::CompactListList<T, Container>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<CompactListList<T, Container>>
|
return autoPtr<CompactListList<T, Container>>::New(*this);
|
||||||
(
|
|
||||||
new CompactListList<T, Container>(*this)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,7 @@ template<class T, unsigned Size>
|
|||||||
inline Foam::autoPtr<Foam::FixedList<T, Size>>
|
inline Foam::autoPtr<Foam::FixedList<T, Size>>
|
||||||
Foam::FixedList<T, Size>::clone() const
|
Foam::FixedList<T, Size>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<FixedList<T, Size>>(new FixedList<T, Size>(*this));
|
return autoPtr<FixedList<T, Size>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -95,7 +95,7 @@ inline constexpr Foam::List<T>::List() noexcept
|
|||||||
template<class T>
|
template<class T>
|
||||||
inline Foam::autoPtr<Foam::List<T>> Foam::List<T>::clone() const
|
inline Foam::autoPtr<Foam::List<T>> Foam::List<T>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<List<T>>(new List<T>(*this));
|
return autoPtr<List<T>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ inline Foam::PackedBoolList::PackedBoolList
|
|||||||
inline Foam::autoPtr<Foam::PackedBoolList>
|
inline Foam::autoPtr<Foam::PackedBoolList>
|
||||||
Foam::PackedBoolList::clone() const
|
Foam::PackedBoolList::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<PackedBoolList>(new PackedBoolList(*this));
|
return autoPtr<PackedBoolList>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -267,7 +267,7 @@ template<unsigned nBits>
|
|||||||
inline Foam::autoPtr<Foam::PackedList<nBits>>
|
inline Foam::autoPtr<Foam::PackedList<nBits>>
|
||||||
Foam::PackedList<nBits>::clone() const
|
Foam::PackedList<nBits>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<PackedList<nBits>>(new PackedList<nBits>(*this));
|
return autoPtr<PackedList<nBits>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -279,13 +279,13 @@ public:
|
|||||||
//- Clone
|
//- Clone
|
||||||
autoPtr<IOobject> clone() const
|
autoPtr<IOobject> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<IOobject>(new IOobject(*this));
|
return autoPtr<IOobject>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Clone resetting registry
|
//- Clone resetting registry
|
||||||
autoPtr<IOobject> clone(const objectRegistry& registry) const
|
autoPtr<IOobject> clone(const objectRegistry& registry) const
|
||||||
{
|
{
|
||||||
return autoPtr<IOobject>(new IOobject(*this, registry));
|
return autoPtr<IOobject>::New(*this, registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -150,7 +150,7 @@ Foam::dictionary::dictionary
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::dictionary> Foam::dictionary::clone() const
|
Foam::autoPtr<Foam::dictionary> Foam::dictionary::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<dictionary>(new dictionary(*this));
|
return autoPtr<dictionary>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ Foam::dictionary::dictionary(Istream& is, bool keepHeader)
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::dictionary> Foam::dictionary::New(Istream& is)
|
Foam::autoPtr<Foam::dictionary> Foam::dictionary::New(Istream& is)
|
||||||
{
|
{
|
||||||
return autoPtr<dictionary>(new dictionary(is));
|
return autoPtr<dictionary>::New(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -250,7 +250,7 @@ public:
|
|||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
autoPtr<dimensionSet> clone() const
|
autoPtr<dimensionSet> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<dimensionSet>(new dimensionSet(*this));
|
return autoPtr<dimensionSet>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
|
|||||||
@ -177,7 +177,7 @@ FieldField<Field, Type>::FieldField(Istream& is)
|
|||||||
template<template<class> class Field, class Type>
|
template<template<class> class Field, class Type>
|
||||||
tmp<FieldField<Field, Type>> FieldField<Field, Type>::clone() const
|
tmp<FieldField<Field, Type>> FieldField<Field, Type>::clone() const
|
||||||
{
|
{
|
||||||
return tmp<FieldField<Field, Type>>(new FieldField<Field, Type>(*this));
|
return tmp<FieldField<Field, Type>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -348,7 +348,7 @@ Foam::Field<Type>::Field
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type>> Foam::Field<Type>::clone() const
|
Foam::tmp<Foam::Field<Type>> Foam::Field<Type>::clone() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(*this));
|
return tmp<Field<Type>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -241,7 +241,7 @@ public:
|
|||||||
template<class Type2>
|
template<class Type2>
|
||||||
static tmp<Field<Type>> NewCalculatedType(const Field<Type2>& f)
|
static tmp<Field<Type>> NewCalculatedType(const Field<Type2>& f)
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(f.size()));
|
return tmp<Field<Type>>::New(f.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ public:
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> operator()(const Field<Type>& f) const
|
tmp<Field<Type>> operator()(const Field<Type>& f) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(f, *this));
|
return tmp<Field<Type>>::New(f, *this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ Foam::pointPatchField<Type>::patchInternalField
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<Field<Type1>>(new Field<Type1>(iF, meshPoints));
|
return tmp<Field<Type1>>::New(iF, meshPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<curve> clone() const
|
autoPtr<curve> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<curve>(new curve(*this));
|
return autoPtr<curve>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,7 @@ public:
|
|||||||
|
|
||||||
static autoPtr<procLduInterface> New(Istream& is)
|
static autoPtr<procLduInterface> New(Istream& is)
|
||||||
{
|
{
|
||||||
return autoPtr<procLduInterface>(new procLduInterface(is));
|
return autoPtr<procLduInterface>::New(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -89,8 +89,7 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction
|
FatalIOErrorInFunction
|
||||||
(
|
(
|
||||||
preconditionerDict
|
preconditionerDict
|
||||||
@ -98,11 +97,7 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New
|
|||||||
"no diagonal or off-diagonal coefficient"
|
"no diagonal or off-diagonal coefficient"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
return autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>();
|
||||||
(
|
|
||||||
nullptr
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -84,17 +84,12 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(smootherDict)
|
FatalIOErrorInFunction(smootherDict)
|
||||||
<< "cannot solve incomplete matrix, no off-diagonal coefficients"
|
<< "cannot solve incomplete matrix, no off-diagonal coefficients"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>
|
return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>();
|
||||||
(
|
|
||||||
nullptr
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -99,18 +99,13 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(solverDict)
|
FatalIOErrorInFunction(solverDict)
|
||||||
<< "cannot solve incomplete matrix, "
|
<< "cannot solve incomplete matrix, "
|
||||||
"no diagonal or off-diagonal coefficient"
|
"no diagonal or off-diagonal coefficient"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return autoPtr<typename LduMatrix<Type, DType, LUType>::solver>
|
return autoPtr<typename LduMatrix<Type, DType, LUType>::solver>();
|
||||||
(
|
|
||||||
nullptr
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ template<class Form, class Type>
|
|||||||
inline Foam::autoPtr<Foam::Matrix<Form, Type>> Foam::Matrix<Form, Type>::
|
inline Foam::autoPtr<Foam::Matrix<Form, Type>> Foam::Matrix<Form, Type>::
|
||||||
clone() const
|
clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<Matrix<Form, Type>>(new Matrix<Form, Type>(*this));
|
return autoPtr<Matrix<Form, Type>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -110,10 +110,7 @@ template<class Type>
|
|||||||
inline Foam::autoPtr<Foam::RectangularMatrix<Type>>
|
inline Foam::autoPtr<Foam::RectangularMatrix<Type>>
|
||||||
Foam::RectangularMatrix<Type>::clone() const
|
Foam::RectangularMatrix<Type>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<RectangularMatrix<Type>>
|
return autoPtr<RectangularMatrix<Type>>::New(*this);
|
||||||
(
|
|
||||||
new RectangularMatrix<Type>(*this)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -148,7 +148,7 @@ template<class Type>
|
|||||||
inline Foam::autoPtr<Foam::SquareMatrix<Type>>
|
inline Foam::autoPtr<Foam::SquareMatrix<Type>>
|
||||||
Foam::SquareMatrix<Type>::clone() const
|
Foam::SquareMatrix<Type>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<SquareMatrix<Type>>(new SquareMatrix<Type>(*this));
|
return autoPtr<SquareMatrix<Type>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -88,10 +88,7 @@ template<class Type>
|
|||||||
inline Foam::autoPtr<Foam::SymmetricSquareMatrix<Type>>
|
inline Foam::autoPtr<Foam::SymmetricSquareMatrix<Type>>
|
||||||
Foam::SymmetricSquareMatrix<Type>::clone() const
|
Foam::SymmetricSquareMatrix<Type>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<SymmetricSquareMatrix<Type>>
|
return autoPtr<SymmetricSquareMatrix<Type>>::New(*this);
|
||||||
(
|
|
||||||
new SymmetricSquareMatrix<Type>(*this)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -130,8 +130,7 @@ Foam::lduMatrix::preconditioner::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction
|
FatalIOErrorInFunction
|
||||||
(
|
(
|
||||||
controls
|
controls
|
||||||
@ -140,7 +139,6 @@ Foam::lduMatrix::preconditioner::New
|
|||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return autoPtr<lduMatrix::preconditioner>();
|
return autoPtr<lduMatrix::preconditioner>();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -136,15 +136,13 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(solverControls)
|
FatalIOErrorInFunction(solverControls)
|
||||||
<< "cannot solve incomplete matrix, "
|
<< "cannot solve incomplete matrix, "
|
||||||
"no diagonal or off-diagonal coefficient"
|
"no diagonal or off-diagonal coefficient"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return autoPtr<lduMatrix::smoother>();
|
return autoPtr<lduMatrix::smoother>();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -116,15 +116,13 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(solverControls)
|
FatalIOErrorInFunction(solverControls)
|
||||||
<< "cannot solve incomplete matrix, "
|
<< "cannot solve incomplete matrix, "
|
||||||
"no diagonal or off-diagonal coefficient"
|
"no diagonal or off-diagonal coefficient"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return autoPtr<lduMatrix::solver>();
|
return autoPtr<lduMatrix::solver>();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -157,13 +157,13 @@ public:
|
|||||||
//- Return a new cellModel on free-store created from Istream
|
//- Return a new cellModel on free-store created from Istream
|
||||||
static autoPtr<cellModel> New(Istream& is)
|
static autoPtr<cellModel> New(Istream& is)
|
||||||
{
|
{
|
||||||
return autoPtr<cellModel>(new cellModel(is));
|
return autoPtr<cellModel>::New(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<cellModel> clone() const
|
autoPtr<cellModel> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<cellModel>(new cellModel(*this));
|
return autoPtr<cellModel>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ inline Foam::cellShape::cellShape(Istream& is)
|
|||||||
|
|
||||||
inline Foam::autoPtr<Foam::cellShape> Foam::cellShape::clone() const
|
inline Foam::autoPtr<Foam::cellShape> Foam::cellShape::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<cellShape>(new cellShape(*this));
|
return autoPtr<cellShape>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -498,7 +498,7 @@ Foam::mapDistribute::mapDistribute(Istream& is)
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::mapDistribute> Foam::mapDistribute::clone() const
|
Foam::autoPtr<Foam::mapDistribute> Foam::mapDistribute::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<mapDistribute>(new mapDistribute(*this));
|
return autoPtr<mapDistribute>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ Foam::autoPtr<Foam::labelIOList> Foam::polyMesh::readTetBasePtIs() const
|
|||||||
|
|
||||||
if (io.typeHeaderOk<labelIOList>(true))
|
if (io.typeHeaderOk<labelIOList>(true))
|
||||||
{
|
{
|
||||||
return autoPtr<labelIOList>(new labelIOList(io));
|
return autoPtr<labelIOList>::New(io);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<labelIOList>();
|
return autoPtr<labelIOList>();
|
||||||
|
|||||||
@ -231,7 +231,7 @@ public:
|
|||||||
//- Construct and return a clone, resetting the boundary mesh
|
//- Construct and return a clone, resetting the boundary mesh
|
||||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||||
{
|
{
|
||||||
return autoPtr<polyPatch>(new polyPatch(*this, bm));
|
return autoPtr<polyPatch>::New(*this, bm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a clone, resetting the face list
|
//- Construct and return a clone, resetting the face list
|
||||||
@ -244,10 +244,7 @@ public:
|
|||||||
const label newStart
|
const label newStart
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return autoPtr<polyPatch>
|
return autoPtr<polyPatch>::New(*this, bm, index, newSize, newStart);
|
||||||
(
|
|
||||||
new polyPatch(*this, bm, index, newSize, newStart)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a clone, resetting the face list
|
//- Construct and return a clone, resetting the face list
|
||||||
@ -260,10 +257,8 @@ public:
|
|||||||
const label newStart
|
const label newStart
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return autoPtr<polyPatch>
|
return autoPtr<polyPatch>::New
|
||||||
(
|
(*this, bm, index, mapAddressing, newStart);
|
||||||
new polyPatch(*this, bm, index, mapAddressing, newStart)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -182,10 +182,7 @@ public:
|
|||||||
//- Construct and return a clone, resetting the zone mesh
|
//- Construct and return a clone, resetting the zone mesh
|
||||||
virtual autoPtr<cellZone> clone(const cellZoneMesh& zm) const
|
virtual autoPtr<cellZone> clone(const cellZoneMesh& zm) const
|
||||||
{
|
{
|
||||||
return autoPtr<cellZone>
|
return autoPtr<cellZone>::New(*this, *this, index(), zm);
|
||||||
(
|
|
||||||
new cellZone(*this, *this, index(), zm)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a clone,
|
//- Construct and return a clone,
|
||||||
@ -197,10 +194,7 @@ public:
|
|||||||
const cellZoneMesh& zm
|
const cellZoneMesh& zm
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return autoPtr<cellZone>
|
return autoPtr<cellZone>::New(*this, addr, index, zm);
|
||||||
(
|
|
||||||
new cellZone(*this, addr, index, zm)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -228,10 +228,7 @@ public:
|
|||||||
//- Construct and return a clone, resetting the zone mesh
|
//- Construct and return a clone, resetting the zone mesh
|
||||||
virtual autoPtr<faceZone> clone(const faceZoneMesh& zm) const
|
virtual autoPtr<faceZone> clone(const faceZoneMesh& zm) const
|
||||||
{
|
{
|
||||||
return autoPtr<faceZone>
|
return autoPtr<faceZone>::New(*this, *this, flipMap(), index(), zm);
|
||||||
(
|
|
||||||
new faceZone(*this, *this, flipMap(), index(), zm)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a clone,
|
//- Construct and return a clone,
|
||||||
@ -244,10 +241,7 @@ public:
|
|||||||
const faceZoneMesh& zm
|
const faceZoneMesh& zm
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return autoPtr<faceZone>
|
return autoPtr<faceZone>::New(*this, addr, fm, index, zm);
|
||||||
(
|
|
||||||
new faceZone(*this, addr, fm, index, zm)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -183,10 +183,7 @@ public:
|
|||||||
//- Construct and return a clone, resetting the zone mesh
|
//- Construct and return a clone, resetting the zone mesh
|
||||||
virtual autoPtr<pointZone> clone(const pointZoneMesh& zm) const
|
virtual autoPtr<pointZone> clone(const pointZoneMesh& zm) const
|
||||||
{
|
{
|
||||||
return autoPtr<pointZone>
|
return autoPtr<pointZone>::New(*this, *this, index(), zm);
|
||||||
(
|
|
||||||
new pointZone(*this, *this, index(), zm)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a clone, resetting the point list
|
//- Construct and return a clone, resetting the point list
|
||||||
@ -198,10 +195,7 @@ public:
|
|||||||
const labelUList& addr
|
const labelUList& addr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return autoPtr<pointZone>
|
return autoPtr<pointZone>::New(*this, addr, index, zm);
|
||||||
(
|
|
||||||
new pointZone(*this, addr, index, zm)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ Foam::tmp<Foam::Field<Type>> Foam::Function1Types::Constant<Type>::value
|
|||||||
const scalarField& x
|
const scalarField& x
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(x.size(), value_));
|
return tmp<Field<Type>>::New(x.size(), value_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ Foam::tmp<Foam::Field<Type>> Foam::Function1Types::OneConstant<Type>::value
|
|||||||
const scalarField& x
|
const scalarField& x
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(x.size(), pTraits<Type>::one));
|
return tmp<Field<Type>>::New(x.size(), pTraits<Type>::one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ Foam::Function1Types::Constant<Foam::label>::integrate
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
return tmp<Field<label>>(new Field<label>(x1.size()));
|
return tmp<Field<label>>::New(x1.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace Foam
|
|||||||
|
|
||||||
tmp<scalarField> nutLowReWallFunctionFvPatchScalarField::calcNut() const
|
tmp<scalarField> nutLowReWallFunctionFvPatchScalarField::calcNut() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new scalarField(patch().size(), 0.0));
|
return tmp<scalarField>::New(patch().size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -377,7 +377,7 @@ Foam::ccm::reader::readField
|
|||||||
|| !fieldTable_.found(fieldName)
|
|| !fieldTable_.found(fieldName)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new Field<scalar>());
|
return tmp<scalarField>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMIODataLocation requestedLocation = kCCMIOCell;
|
CCMIODataLocation requestedLocation = kCCMIOCell;
|
||||||
@ -395,7 +395,7 @@ Foam::ccm::reader::readField
|
|||||||
// we can skip empty fields immediately
|
// we can skip empty fields immediately
|
||||||
if (!maxId)
|
if (!maxId)
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new Field<scalar>());
|
return tmp<scalarField>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
char shortName[kCCMIOProstarShortNameLength+1];
|
char shortName[kCCMIOProstarShortNameLength+1];
|
||||||
|
|||||||
@ -75,7 +75,7 @@ Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index)
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::boundaryPatch> Foam::boundaryPatch::clone() const
|
Foam::autoPtr<Foam::boundaryPatch> Foam::boundaryPatch::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<boundaryPatch>(new boundaryPatch(*this));
|
return autoPtr<boundaryPatch>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3204,9 +3204,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
|
|||||||
|
|
||||||
labelHashSet flipFaceFluxSet(getSetIndices(flipFaceFlux_));
|
labelHashSet flipFaceFluxSet(getSetIndices(flipFaceFlux_));
|
||||||
|
|
||||||
return autoPtr<mapPolyMesh>
|
return autoPtr<mapPolyMesh>::New
|
||||||
(
|
|
||||||
new mapPolyMesh
|
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
nOldPoints,
|
nOldPoints,
|
||||||
@ -3248,7 +3246,6 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
|
|||||||
oldCellVolumes,
|
oldCellVolumes,
|
||||||
|
|
||||||
true // steal storage.
|
true // steal storage.
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// At this point all member DynamicList (pointMap_, cellMap_ etc.) will
|
// At this point all member DynamicList (pointMap_, cellMap_ etc.) will
|
||||||
@ -3498,9 +3495,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
|
|||||||
|
|
||||||
labelHashSet flipFaceFluxSet(getSetIndices(flipFaceFlux_));
|
labelHashSet flipFaceFluxSet(getSetIndices(flipFaceFlux_));
|
||||||
|
|
||||||
return autoPtr<mapPolyMesh>
|
return autoPtr<mapPolyMesh>::New
|
||||||
(
|
|
||||||
new mapPolyMesh
|
|
||||||
(
|
(
|
||||||
newMesh,
|
newMesh,
|
||||||
nOldPoints,
|
nOldPoints,
|
||||||
@ -3540,7 +3535,6 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
|
|||||||
oldPatchNMeshPoints,
|
oldPatchNMeshPoints,
|
||||||
oldCellVolumes,
|
oldCellVolumes,
|
||||||
true // steal storage.
|
true // steal storage.
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// At this point all member DynamicList (pointMap_, cellMap_ etc.) will
|
// At this point all member DynamicList (pointMap_, cellMap_ etc.) will
|
||||||
|
|||||||
@ -105,7 +105,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<ignitionSite> operator()(Istream& is) const
|
autoPtr<ignitionSite> operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
return autoPtr<ignitionSite>(new ignitionSite(is, db_, mesh_));
|
return autoPtr<ignitionSite>::New(is, db_, mesh_);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ public:
|
|||||||
//- Clone
|
//- Clone
|
||||||
autoPtr<ignitionSite> clone() const
|
autoPtr<ignitionSite> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<ignitionSite>(new ignitionSite(*this));
|
return autoPtr<ignitionSite>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -337,7 +337,7 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchPointNormals() const
|
|||||||
{
|
{
|
||||||
if (ngbPolyPatchIndex() == -1)
|
if (ngbPolyPatchIndex() == -1)
|
||||||
{
|
{
|
||||||
return tmp<vectorField>(new vectorField());
|
return tmp<vectorField>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
const labelListList& pntEdges = pointEdges();
|
const labelListList& pntEdges = pointEdges();
|
||||||
|
|||||||
@ -196,10 +196,9 @@ public:
|
|||||||
const label ngbPolyPatchIndex
|
const label ngbPolyPatchIndex
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return autoPtr<faPatch>
|
return
|
||||||
(
|
autoPtr<faPatch>::New
|
||||||
new faPatch(name(), edgeLabels, index, bm, ngbPolyPatchIndex)
|
(name(), edgeLabels, index, bm, ngbPolyPatchIndex);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ template<>
|
|||||||
Foam::tmp<Foam::scalarField>
|
Foam::tmp<Foam::scalarField>
|
||||||
Foam::basicSymmetryFaPatchField<Foam::scalar>::snGrad() const
|
Foam::basicSymmetryFaPatchField<Foam::scalar>::snGrad() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new scalarField(size(), 0.0));
|
return tmp<scalarField>::New(size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -146,7 +146,7 @@ Foam::fixedGradientFaPatchField<Type>::valueInternalCoeffs
|
|||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(this->size(), pTraits<Type>::one));
|
return tmp<Field<Type>>::New(this->size(), pTraits<Type>::one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -165,10 +165,7 @@ template<class Type>
|
|||||||
Foam::tmp<Foam::Field<Type>>
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
Foam::fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>
|
return tmp<Field<Type>>::New(this->size(), pTraits<Type>::zero);
|
||||||
(
|
|
||||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ template<>
|
|||||||
Foam::tmp<Foam::scalarField>
|
Foam::tmp<Foam::scalarField>
|
||||||
Foam::transformFaPatchField<Foam::scalar>::gradientInternalCoeffs() const
|
Foam::transformFaPatchField<Foam::scalar>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new scalarField(size(), 0.0));
|
return tmp<scalarField>::New(size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -165,7 +165,7 @@ public:
|
|||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
@ -175,21 +175,21 @@ public:
|
|||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
tmp<Field<Type>> gradientInternalCoeffs() const
|
tmp<Field<Type>> gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
tmp<Field<Type>> gradientBoundaryCoeffs() const
|
tmp<Field<Type>> gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ template<>
|
|||||||
Foam::tmp<Foam::scalarField>
|
Foam::tmp<Foam::scalarField>
|
||||||
Foam::wedgeFaPatchField<Foam::scalar>::snGrad() const
|
Foam::wedgeFaPatchField<Foam::scalar>::snGrad() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new scalarField(size(), 0.0));
|
return tmp<scalarField>::New(size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ template<>
|
|||||||
Foam::tmp<Foam::scalarField>
|
Foam::tmp<Foam::scalarField>
|
||||||
Foam::basicSymmetryFvPatchField<Foam::scalar>::snGrad() const
|
Foam::basicSymmetryFvPatchField<Foam::scalar>::snGrad() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField >(new scalarField(size(), 0.0));
|
return tmp<scalarField>::New(size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -155,7 +155,7 @@ Foam::fixedGradientFvPatchField<Type>::valueInternalCoeffs
|
|||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(this->size(), pTraits<Type>::one));
|
return tmp<Field<Type>>::New(this->size(), pTraits<Type>::one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -174,10 +174,7 @@ template<class Type>
|
|||||||
Foam::tmp<Foam::Field<Type>>
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::fixedGradientFvPatchField<Type>::gradientInternalCoeffs() const
|
Foam::fixedGradientFvPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>
|
return tmp<Field<Type>>::New(this->size(), Zero);
|
||||||
(
|
|
||||||
new Field<Type>(this->size(), Zero)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Foam::transformFvPatchField<Foam::scalar>::valueInternalCoeffs
|
|||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new scalarField(size(), 1.0));
|
return tmp<scalarField>::New(size(), 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ template<>
|
|||||||
Foam::tmp<Foam::scalarField>
|
Foam::tmp<Foam::scalarField>
|
||||||
Foam::transformFvPatchField<Foam::scalar>::gradientInternalCoeffs() const
|
Foam::transformFvPatchField<Foam::scalar>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField>(new scalarField(size(), 0.0));
|
return tmp<scalarField>::New(size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -170,7 +170,7 @@ public:
|
|||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
@ -180,21 +180,21 @@ public:
|
|||||||
const tmp<scalarField>&
|
const tmp<scalarField>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
tmp<Field<Type>> gradientInternalCoeffs() const
|
tmp<Field<Type>> gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the matrix source coefficients corresponding to the
|
//- Return the matrix source coefficients corresponding to the
|
||||||
// evaluation of the gradient of this patchField
|
// evaluation of the gradient of this patchField
|
||||||
tmp<Field<Type>> gradientBoundaryCoeffs() const
|
tmp<Field<Type>> gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ template<>
|
|||||||
Foam::tmp<Foam::scalarField>
|
Foam::tmp<Foam::scalarField>
|
||||||
Foam::symmetryPlaneFvPatchField<Foam::scalar>::snGrad() const
|
Foam::symmetryPlaneFvPatchField<Foam::scalar>::snGrad() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField >(new scalarField(size(), 0.0));
|
return tmp<scalarField>::New(size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace Foam
|
|||||||
template<>
|
template<>
|
||||||
tmp<scalarField> wedgeFvPatchField<scalar>::snGrad() const
|
tmp<scalarField> wedgeFvPatchField<scalar>::snGrad() const
|
||||||
{
|
{
|
||||||
return tmp<scalarField >(new scalarField(size(), 0.0));
|
return tmp<scalarField>::New(size(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -219,7 +219,7 @@ public:
|
|||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<fvPatchField<Type>> clone() const
|
virtual tmp<fvPatchField<Type>> clone() const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchField<Type>>(new fvPatchField<Type>(*this));
|
return tmp<fvPatchField<Type>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
@ -235,7 +235,7 @@ public:
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchField<Type>>(new fvPatchField<Type>(*this, iF));
|
return tmp<fvPatchField<Type>>::New(*this, iF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -185,7 +185,7 @@ public:
|
|||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<fvsPatchField<Type>> clone() const
|
virtual tmp<fvsPatchField<Type>> clone() const
|
||||||
{
|
{
|
||||||
return tmp<fvsPatchField<Type>>(new fvsPatchField<Type>(*this));
|
return tmp<fvsPatchField<Type>>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct as copy setting internal field reference
|
//- Construct as copy setting internal field reference
|
||||||
@ -201,10 +201,7 @@ public:
|
|||||||
const DimensionedField<Type, surfaceMesh>& iF
|
const DimensionedField<Type, surfaceMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<fvsPatchField<Type>>
|
return tmp<fvsPatchField<Type>>::New(*this, iF);
|
||||||
(
|
|
||||||
new fvsPatchField<Type>(*this, iF)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -221,9 +221,7 @@ Foam::cellToCellStencil::allCoupledFacesPatch() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<indirectPrimitivePatch>
|
return autoPtr<indirectPrimitivePatch>::New
|
||||||
(
|
|
||||||
new indirectPrimitivePatch
|
|
||||||
(
|
(
|
||||||
IndirectList<face>
|
IndirectList<face>
|
||||||
(
|
(
|
||||||
@ -231,7 +229,6 @@ Foam::cellToCellStencil::allCoupledFacesPatch() const
|
|||||||
coupledFaces
|
coupledFaces
|
||||||
),
|
),
|
||||||
mesh().points()
|
mesh().points()
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -222,9 +222,7 @@ Foam::cellToFaceStencil::allCoupledFacesPatch() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<indirectPrimitivePatch>
|
return autoPtr<indirectPrimitivePatch>::New
|
||||||
(
|
|
||||||
new indirectPrimitivePatch
|
|
||||||
(
|
(
|
||||||
IndirectList<face>
|
IndirectList<face>
|
||||||
(
|
(
|
||||||
@ -232,7 +230,6 @@ Foam::cellToFaceStencil::allCoupledFacesPatch() const
|
|||||||
coupledFaces
|
coupledFaces
|
||||||
),
|
),
|
||||||
mesh().points()
|
mesh().points()
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ Foam::tmp<Foam::labelField> Foam::regionCoupledFvPatch::internalFieldTransfer
|
|||||||
return neighbFvPatch().patchInternalField(iF);
|
return neighbFvPatch().patchInternalField(iF);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<labelField>(new labelField(iF.size(), 0));
|
return tmp<labelField>::New(iF.size(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,8 @@ internalFieldTransfer
|
|||||||
return neighbFvPatch().patchInternalField(iF);
|
return neighbFvPatch().patchInternalField(iF);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<labelField>(new labelField(iF.size(), 0));
|
return tmp<labelField>::New(iF.size(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -136,7 +136,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::getFieldValues
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<Field<Type>>(new Field<Type>(0));
|
return tmp<Field<Type>>::New();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ Foam::functionObjects::fieldValues::volFieldValue::getFieldValues
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<Field<Type>>(new Field<Type>(0.0));
|
return tmp<Field<Type>>::New(Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ Foam::functionObjects::fieldValues::volFieldValue::filterField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return tmp<Field<Type>>(new Field<Type>(field, cellIDs()));
|
return tmp<Field<Type>>::New(field, cellIDs());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::rho(const label patchi) const
|
|||||||
if (rhoName_ == "rhoInf")
|
if (rhoName_ == "rhoInf")
|
||||||
{
|
{
|
||||||
const label n = mesh_.boundary()[patchi].size();
|
const label n = mesh_.boundary()[patchi].size();
|
||||||
return tmp<Field<scalar>>(new Field<scalar>(n, rhoRef_));
|
return tmp<Field<scalar>>::New(n, rhoRef_);
|
||||||
}
|
}
|
||||||
else if (mesh_.foundObject<volScalarField>(rhoName_, false))
|
else if (mesh_.foundObject<volScalarField>(rhoName_, false))
|
||||||
{
|
{
|
||||||
@ -77,7 +77,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cp(const label patchi) const
|
|||||||
if (CpName_ == "CpInf")
|
if (CpName_ == "CpInf")
|
||||||
{
|
{
|
||||||
const label n = mesh_.boundary()[patchi].size();
|
const label n = mesh_.boundary()[patchi].size();
|
||||||
return tmp<Field<scalar>>(new Field<scalar>(n, CpRef_));
|
return tmp<Field<scalar>>::New(n, CpRef_);
|
||||||
}
|
}
|
||||||
else if (mesh_.foundObject<fluidThermo>(fluidThermo::typeName))
|
else if (mesh_.foundObject<fluidThermo>(fluidThermo::typeName))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -111,9 +111,7 @@ Foam::functionObjects::streamLineBase::wallPatch() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<indirectPrimitivePatch>
|
return autoPtr<indirectPrimitivePatch>::New
|
||||||
(
|
|
||||||
new indirectPrimitivePatch
|
|
||||||
(
|
(
|
||||||
IndirectList<face>
|
IndirectList<face>
|
||||||
(
|
(
|
||||||
@ -121,7 +119,6 @@ Foam::functionObjects::streamLineBase::wallPatch() const
|
|||||||
addressing
|
addressing
|
||||||
),
|
),
|
||||||
mesh_.points()
|
mesh_.points()
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -170,7 +170,7 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<labelField>(new labelField(finalAgglom));
|
return tmp<labelField>::New(finalAgglom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ Foam::motionInterpolation::motionInterpolation
|
|||||||
Foam::autoPtr<Foam::motionInterpolation>
|
Foam::autoPtr<Foam::motionInterpolation>
|
||||||
Foam::motionInterpolation::New(const fvMesh& mesh)
|
Foam::motionInterpolation::New(const fvMesh& mesh)
|
||||||
{
|
{
|
||||||
return autoPtr<motionInterpolation>(new motionInterpolation(mesh));
|
return autoPtr<motionInterpolation>::New(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -441,10 +441,7 @@ Foam::tmp<Foam::vectorField> Foam::fv::rotorDiskSource::inflowVelocity
|
|||||||
case ifFixed:
|
case ifFixed:
|
||||||
case ifSurfaceNormal:
|
case ifSurfaceNormal:
|
||||||
{
|
{
|
||||||
return tmp<vectorField>
|
return tmp<vectorField>::New(mesh_.nCells(), inletVelocity_);
|
||||||
(
|
|
||||||
new vectorField(mesh_.nCells(), inletVelocity_)
|
|
||||||
);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -461,7 +458,7 @@ Foam::tmp<Foam::vectorField> Foam::fv::rotorDiskSource::inflowVelocity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<vectorField>(new vectorField(mesh_.nCells(), Zero));
|
return tmp<vectorField>::New(mesh_.nCells(), Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -419,7 +419,7 @@ public:
|
|||||||
//- Construct a clone
|
//- Construct a clone
|
||||||
virtual autoPtr<particle> clone() const
|
virtual autoPtr<particle> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<particle>(new particle(*this));
|
return autoPtr<particle>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Factory class to read-construct particles used for
|
//- Factory class to read-construct particles used for
|
||||||
@ -437,7 +437,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<particle> operator()(Istream& is) const
|
autoPtr<particle> operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
return autoPtr<particle>(new particle(mesh_, is, true));
|
return autoPtr<particle>::New(mesh_, is, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -447,7 +447,7 @@ Foam::KinematicCloud<CloudType>::SU(volVectorField& U) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<fvVectorMatrix>(new fvVectorMatrix(U, dimForce));
|
return tmp<fvVectorMatrix>::New(U, dimForce);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<fvScalarMatrix>(new fvScalarMatrix(Yi, dimMass/dimTime));
|
return tmp<fvScalarMatrix>::New(Yi, dimMass/dimTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<fvScalarMatrix>(new fvScalarMatrix(rho, dimMass/dimTime));
|
return tmp<fvScalarMatrix>::New(rho, dimMass/dimTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -255,7 +255,7 @@ Foam::ThermoCloud<CloudType>::Sh(volScalarField& hs) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp<fvScalarMatrix>(new fvScalarMatrix(hs, dimEnergy/dimTime));
|
return tmp<fvScalarMatrix>::New(hs, dimEnergy/dimTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -301,7 +301,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<molecule> operator()(Istream& is) const
|
autoPtr<molecule> operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
return autoPtr<molecule>(new molecule(mesh_, is, true));
|
return autoPtr<molecule>::New(mesh_, is, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -53,9 +53,7 @@ Foam::lumpedPointIOMovement::New
|
|||||||
label ownerId
|
label ownerId
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return autoPtr<lumpedPointIOMovement>
|
return autoPtr<lumpedPointIOMovement>::New
|
||||||
(
|
|
||||||
new lumpedPointIOMovement
|
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -67,7 +65,6 @@ Foam::lumpedPointIOMovement::New
|
|||||||
true // register object
|
true // register object
|
||||||
),
|
),
|
||||||
ownerId // tag this patch as owner too
|
ownerId // tag this patch as owner too
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,9 +46,7 @@ namespace Foam
|
|||||||
Info<< "Reading " << GeoFieldType::typeName
|
Info<< "Reading " << GeoFieldType::typeName
|
||||||
<< ' ' << io->name() << endl;
|
<< ' ' << io->name() << endl;
|
||||||
|
|
||||||
return autoPtr<GeoFieldType>
|
return autoPtr<GeoFieldType>::New
|
||||||
(
|
|
||||||
new GeoFieldType
|
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -61,7 +59,6 @@ namespace Foam
|
|||||||
io->registerObject()
|
io->registerObject()
|
||||||
),
|
),
|
||||||
mesh
|
mesh
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -92,15 +92,13 @@ Foam::autoPtr<Foam::blockVertex> Foam::blockVertex::New
|
|||||||
|
|
||||||
return autoPtr<blockVertex>(cstrIter()(dict, index, geometry, is));
|
return autoPtr<blockVertex>(cstrIter()(dict, index, geometry, is));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(is)
|
FatalIOErrorInFunction(is)
|
||||||
<< "incorrect first token, expected <word> or '(', found "
|
<< "incorrect first token, expected <word> or '(', found "
|
||||||
<< firstToken.info()
|
<< firstToken.info()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return autoPtr<blockVertex>();
|
return autoPtr<blockVertex>();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,28 +78,15 @@ Foam::autoPtr<Foam::block> Foam::block::New
|
|||||||
|
|
||||||
const word blockOrCellShapeType(is);
|
const word blockOrCellShapeType(is);
|
||||||
|
|
||||||
auto cstrIter = IstreamConstructorTablePtr_->cfind(blockOrCellShapeType);
|
auto cstr = IstreamConstructorTablePtr_->cfind(blockOrCellShapeType);
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstr.found())
|
||||||
{
|
{
|
||||||
is.putBack(token(blockOrCellShapeType));
|
is.putBack(token(blockOrCellShapeType));
|
||||||
return autoPtr<block>(new block(dict, index, points, edges, faces, is));
|
return autoPtr<block>::New(dict, index, points, edges, faces, is);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return autoPtr<block>
|
|
||||||
(
|
|
||||||
cstrIter()
|
|
||||||
(
|
|
||||||
dict,
|
|
||||||
index,
|
|
||||||
points,
|
|
||||||
edges,
|
|
||||||
faces,
|
|
||||||
is
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return autoPtr<block>(cstr()(dict, index, points, edges, faces, is));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -88,7 +88,7 @@ Foam::displacementMeshMoverMotionSolver::curPoints() const
|
|||||||
{
|
{
|
||||||
// Return actual points. Cannot do a reference since complains about
|
// Return actual points. Cannot do a reference since complains about
|
||||||
// assignment to self in polyMesh::movePoints
|
// assignment to self in polyMesh::movePoints
|
||||||
return tmp<pointField>(new pointField(mesh().points()));
|
return tmp<pointField>::New(mesh().points());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -103,13 +103,10 @@ Foam::externalDisplacementMeshMover::getPatch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<indirectPrimitivePatch>
|
return autoPtr<indirectPrimitivePatch>::New
|
||||||
(
|
|
||||||
new indirectPrimitivePatch
|
|
||||||
(
|
(
|
||||||
IndirectList<face>(mesh.faces(), addressing),
|
IndirectList<face>(mesh.faces(), addressing),
|
||||||
mesh.points()
|
mesh.points()
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1648,13 +1648,10 @@ Foam::autoPtr<Foam::indirectPrimitivePatch> Foam::meshRefinement::makePatch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<indirectPrimitivePatch>
|
return autoPtr<indirectPrimitivePatch>::New
|
||||||
(
|
|
||||||
new indirectPrimitivePatch
|
|
||||||
(
|
(
|
||||||
IndirectList<face>(mesh.faces(), addressing),
|
IndirectList<face>(mesh.faces(), addressing),
|
||||||
mesh.points()
|
mesh.points()
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -137,7 +137,7 @@ public:
|
|||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<surfaceZonesInfo> clone() const
|
autoPtr<surfaceZonesInfo> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<surfaceZonesInfo>(new surfaceZonesInfo(*this));
|
return autoPtr<surfaceZonesInfo>::New(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -160,7 +160,7 @@ public:
|
|||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
autoPtr<particle> clone() const
|
autoPtr<particle> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<particle>(new trackedParticle(*this));
|
return autoPtr<particle>::NewFrom<trackedParticle>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Factory class to read-construct particles used for
|
//- Factory class to read-construct particles used for
|
||||||
@ -178,10 +178,7 @@ public:
|
|||||||
|
|
||||||
autoPtr<trackedParticle> operator()(Istream& is) const
|
autoPtr<trackedParticle> operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
return autoPtr<trackedParticle>
|
return autoPtr<trackedParticle>::New(mesh_, is, true);
|
||||||
(
|
|
||||||
new trackedParticle(mesh_, is, true)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -179,7 +179,7 @@ public:
|
|||||||
//- Construct and return a clone, resetting the boundary mesh
|
//- Construct and return a clone, resetting the boundary mesh
|
||||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||||
{
|
{
|
||||||
return autoPtr<polyPatch>(new cyclicACMIPolyPatch(*this, bm));
|
return autoPtr<polyPatch>::NewFrom<cyclicACMIPolyPatch>(*this, bm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a clone, resetting the face list
|
//- Construct and return a clone, resetting the face list
|
||||||
|
|||||||
@ -220,7 +220,7 @@ public:
|
|||||||
//- Construct and return a clone, resetting the boundary mesh
|
//- Construct and return a clone, resetting the boundary mesh
|
||||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||||
{
|
{
|
||||||
return autoPtr<polyPatch>(new cyclicAMIPolyPatch(*this, bm));
|
return autoPtr<polyPatch>::NewFrom<cyclicAMIPolyPatch>(*this, bm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Construct and return a clone, resetting the face list
|
//- Construct and return a clone, resetting the face list
|
||||||
|
|||||||
@ -138,13 +138,9 @@ public:
|
|||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<coordinateRotation> clone() const
|
autoPtr<coordinateRotation> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<coordinateRotation>
|
return
|
||||||
(
|
autoPtr<coordinateRotation>::NewFrom
|
||||||
new EulerCoordinateRotation
|
<EulerCoordinateRotation>(*this);
|
||||||
(
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user