tmp< T > Class Template Reference

A class for managing temporary objects. More...

Inheritance diagram for tmp< T >:
[legend]

Public Types

typedef T element_type
 Type of object being managed or referenced. More...
 
typedef Tpointer
 Pointer to type of object being managed or referenced. More...
 
typedef Foam::refCount refCount
 Reference counter class. More...
 

Public Member Functions

constexpr tmp () noexcept
 Construct with no managed pointer. More...
 
constexpr tmp (std::nullptr_t) noexcept
 Construct with no managed pointer (literal nullptr). More...
 
 tmp (T *p)
 Construct, taking ownership of the pointer. More...
 
constexpr tmp (const T &obj) noexcept
 Construct for a const reference to an object. More...
 
 tmp (tmp< T > &&rhs) noexcept
 Move construct, transferring ownership. More...
 
 tmp (const tmp< T > &&rhs) noexcept
 Move construct, transferring ownership. More...
 
 tmp (const tmp< T > &rhs)
 Copy construct, incrementing ref-count of managed pointer. More...
 
 tmp (const tmp< T > &rhs, bool reuse)
 Copy/move construct. Optionally reusing ref-counted pointer. More...
 
 ~tmp ()
 Destructor: deletes managed pointer when the ref-count is 0. More...
 
bool good () const noexcept
 True if pointer/reference is non-null. More...
 
bool is_const () const noexcept
 If the stored/referenced content is const. More...
 
bool is_pointer () const noexcept
 True if this is a managed pointer (not a reference) More...
 
bool movable () const noexcept
 True if this is a non-null managed pointer with a unique ref-count. More...
 
Tget () noexcept
 Return pointer without nullptr checking. More...
 
const Tget () const noexcept
 Return const pointer without nullptr checking. More...
 
const Tcref () const
 
Tref () const
 
TconstCast () const
 
Tptr () const
 Return managed pointer for reuse, or clone() the object reference. More...
 
void clear () const noexcept
 
void reset (tmp< T > &&other) noexcept
 Clear existing and transfer ownership. More...
 
void reset (T *p=nullptr) noexcept
 Delete managed temporary object and set to new given pointer. More...
 
void cref (const tmp< T > &other) noexcept
 Clear existing and set (const) reference from other. More...
 
void cref (const T &obj) noexcept
 Clear existing and set (const) reference. More...
 
void cref (const T *p) noexcept
 Clear existing and set (const) reference to pointer content. More...
 
void ref (T &obj) noexcept
 Clear existing and set to (non-const) reference. More...
 
void ref (T *p) noexcept
 Clear existing and set (non-const) reference to pointer content. More...
 
void swap (tmp< T > &other) noexcept
 Swaps the managed object with other. More...
 
const Toperator-> () const
 Dereferences (const) pointer to the managed object. More...
 
Toperator-> ()
 Dereferences (non-const) pointer to the managed object. More...
 
const Toperator() () const
 Return const reference to the object - same as cref() method. More...
 
 operator bool () const noexcept
 True if pointer/reference is non-null. Same as good() More...
 
 operator const T & () const
 Cast to underlying data type, using the cref() method. More...
 
void operator= (const tmp< T > &other)
 Transfer ownership of the managed pointer. More...
 
void operator= (tmp< T > &&other) noexcept
 Clear existing and transfer ownership. More...
 
void operator= (T *p)
 Take ownership of the pointer. More...
 
void operator= (std::nullptr_t) noexcept
 Reset via assignment from literal nullptr. More...
 
bool valid () const noexcept
 Identical to good(), or bool operator. More...
 
bool isTmp () const noexcept
 Identical to is_pointer() More...
 
bool empty () const noexcept
 Deprecated(2020-07) True if a null managed pointer. More...
 
template<class... Args>
Foam::tmp< TNew (Args &&... args)
 
template<class U , class... Args>
Foam::tmp< TNewFrom (Args &&... args)
 

Static Public Member Functions

template<class... Args>
static tmp< TNew (Args &&... args)
 Construct tmp of T with forwarding arguments. More...
 
template<class U , class... Args>
static tmp< TNewFrom (Args &&... args)
 Construct tmp from derived type with forwarding arguments. More...
 
static word typeName ()
 The type-name, constructed from type-name of T. More...
 

Detailed Description

template<class T>
class Foam::tmp< T >

A class for managing temporary objects.

This is a combination of std::shared_ptr (with intrusive ref-counting) and a shared_ptr without ref-counting and null deleter. This allows the tmp to double as a pointer management and an indirect pointer to externally allocated objects.

Source files
See also
Foam::autoPtr Foam::refPtr Foam::refCount

Definition at line 61 of file PtrList.H.

Member Typedef Documentation

◆ element_type

typedef T element_type

Type of object being managed or referenced.

Definition at line 95 of file tmp.H.

◆ pointer

typedef T* pointer

Pointer to type of object being managed or referenced.

Definition at line 98 of file tmp.H.

◆ refCount

Reference counter class.

Definition at line 102 of file tmp.H.

Constructor & Destructor Documentation

◆ tmp() [1/8]

constexpr tmp ( )
inlineconstexprnoexcept

Construct with no managed pointer.

Definition at line 78 of file tmpI.H.

◆ tmp() [2/8]

constexpr tmp ( std::nullptr_t  )
inlineconstexprnoexcept

Construct with no managed pointer (literal nullptr).

Definition at line 86 of file tmpI.H.

◆ tmp() [3/8]

tmp ( T p)
inlineexplicit

Construct, taking ownership of the pointer.

Definition at line 94 of file tmpI.H.

◆ tmp() [4/8]

constexpr tmp ( const T obj)
inlineconstexprnoexcept

Construct for a const reference to an object.

Definition at line 111 of file tmpI.H.

◆ tmp() [5/8]

tmp ( tmp< T > &&  rhs)
inlinenoexcept

Move construct, transferring ownership.

Does not affect ref-count

Definition at line 119 of file tmpI.H.

◆ tmp() [6/8]

tmp ( const tmp< T > &&  rhs)
inlinenoexcept

Move construct, transferring ownership.

Does not affect ref-count

Note
Non-standard definition - should be non-const

Definition at line 130 of file tmpI.H.

◆ tmp() [7/8]

tmp ( const tmp< T > &  rhs)
inline

Copy construct, incrementing ref-count of managed pointer.

Note
Non-standard definition - should be non-const

Definition at line 141 of file tmpI.H.

◆ tmp() [8/8]

tmp ( const tmp< T > &  rhs,
bool  reuse 
)
inline

Copy/move construct. Optionally reusing ref-counted pointer.

Definition at line 164 of file tmpI.H.

◆ ~tmp()

~tmp ( )
inline

Destructor: deletes managed pointer when the ref-count is 0.

Definition at line 197 of file tmpI.H.

Member Function Documentation

◆ New() [1/2]

static tmp<T> New ( Args &&...  args)
inlinestatic

Construct tmp of T with forwarding arguments.

Parameters
argslist of arguments with which an instance of T will be constructed.
Note
Similar to std::make_shared, but the overload for array types is not disabled.

Referenced by solidAbsorption::a(), viscousDissipation::addSup(), interRegionHeatTransferModel::addSup(), adjointLaminar::adjointMeanFlowSource(), boundaryAdjointContribution::adjointTMVariable1Source(), boundaryAdjointContribution::adjointTMVariable2Source(), acousticWaveTransmissiveFvPatchField< Type >::advectionSpeed(), GAMGInterface::agglomerateCoeffs(), variablesSet::autoCreateMeshMovementField(), kOmegaSSTBase< eddyViscosity< RASModel< BasicTurbulenceModel > > >::beta(), blendingFactor::blendingFactor(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat(), nutLowReWallFunctionFvPatchScalarField::calcNut(), atmNutUWallFunctionFvPatchScalarField::calcNut(), atmNutkWallFunctionFvPatchScalarField::calcNut(), atmNutWallFunctionFvPatchScalarField::calcNut(), deltaBoundary::cellCenters_d(), fvPatch::Cn(), adjointEikonalSolver::computeYPhi(), searchableBox::coordinates(), searchablePlate::coordinates(), searchableCylinder::coordinates(), searchableSurfaceCollection::coordinates(), searchableCone::coordinates(), triSurfaceMesh::coordinates(), NURBS3DVolume::coordinates(), twoPhaseMixtureEThermo::Cp(), twoPhaseMixtureThermo::Cp(), multiphaseMixtureThermo::Cp(), phaseSystem::Cp(), displacementMeshMoverMotionSolver::curPoints(), triSurfaceTools::curvatures(), filmTurbulenceModel::Cw(), MRFZoneList::DDt(), cyclicFaPatch::delta(), cyclicACMIFvPatch::delta(), cyclicAMIFvPatch::delta(), DESModelRegions::DESModelRegions(), RASModelVariables::devReff(), adjointSpalartAllmaras::devReff(), adjointRASModel::diffusionCoeffVar1(), adjointRASModel::diffusionCoeffVar2(), adjointLaminar::distanceSensitivities(), momentumError::divDevRhoReff(), kL< BasicTurbulenceModel >::DkEff(), Bezier::dndbBasedSensitivities(), SpalartAllmaras< BasicTurbulenceModel >::DnuTildaEff(), kEpsilonPhitF< BasicTurbulenceModel >::DphitEff(), multiphaseMangrovesSource::dragCoeff(), surfactantProperties::dSigma(), Bezier::dxdbFace(), adjointRotatingWallVelocityFvPatchVectorField::dxdbMult(), solidAbsorption::e(), faPatch::edgeFaceCentres(), faPatch::edgeNormals(), cloudAbsorptionEmission::eDisp(), SpalartAllmaras< BasicTurbulenceModel >::epsilon(), age::execute(), energyTransport::execute(), boundedBackwardFaDdtScheme::facDdt(), boundBox::faceCentres(), mappedPatchBase::facePoints(), parseDriver::field_cellCentre(), parseDriver::field_rand(), NURBS3DSurface::findClosestSurfacePoint(), adjointLaminar::FISensitivityTerm(), fft::forwardTransform(), interfaceTrackingFvMesh::freeSurfacePressureJump(), interfaceTrackingFvMesh::freeSurfaceSnGradU(), interfaceTrackingFvMesh::freeSurfaceSnGradUn(), noiseFFT::frequencies(), kOmegaSSTBase< eddyViscosity< RASModel< BasicTurbulenceModel > > >::gamma(), phaseSystem::generatePhi(), Foam::getField(), cancelATC::getFISensitivityTerm(), blockMesh::globalPosition(), adjointEikonalSolver::gradEikonal(), lduMatrix::H1(), faMesh::haloFaceCentres(), faMesh::haloFaceNormals(), multiphaseMangrovesSource::inertiaCoeff(), rotorDiskSource::inflowVelocity(), cyclicACMIGAMGInterface::internalFieldTransfer(), AssemblyFvPatch< CyclicType >::internalFieldTransfer(), cyclicFaPatch::internalFieldTransfer(), Foam::inv(), coordinateSystem::invTransformPointImpl(), SpalartAllmaras< BasicTurbulenceModel >::k(), interfaceHeatResistance< Thermo, OtherThermo >::Kexp(), kL< BasicTurbulenceModel >::kSource(), interfaceHeatResistance< Thermo, OtherThermo >::KSu(), upwind< Type >::limiter(), cylindrical::localToGlobal(), meshRefinement::makeDisplacementField(), noiseModel::meanPf(), steadyStateDdtScheme< Type >::meshPhi(), incompressibleTwoPhaseMixture::mu(), incompressibleTwoPhaseMixture::muf(), laminar::mut(), phaseSystem::nearInterface(), faPatch::ngbPolyPatchFaceNormals(), faPatch::ngbPolyPatchPointNormals(), adjointTurbulenceModel::nuEff(), incompressibleTwoPhaseMixture::nuf(), Stokes< BasicTurbulenceModel >::nut(), generalizedNewtonian< BasicMomentumTransportModel >::nut(), adjointRASModel::nutJacobianTMVar1(), adjointRASModel::nutJacobianTMVar2(), SpalartAllmaras::nutJacobianVar1(), RASModelVariables::nutJacobianVar1(), RASModelVariables::nutJacobianVar2(), noiseModel::octaves(), SpalartAllmaras< BasicTurbulenceModel >::omega(), NURBS3DVolume::patchDxDb(), NURBS3DVolume::patchDxDbFace(), noiseFFT::Pf(), noiseModel::Pf(), semiPermeableBaffleMassFractionFvPatchScalarField::phiY(), boundBox::points(), treeBoundBox::points(), searchablePlate::points(), searchableCylinder::points(), searchableSurfaceCollection::points(), searchableCone::points(), lumpedPointMovement::pointsDisplacement(), lumpedPointMovement::pointsPosition(), projectCurveEdge::position(), projectEdge::position(), blockEdge::position(), filmTurbulenceModel::primaryRegionFriction(), noiseModel::PSDf(), dummy::R(), lumpedPointMovement::readDict(), reader::readField(), fft::realTransform1D(), fft::reverseTransform(), filmTurbulenceModel::rho(), forces::rho(), twoPhaseMixtureEThermo::rhoEoS(), twoPhaseMixtureThermo::rhoEoS(), multiphaseMixtureThermo::rhoEoS(), coordinateSystem::rotationsImpl(), noRadiation::Rp(), opaqueSolid::Rp(), viewFactor::Rp(), solarLoad::Rp(), noRadiation::Ru(), opaqueSolid::Ru(), Foam::safeLog10(), mappedPatchBase::samplePoints(), noFilm::Sh(), ThermoCloud< Foam::DSMCCloud >::Sh(), kinematicSingleLayer::Sh(), noRadiation::Shs(), constantSurfaceTensionCoefficient::sigma(), constant::sigma(), temperatureDependent::sigma(), electrostaticDepositionFvPatchScalarField::sigma(), wedgeFvPatchField< Type >::snGrad(), timeVaryingMassSorptionFvPatchScalarField::source(), noFilm::Srho(), kinematicSingleLayer::Srho(), stabilityBlendingFactor::stabilityBlendingFactor(), phaseSystem::surfaceTensionForce(), interfaceTrackingFvMesh::surfaceTensionGrad(), targetCoeffTrim::thetag(), boundaryAdjointContribution::TMVariable1(), boundaryAdjointContribution::TMVariable1Diffusion(), boundaryAdjointContribution::TMVariable2(), boundaryAdjointContribution::TMVariable2Diffusion(), cyclicFaPatch::transfer(), Foam::transformFieldMask< tensor >(), coordinateSystem::transformPointImpl(), phaseSystem::U(), noiseModel::uniformFrequencies(), triSurfaceTools::vertexNormals(), triSurfaceTools::vertexTriads(), blockMesh::vertices(), waveModel::waterLevel(), surfaceFieldValue::weightingFactor(), electricPotential::write(), rotorDiskSource::writeField(), TableBase< Type >::x(), general::x(), general::y(), nutkWallFunctionFvPatchScalarField::yPlus(), and alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm().

◆ NewFrom() [1/2]

static tmp<T> NewFrom ( Args &&...  args)
inlinestatic

Construct tmp from derived type with forwarding arguments.

Parameters
argslist of arguments with which an instance of U will be constructed.
Note
Similar to New but for derived types

◆ typeName()

Foam::word typeName ( )
inlinestatic

The type-name, constructed from type-name of T.

Definition at line 69 of file tmpI.H.

◆ good()

bool good ( ) const
inlinenoexcept

True if pointer/reference is non-null.

Definition at line 169 of file tmp.H.

Referenced by multiphaseSystem::dragCoeff().

Here is the caller graph for this function:

◆ is_const()

bool is_const ( ) const
inlinenoexcept

If the stored/referenced content is const.

Definition at line 172 of file tmp.H.

◆ is_pointer()

bool is_pointer ( ) const
inlinenoexcept

True if this is a managed pointer (not a reference)

Definition at line 175 of file tmp.H.

Referenced by regIOobject::store().

Here is the caller graph for this function:

◆ movable()

bool movable ( ) const
inlinenoexcept

True if this is a non-null managed pointer with a unique ref-count.

Definition at line 206 of file tmpI.H.

◆ get() [1/2]

T* get ( )
inlinenoexcept

Return pointer without nullptr checking.

Definition at line 184 of file tmp.H.

Referenced by regIOobject::store().

Here is the caller graph for this function:

◆ get() [2/2]

const T* get ( ) const
inlinenoexcept

Return const pointer without nullptr checking.

Definition at line 187 of file tmp.H.

◆ cref() [1/4]

const T & cref ( ) const
inline

Return const reference to the object or to the contents of a (non-null) managed pointer.

Fatal for a null managed pointer

Definition at line 213 of file tmpI.H.

Referenced by alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat(), kL< BasicTurbulenceModel >::correct(), parseDriver::getField(), tmp< T >::operator const T &(), tmp< Foam::surfaceInterpolationScheme< GType > >::operator()(), parseDriver::patchInternalField(), parseDriver::patchNeighbourField(), parseDriver::patchNormalField(), and regIOobject::store().

Here is the caller graph for this function:

◆ ref() [1/3]

T & ref ( ) const
inline

Return non-const reference to the contents of a non-null managed pointer.

Fatal for a null managed pointer or if the object is const.

Definition at line 227 of file tmpI.H.

Referenced by faMatrix< Type >::A(), fvMatrix< Type >::A(), MRFZoneList::absolute(), multiBandZoneAbsorptionEmission::aCont(), greyMeanAbsorptionEmission::aCont(), wideBandAbsorptionEmission::aCont(), phaseChange::addToDriftRate(), cloudAbsorptionEmission::aDisp(), adjointSensitivity::adjointMeshMovementSource(), pairGAMGAgglomeration::agglomerate(), adjointSolverManager::aggregateSensitivities(), liquidFilmBase::alpha(), KinematicCloud< Cloud< basicKinematicCollidingParcel > >::alpha(), phaseSystem::alphaEff(), phaseSystem::alphahe(), MassTransferPhaseSystem< BasePhaseSystem >::alphaTransfer(), ThermoCloud< Foam::DSMCCloud >::ap(), polyPatch::areaFraction(), Foam::atan2(), Foam::fac::average(), Foam::fvc::average(), averageNeighbourFvGeometryScheme::averageCentres(), averageNeighbourFvGeometryScheme::averageNeighbourCentres(), subtract::calcFieldType(), add::calcFieldType(), faceLimitedGrad< Type >::calcGrad(), faceMDLimitedGrad< Type >::calcGrad(), cellMDLimitedGrad< Type >::calcGrad(), curvatureSeparation::calcInvR1(), nutkWallFunctionFvPatchScalarField::calcNut(), nutUWallFunctionFvPatchScalarField::calcNut(), nutkRoughWallFunctionFvPatchScalarField::calcNut(), nutUSpaldingWallFunctionFvPatchScalarField::calcNut(), phaseSystem::calcPhi(), StandardChemistryModel< ReactionThermo, ThermoType >::calculateRR(), nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus(), nutkFilmWallFunctionFvPatchScalarField::calcUTau(), nutUBlendedWallFunctionFvPatchScalarField::calcUTau(), nutUSpaldingWallFunctionFvPatchScalarField::calcUTau(), nutUWallFunctionFvPatchScalarField::calcYPlus(), primitiveMeshTools::cellDeterminant(), Zuber::CHF(), Tatsumoto::CHFSubCool(), HuaXu::CHFSubCool(), Foam::cmptMag(), optimisationType::computeDirection(), NURBS3DVolume::computeNewBoundaryPoints(), NURBS3DVolume::computeNewPoints(), NURBS3DVolume::computeParametricCoordinates(), Foam::constrainHbyA(), adjointSolverManager::constraintValues(), forceList::correct(), thermocapillaryForce::correct(), contactAngleForce::correct(), DeardorffDiffStress< BasicTurbulenceModel >::correct(), Maxwell< BasicTurbulenceModel >::correct(), ShihQuadraticKE::correct(), LamBremhorstKE::correct(), LienLeschziner::correct(), kOmega< BasicTurbulenceModel >::correct(), LienCubicKE::correct(), SSG< BasicTurbulenceModel >::correct(), realizableKE< BasicTurbulenceModel >::correct(), kEpsilon< EddyDiffusivity< compressible::turbulenceModel > >::correct(), RNGkEpsilon< BasicTurbulenceModel >::correct(), LaunderSharmaKE< BasicTurbulenceModel >::correct(), LRR< BasicTurbulenceModel >::correct(), qZeta::correct(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::correct(), SpalartAllmarasDES< BasicTurbulenceModel >::correct(), SpalartAllmaras< BasicTurbulenceModel >::correct(), mixtureKEpsilon< BasicTurbulenceModel >::correct(), kEpsilonPhitF< BasicTurbulenceModel >::correct(), kkLOmega::correct(), adjointSpalartAllmaras::correct(), kOmegaSSTBase< eddyViscosity< RASModel< BasicTurbulenceModel > > >::correct(), kL< BasicTurbulenceModel >::correct(), fourthLnGrad< Type >::correction(), correctedLnGrad< Type >::correction(), cubic< Type >::correction(), pointLinear< Type >::correction(), CentredFitSnGradScheme< Type, Polynomial, Stencil >::correction(), correctedSnGrad< Type >::correction(), faceCorrectedSnGrad< Type >::correction(), deferredCorrection< Type >::correction(), relaxedSnGrad< Type >::correction(), outletStabilised< Type >::correction(), MassTransferPhaseSystem< BasePhaseSystem >::correctMassSources(), kOmegaSSTLM< BasicTurbulenceModel >::correctReThetatGammaInt(), constantFilmThermo::Cp(), phaseSystem::Cp(), heThermo< BasicSolidThermo, MixtureType >::CpByCpv(), phaseSystem::CpByCpv(), heThermo< BasicSolidThermo, MixtureType >::Cpv(), phaseSystem::Cpv(), cellCellStencil::createField(), Foam::fvc::curl(), solidBodyMotionSolver::curPoints(), multiSolidBodyMotionSolver::curPoints(), volumetricBSplinesMotionSolver::curPoints(), velocityComponentLaplacianFvMotionSolver::curPoints(), displacementComponentLaplacianFvMotionSolver::curPoints(), displacementSBRStressFvMotionSolver::curPoints(), sixDoFRigidBodyMotionSolver::curPoints(), displacementInterpolationMotionSolver::curPoints(), rigidBodyMeshMotion::curPoints(), phaseSystem::Cv(), multiphaseSystem::Cvm(), faMatrix< Type >::D(), fvMatrix< Type >::D(), fvMatrix< Type >::DD(), MomentumTransferPhaseSystem< BasePhaseSystem >::ddtCorrByAs(), fvFieldDecomposer::decomposeField(), cyclicFvPatch::delta(), fvMesh::delta(), blackBodyEmission::deltaLambdaT(), nonlinearEddyViscosity< incompressible::RASModel >::devRhoReff(), adjointSpalartAllmaras::diffusionCoeffVar1(), adjointSpalartAllmaras::distanceSensitivities(), Foam::fac::div(), NURBS3DVolume::dndbBasedSensitivities(), adjointSpalartAllmaras::dr_dDelta(), adjointSpalartAllmaras::dr_dNuTilda(), adjointSpalartAllmaras::dr_dStilda(), SpalartAllmarasDES< BasicTurbulenceModel >::dTilda(), shapeSensitivities::dvdbMult(), blackBodyEmission::EbDeltaLambdaT(), multiBandZoneAbsorptionEmission::eCont(), greyMeanAbsorptionEmission::ECont(), wideBandAbsorptionEmission::ECont(), faMesh::edgeLengthCorrection(), ThermoCloud< Foam::DSMCCloud >::Ep(), edgeInterpolationScheme< scalar >::euclidianInterpolate(), scalarTransport::execute(), kOmegaSSTBase< eddyViscosity< RASModel< BasicTurbulenceModel > > >::F23(), EulerFaD2dt2Scheme< Type >::facD2dt2(), EulerFaDdtScheme< Type >::facDdt(), backwardFaDdtScheme< Type >::facDdt(), boundedBackwardFaDdtScheme::facDdt(), EulerFaDdtScheme< Type >::facDdt0(), backwardFaDdtScheme< Type >::facDdt0(), boundedBackwardFaDdtScheme::facDdt0(), gaussConvectionScheme< Type >::facDiv(), polyPatch::faceCellCentres(), primitiveMeshTools::faceConcavity(), lduMatrix::faceH(), PatchToPatchInterpolation< FromPatch, ToPatch >::faceInterpolate(), cellQuality::faceNonOrthogonality(), primitiveMeshTools::faceOrthogonality(), polyMeshTools::faceSkewness(), cellQuality::faceSkewness(), primitiveMeshTools::faceSkewness(), PrimitivePatchInterpolation< Foam::PrimitivePatch >::faceToPointInterpolate(), gaussLaplacianScheme< Type >::facLaplacian(), EulerFaD2dt2Scheme< Type >::famD2dt2(), EulerFaDdtScheme< Type >::famDdt(), backwardFaDdtScheme< Type >::famDdt(), boundedBackwardFaDdtScheme::famDdt(), gaussConvectionScheme< Type >::famDiv(), gaussLaplacianScheme< Type >::famLaplacian(), Foam::edgeMeshTools::featureProximity(), volPointInterpolation::flatBoundaryField(), faMatrix< Type >::flux(), fvMatrix< Type >::flux(), correctedSnGrad< Type >::fullGradCorrection(), faceCorrectedSnGrad< Type >::fullGradCorrection(), skewCorrectedSnGrad< Type >::fullGradCorrection(), EulerDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), ddtScheme< Type >::fvcDdtPhiCoeff(), ddtScheme< Type >::fvcDdtPhiCoeffExperimental(), steadyStateDdtScheme< Type >::fvcDdtPhiCorr(), steadyStateDdtScheme< Type >::fvcDdtUfCorr(), gaussConvectionScheme< Type >::fvcDiv(), gaussLaplacianScheme< Type, GType >::fvcLaplacian(), relaxedNonOrthoGaussLaplacianScheme< Type, GType >::fvcLaplacian(), EulerD2dt2Scheme< Type >::fvmD2dt2(), EulerDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), gaussConvectionScheme< Type >::fvmDiv(), gaussLaplacianScheme< Type, GType >::fvmLaplacian(), relaxedNonOrthoGaussLaplacianScheme< Type, GType >::fvmLaplacian(), gaussLaplacianScheme< Type, GType >::fvmLaplacianUncorrected(), relaxedNonOrthoGaussLaplacianScheme< Type, GType >::fvmLaplacianUncorrected(), heThermo< BasicSolidThermo, MixtureType >::gamma(), phaseSystem::gamma(), pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::gasHs(), fvMeshDistribute::generateTestField(), NURBS3DVolume::getDxCellsDb(), NURBS3DVolume::getDxDb(), cylindrical::globalToLocal(), kinematicSingleLayer::gNormClipped(), Foam::fac::grad(), lduMatrix::H(), faMatrix< Type >::H(), fvMatrix< Type >::H(), heThermo< BasicSolidThermo, MixtureType >::hc(), phaseSystem::hc(), heThermo< BasicSolidThermo, MixtureType >::he(), MassTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), AnisothermalPhaseModel< BasePhaseModel >::heEqn(), heheuPsiThermo< BasicPsiThermo, MixtureType >::heu(), coalCloudList::hsTrans(), BreenWestwater::htcFilmBoil(), Bromley::htcFilmBoil(), InterfaceCompositionPhaseChangePhaseSystem< BasePhaseSystem >::iDmdt(), cyclicAMIGAMGInterface::internalFieldTransfer(), cyclicGAMGInterface::internalFieldTransfer(), pointToPointPlanarInterpolation::interpolate(), pointVolInterpolation::interpolate(), localMax< Type >::interpolate(), localMin< Type >::interpolate(), edgeInterpolationScheme< scalar >::interpolate(), surfaceInterpolationScheme< GType >::interpolate(), singleCellFvMesh::interpolate(), Foam::inv(), ReynoldsStress< RASModel< BasicTurbulenceModel > >::k(), SpalartAllmarasDES< BasicTurbulenceModel >::k(), phaseSystem::K(), heSolidThermo< BasicSolidThermo, MixtureType >::Kappa(), liquidFilmThermo::kappa(), constantFilmThermo::kappa(), phaseSystem::kappa(), kineticGasEvaporation< Thermo, OtherThermo >::Kexp(), interfaceOxideRate< Thermo, OtherThermo >::Kexp(), boundaryAdjointContributionIncompressible::laminarDiffusivity(), Foam::levelSetFraction(), steadyOptimisation::lineSearchUpdate(), lnGradScheme< Type >::lnGrad(), Foam::fvc::magSqrGradGrad(), cyclicAMIFvPatchField< scalar >::manipulateMatrix(), cyclicACMIFvPatchField< Type >::manipulateMatrix(), mappedPatchFieldBase< scalar >::mappedInternalField(), mappedPatchFieldBase< scalar >::mappedWeightField(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), momentOfInertia::meshInertia(), CoEulerDdtScheme< Type >::meshPhi(), SLTSDdtScheme< Type >::meshPhi(), localEulerDdtScheme< Type >::meshPhi(), Jeschar::MHF(), boundaryAdjointContributionIncompressible::momentumDiffusion(), regionModel1D::moveMesh(), fvMesh::movePoints(), primitiveMesh::movePoints(), liquidFilmThermo::mu(), constantFilmThermo::mu(), phaseSystem::mu(), heheuPsiThermo< BasicPsiThermo, MixtureType >::mub(), heheuPsiThermo< BasicPsiThermo, MixtureType >::muu(), Foam::fac::ndiv(), multiphaseSystem::nearInterface(), faPatchField< Type >::New(), fvPatchField< vector >::New(), Foam::fac::ngrad(), cellQuality::nonOrthogonality(), dynamicOversetFvMesh::normalisation(), Schaeffer::nu(), JohnsonJacksonSchaeffer::nu(), multiphaseSystem::nu(), phaseSystem::nu(), consumptionSpeed::omega0Sigma(), anisotropicFilter::operator()(), optionList::operator()(), RaviPetersen::operator()(), cyclicFaPatchField< Type >::patchNeighbourField(), cyclicFvPatchField< vector >::patchNeighbourField(), cyclicAMIFvPatchField< scalar >::patchNeighbourField(), cyclicACMIFvPatchField< Type >::patchNeighbourField(), liquidFilmBase::pg(), PatchToPatchInterpolation< FromPatch, ToPatch >::pointInterpolate(), PatchTools::pointNormals(), PrimitivePatchInterpolation< Foam::PrimitivePatch >::pointToFaceInterpolate(), Foam::pow(), phasePressureModel::pPrime(), kineticTheoryModel::pPrime(), phasePressureModel::pPrimef(), boundaryAdjointContributionIncompressible::pressureSource(), filmTurbulenceModel::primaryRegionFriction(), SpalartAllmarasDES< BasicTurbulenceModel >::psi(), heheuPsiThermo< BasicPsiThermo, MixtureType >::psib(), heheuPsiThermo< BasicPsiThermo, MixtureType >::psiu(), laminar< ReactionThermo >::Qdot(), EDC< ReactionThermo >::Qdot(), diffusionMulticomponent< ReactionThermo, ThermoType >::Qdot(), solidChemistryModel< CompType, SolidThermo >::Qdot(), StandardChemistryModel< ReactionThermo, ThermoType >::Qdot(), Kutadeladze::qNucleate(), greyDiffusiveViewFactorFixedValueFvPatchScalarField::qro(), nonlinearEddyViscosity< incompressible::RASModel >::R(), laminar< ReactionThermo >::R(), diffusionMulticomponent< ReactionThermo, ThermoType >::R(), reader::readField(), MRFZoneList::relative(), faMatrix< Type >::residual(), fvMatrix< Type >::residual(), LduMatrix< Type, DType, LUType >::residual(), lduMatrix::residual(), constantFilmThermo::rho(), phaseSystem::rho(), KinematicCloud< Cloud< basicKinematicCollidingParcel > >::rhoEff(), coalCloudList::rhoTrans(), fvDOM::Rp(), pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::RRg(), solidChemistryModel< CompType, SolidThermo >::RRs(), solidChemistryModel< CompType, SolidThermo >::RRsHs(), eddyDissipationDiffusionModel< ReactionThermo, ThermoType >::rtDiff(), fvDOM::Ru(), patchProbes::sample(), probes::sample(), coalCloudList::Sh(), ThermoCloud< Foam::DSMCCloud >::Sh(), thermoSingleLayer::Sh(), primaryRadiation::Shs(), standardRadiation::Shs(), constantRadiation::Shs(), liquidFilmThermo::sigma(), constantFilmThermo::sigma(), electrostaticDepositionFvPatchScalarField::sigma(), cloudScatter::sigmaEff(), ThermoCloud< Foam::DSMCCloud >::sigmap(), skewCorrected< Type >::skewCorrection(), cellQuality::skewness(), snGradScheme< Type >::snGrad(), twoPhaseSystem::solve(), surfaceAlignedSBRStressFvMotionSolver::solve(), thermalBaffle::solveEnergy(), sensitivityBezierFI::solveMeshMovementEqn(), fvMatrix< Type >::solveSegregated(), optionList::source(), Foam::fam::Sp(), noiseModel::SPL(), Foam::sqr(), coalCloudList::Srho(), ReactingCloud< Foam::DSMCCloud >::Srho(), thermoSingleLayer::Srho(), Foam::stabilise(), regionFunctionObject::store(), regionFunctionObject::storeInDb(), Foam::fam::Su(), coalCloudList::SU(), KinematicCloud< Cloud< basicKinematicCollidingParcel > >::SU(), surfaceNormalFixedValueFvPatchVectorField::surfaceNormalFixedValueFvPatchVectorField(), multiphaseSystem::surfaceTension(), Foam::fam::SuSp(), multiphaseSystem::Svm(), coalCloudList::SYi(), ReactingCloud< Foam::DSMCCloud >::SYi(), thermoSingleLayer::T(), boundaryAdjointContributionIncompressible::tangentVelocitySource(), StandardChemistryModel< ReactionThermo, ThermoType >::tc(), heThermo< BasicSolidThermo, MixtureType >::THE(), temperatureDependentContactAngleForce::theta(), distributionContactAngleForce::theta(), perturbedTemperatureDependentContactAngleForce::theta(), KinematicCloud< Cloud< basicKinematicCollidingParcel > >::theta(), boundaryAdjointContributionIncompressible::TMVariable1(), boundaryAdjointContributionIncompressible::TMVariable2(), Foam::transform(), sixDoFRigidBodyMotion::transform(), rigidBodyMotion::transformPoints(), Foam::transformPoints(), polynomial::Tsat(), function1::Tsat(), liquidFilmBase::Up(), optimisationType::update(), inverseDistance::update(), adjointWallVelocityLowReFvPatchVectorField::updateCoeffs(), adjointFarFieldVelocityFvPatchVectorField::updateCoeffs(), adjointOutletPressureFvPatchScalarField::updateCoeffs(), adjointFarFieldPressureFvPatchScalarField::updateCoeffs(), surfaceNormalFixedValueFvPatchVectorField::updateCoeffs(), uniformNormalFixedValueFvPatchVectorField::updateCoeffs(), lumpedMassWallTemperatureFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), timeVaryingMassSorptionFvPatchScalarField::updateCoeffs(), electrostaticDepositionFvPatchScalarField::updateCoeffs(), laminar::Us(), liquidFilmBase::Us(), coalCloudList::UTrans(), liquidFilmBase::Uw(), KinematicCloud< Cloud< basicKinematicCollidingParcel > >::vDotSweep(), boundaryAdjointContributionIncompressible::velocitySource(), MassTransferPhaseSystem< BasePhaseSystem >::volTransfer(), boundaryAdjointContributionIncompressible::wallDistance(), midPoint< Type >::weights(), outletStabilised< Type >::weights(), faNVDscheme< Type, NVDweight >::weights(), limitedSurfaceInterpolationScheme< Type >::weights(), triSurfaceTools::writeCurvature(), Foam::edgeMeshTools::writeFeatureProximity(), Foam::ensightOutput::writeVolField(), nutUWallFunctionFvPatchScalarField::yPlus(), MRFZoneList::zeroFilter(), and wallLubricationModel::zeroGradWalls().

◆ constCast()

T & constCast ( ) const
inline

Return non-const reference to the object or to the contents of a (non-null) managed pointer, with an additional const_cast.

Fatal for a null pointer.

Definition at line 248 of file tmpI.H.

Referenced by LESfilter::correctBoundaryConditions(), waveVelocityFvPatchVectorField::updateCoeffs(), and waveAlphaFvPatchScalarField::updateCoeffs().

Here is the caller graph for this function:

◆ ptr()

◆ clear()

void clear ( ) const
inlinenoexcept

If object pointer points to valid object: delete object and set pointer to nullptr

Definition at line 287 of file tmpI.H.

Referenced by MRFZoneList::absolute(), boundBox::add(), lduMatrix::Amul(), kEqn< BasicTurbulenceModel >::correct(), LamBremhorstKE::correct(), LienLeschziner::correct(), kOmega< BasicTurbulenceModel >::correct(), dynamicKEqn< BasicTurbulenceModel >::correct(), kEpsilon< EddyDiffusivity< compressible::turbulenceModel > >::correct(), LaunderSharmaKE< BasicTurbulenceModel >::correct(), RNGkEpsilon< BasicTurbulenceModel >::correct(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::correct(), mixtureKEpsilon< BasicTurbulenceModel >::correct(), kEpsilonPhitF< BasicTurbulenceModel >::correct(), kOmegaSSTBase< eddyViscosity< RASModel< BasicTurbulenceModel > > >::correct(), kL< BasicTurbulenceModel >::correct(), kOmegaSSTLM< BasicTurbulenceModel >::correctReThetatGammaInt(), triSurfaceTools::curvatures(), Foam::fvc::DDt(), Foam::fvm::div(), Foam::fam::div(), Foam::fvc::div(), Foam::fac::div(), edgeInterpolationScheme< scalar >::euclidianInterpolate(), Foam::fvc::flux(), fft::forwardTransform(), updateMethod::globalSum(), fvMeshSubsetProxy::interpolate(), edgeInterpolationScheme< scalar >::interpolate(), surfaceInterpolationScheme< GType >::interpolate(), Foam::inv(), Foam::fac::laplacian(), Foam::fam::laplacian(), Foam::fam::ndiv(), Foam::fac::ndiv(), anisotropicFilter::operator()(), noiseFFT::Pf(), realizableKE< BasicTurbulenceModel >::rCmu(), fft::realTransform1D(), Foam::fvc::reconstructMag(), MRFZoneList::relative(), fft::reverseTransform(), snGradScheme< Type >::snGrad(), Foam::fam::Sp(), Foam::stabilise(), Foam::fam::SuSp(), lduMatrix::Tmul(), Foam::transform(), PatchFunction1< Foam::Vector >::transform(), Foam::transformFieldMask< sphericalTensor >(), Foam::transformFieldMask< symmTensor >(), Foam::transformFieldMask< tensor >(), Foam::transformPoints(), Foam::fvc::volumeIntegrate(), Foam::writeAreaField(), Foam::writeDimField(), Foam::writePointField(), and Foam::writeVolField().

◆ reset() [1/2]

void reset ( tmp< T > &&  other)
inlinenoexcept

Clear existing and transfer ownership.

Definition at line 314 of file tmpI.H.

Referenced by sampledCuttingPlane::sampleOnIsoSurfacePoints(), sampledDistanceSurface::sampleOnIsoSurfacePoints(), and sampledIsoSurface::sampleOnIsoSurfacePoints().

Here is the caller graph for this function:

◆ reset() [2/2]

void reset ( T p = nullptr)
inlinenoexcept

Delete managed temporary object and set to new given pointer.

Definition at line 305 of file tmpI.H.

◆ cref() [2/4]

void cref ( const tmp< T > &  other)
inlinenoexcept

Clear existing and set (const) reference from other.

Definition at line 331 of file tmpI.H.

◆ cref() [3/4]

void cref ( const T obj)
inlinenoexcept

Clear existing and set (const) reference.

Definition at line 345 of file tmpI.H.

◆ cref() [4/4]

void cref ( const T p)
inlinenoexcept

Clear existing and set (const) reference to pointer content.

The pointer can be null, which is handled like a clear().

Definition at line 354 of file tmpI.H.

◆ ref() [2/3]

void ref ( T obj)
inlinenoexcept

Clear existing and set to (non-const) reference.

Definition at line 363 of file tmpI.H.

◆ ref() [3/3]

void ref ( T p)
inlinenoexcept

Clear existing and set (non-const) reference to pointer content.

The pointer can be null, which is handled like a clear().

Definition at line 372 of file tmpI.H.

◆ swap()

void swap ( tmp< T > &  other)
inlinenoexcept

Swaps the managed object with other.

Definition at line 381 of file tmpI.H.

◆ operator->() [1/2]

const T * operator-> ( ) const
inline

Dereferences (const) pointer to the managed object.

Fatal for a null managed pointer.

Definition at line 398 of file tmpI.H.

◆ operator->() [2/2]

T * operator-> ( )
inline

Dereferences (non-const) pointer to the managed object.

Fatal for a null managed pointer or if the object is const.

Definition at line 412 of file tmpI.H.

◆ operator()()

const T& operator() ( ) const
inline

Return const reference to the object - same as cref() method.

Definition at line 260 of file tmp.H.

◆ operator bool()

operator bool ( ) const
inlineexplicitnoexcept

True if pointer/reference is non-null. Same as good()

Definition at line 266 of file tmp.H.

◆ operator const T &()

operator const T & ( ) const
inline

Cast to underlying data type, using the cref() method.

Definition at line 269 of file tmp.H.

References tmp< T >::cref().

Here is the call graph for this function:

◆ operator=() [1/4]

void operator= ( const tmp< T > &  other)
inline

Transfer ownership of the managed pointer.

Fatal for a null managed pointer or if the object is const.

Definition at line 433 of file tmpI.H.

◆ operator=() [2/4]

void operator= ( tmp< T > &&  other)
inlinenoexcept

Clear existing and transfer ownership.

Definition at line 467 of file tmpI.H.

◆ operator=() [3/4]

void operator= ( T p)
inline

Take ownership of the pointer.

Fatal for a null pointer, or when the pointer is non-unique.

Definition at line 484 of file tmpI.H.

◆ operator=() [4/4]

void operator= ( std::nullptr_t  )
inlinenoexcept

Reset via assignment from literal nullptr.

Definition at line 507 of file tmpI.H.

◆ valid()

◆ isTmp()

bool isTmp ( ) const
inlinenoexcept

◆ empty()

bool empty ( ) const
inlinenoexcept

Deprecated(2020-07) True if a null managed pointer.

Deprecated:
(2020-07) - use bool operator

Definition at line 301 of file tmp.H.

◆ New() [2/2]

Foam::tmp<T> New ( Args &&...  args)
inline

Definition at line 54 of file tmpI.H.

◆ NewFrom() [2/2]

Foam::tmp<T> NewFrom ( Args &&...  args)
inline

Definition at line 62 of file tmpI.H.


The documentation for this class was generated from the following files: