A class for managing temporary objects. More...

Public Types | |
| typedef T | element_type |
| Type of object being managed or referenced. More... | |
| typedef T * | pointer |
| 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 |
| Implicit construct from literal nullptr: no managed pointer. More... | |
| tmp (T *p) | |
| Construct, taking ownership of the pointer. More... | |
| constexpr | tmp (const T &obj) noexcept |
| Implicit 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 (const autoPtr< T > &)=delete | |
| No copy construct from autoPtr, also avoids implicit cast to object or pointer. More... | |
| tmp (const refPtr< T > &)=delete | |
| No copy construct from refPtr, also avoids implicit cast to object. More... | |
| tmp (autoPtr< T > &&rhs) noexcept | |
| Move construct from autoPtr, transferring ownership. More... | |
| ~tmp () noexcept | |
| 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 | is_reference () const noexcept |
| True if this is a reference (not a pointer) More... | |
| bool | movable () const noexcept |
| True if this is a non-null managed pointer with a unique ref-count. More... | |
| T * | get () noexcept |
| Return pointer without nullptr checking. More... | |
| const T * | get () const noexcept |
| Return const pointer without nullptr checking. More... | |
| const T & | cref () const |
| Return const reference to the object or to the contents of a (non-null) managed pointer. More... | |
| T & | ref () const |
| Return non-const reference to the contents of a non-null managed pointer. More... | |
| T & | constCast () const |
| Return non-const reference to the object or to the contents of a (non-null) managed pointer, with an additional const_cast. More... | |
| T * | ptr () const |
| Return managed pointer for reuse, or clone() the object reference. More... | |
| void | clear () const noexcept |
| If object pointer points to valid object: delete object and set pointer to nullptr. More... | |
| void | protect (bool on) noexcept |
| Use specified protection against moving for the managed pointer. No-op for references. More... | |
| 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 | reset (const autoPtr< T > &)=delete |
| Avoid inadvertent casting (to object or pointer) More... | |
| void | reset (const refPtr< T > &)=delete |
| Avoid inadvertent casting (to object) More... | |
| template<class... Args> | |
| T & | emplace (Args &&... args) |
| Reset with emplace construction. Return reference to the new content. 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 | cref (const autoPtr< T > &)=delete |
| Avoid inadvertent casting (to object or pointer) More... | |
| void | cref (const refPtr< T > &)=delete |
| Avoid inadvertent casting (to object) 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 | ref (const autoPtr< T > &)=delete |
| Avoid inadvertent casting (to object or pointer) More... | |
| void | ref (const refPtr< T > &)=delete |
| Avoid inadvertent casting (to object) More... | |
| void | swap (tmp< T > &other) noexcept |
| Swaps the managed object with other. More... | |
| const T * | operator-> () const |
| Dereferences (const) pointer to the managed object. More... | |
| T * | operator-> () |
| Dereferences (non-const) pointer to the managed object. More... | |
| const T & | operator() () 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(). Prefer is_pointer() or movable(). More... | |
| bool | empty () const noexcept |
| Deprecated(2020-07) True if a null managed pointer. More... | |
Static Public Member Functions | |
| template<class... Args> | |
| static tmp< T > | New (Args &&... args) |
| Construct tmp with forwarding arguments. More... | |
| template<class U , class... Args> | |
| static tmp< T > | NewFrom (Args &&... args) |
| Construct tmp from derived type with forwarding arguments. More... | |
| static word | typeName () |
| The type-name, constructed from type-name of T. More... | |
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. In contrast to std::shared_ptr, only a limited number of tmp items will ever share a pointer.
| typedef T element_type |
| typedef Foam::refCount refCount |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Construct, taking ownership of the pointer.
Definition at line 70 of file tmpI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and tmp< T >::typeName().

Copy construct, incrementing ref-count of managed pointer.
Definition at line 117 of file tmpI.H.
References tmp< T >::is_pointer().

Copy/move construct. Optionally reusing ref-counted pointer.
Definition at line 141 of file tmpI.H.
References tmp< T >::is_pointer().

No copy construct from autoPtr, also avoids implicit cast to object or pointer.
No copy construct from refPtr, also avoids implicit cast to object.
|
inlinenoexcept |
Construct tmp with forwarding arguments.
| args | list of arguments with which an instance of T will be constructed. |
Definition at line 206 of file tmp.H.
References args, and Foam::T().
Referenced by lookup::a(), constantAbsorption::a(), multiBandAbsorption::a(), solidAbsorption::a(), nullSpace::activeConstraints(), scene::addColourToMesh(), boundaryAdjointContribution::adjointTMVariable1Source(), boundaryAdjointContribution::adjointTMVariable2Source(), acousticWaveTransmissiveFvPatchField< Type >::advectionSpeed(), pairGAMGAgglomeration::agglomerate(), GAMGInterface::agglomerateCoeffs(), adjointSolverManager::aggregateSensitivities(), heThermo< BasicPsiThermo, MixtureType >::alphaEff(), ThermalDiffusivity< BasicTurbulenceModel >::alphat(), ThermoCloud< CloudType >::ap(), polyPatch::areaFraction(), nullSpace::ATv(), variablesSet::autoCreateMeshMovementField(), nullSpace::Av(), averageNeighbourFvGeometryScheme::averageCentres(), averageNeighbourFvGeometryScheme::averageNeighbourCentres(), snappySnapDriver::avgCellCentres(), adjointkOmegaSST::beta(), kOmegaSSTBase< BasicEddyViscosityModel >::beta(), blendingFactor::blendingFactor(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat(), atmNutkWallFunctionFvPatchScalarField::calcNut(), atmNutUWallFunctionFvPatchScalarField::calcNut(), atmNutWallFunctionFvPatchScalarField::calcNut(), nutkRoughWallFunctionFvPatchScalarField::calcNut(), nutkWallFunctionFvPatchScalarField::calcNut(), nutLowReWallFunctionFvPatchScalarField::calcNut(), nutUWallFunctionFvPatchScalarField::calcNut(), nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus(), nutkFilmWallFunctionFvPatchScalarField::calcUTau(), nutUBlendedWallFunctionFvPatchScalarField::calcUTau(), nutUSpaldingWallFunctionFvPatchScalarField::calcUTau(), nutUWallFunctionFvPatchScalarField::calcYPlus(), deltaBoundary::cellCenters_d(), primitiveMeshTools::cellDeterminant(), pointSmoother::cellQuality(), treeDataFace::centres(), treeDataCell::centres(), treeDataEdge::centres(), treeDataPoint::centres(), designVariablesUpdate::computeDirection(), kEpsilon::computeG(), NURBS3DVolume::computeNewBoundaryPoints(), NURBS3DVolume::computeNewPoints(), adjointEikonalSolver::computeYPhi(), polyLine::concat(), nullSpace::constraintRelatedUpdate(), searchableBox::coordinates(), searchableCone::coordinates(), searchableCylinder::coordinates(), searchableDisk::coordinates(), searchablePlane::coordinates(), searchablePlate::coordinates(), searchableSphere::coordinates(), searchableSurfaceCollection::coordinates(), triSurfaceMesh::coordinates(), NURBS3DVolume::coordinates(), contactAngleForce::correct(), forceList::correct(), thermocapillaryForce::correct(), edgeInterpolation::correctionVectors(), ReynoldsAnalogy::Cp(), heThermo< BasicThermo, MixtureType >::Cp(), heThermo< BasicPsiThermo, MixtureType >::Cp(), heThermo< BasicThermo, MixtureType >::CpByCpv(), heThermo< BasicThermo, MixtureType >::Cpv(), displacementInterpolationMotionSolver::curPoints(), multiSolidBodyMotionSolver::curPoints(), solidBodyMotionSolver::curPoints(), displacementComponentLaplacianFvMotionSolver::curPoints(), velocityComponentLaplacianFvMotionSolver::curPoints(), displacementMeshMoverMotionSolver::curPoints(), elasticityMotionSolver::curPoints(), volumetricBSplinesMotionSolver::curPoints(), rigidBodyMeshMotion::curPoints(), sixDoFRigidBodyMotionSolver::curPoints(), triSurfaceTools::curvatures(), faMatrix< Type >::D(), fvMatrix< Type >::D(), volumetricBSplinesDesignVariables::dCdb(), cyclicFaPatch::delta(), fvMesh::delta(), cyclicFvPatch::delta(), cyclicACMIFvPatch::delta(), cyclicAMIFvPatch::delta(), basicFvGeometryScheme::deltaCoeffs(), sigmoidalHeaviside::derivative(), smoothHeaviside::derivative(), linearInterpolation::derivative(), DESModelRegions::DESModelRegions(), adjointkOmegaSST::devReff(), solarCalculator::diffuseSolarRad(), adjointRASModel::diffusionCoeffVar1(), adjointSpalartAllmaras::diffusionCoeffVar1(), adjointRASModel::diffusionCoeffVar2(), adjointkOmegaSST::distanceSensitivities(), adjointSpalartAllmaras::distanceSensitivities(), momentumError::divDevRhoReff(), phasePressureModel::divDevRhoReff(), boundaryAdjointContribution::dJdGradU(), boundaryAdjointContribution::dJdnut(), kL< BasicTurbulenceModel >::DkEff(), kOmegaSSTBase< BasicEddyViscosityModel >::DkEff(), NURBS3DVolume::dndbBasedSensitivities(), Bezier::dndbBasedSensitivities(), adjointSpalartAllmaras::DnuTildaEff(), kOmegaSSTBase< BasicEddyViscosityModel >::DomegaEff(), kEpsilonPhitF< BasicTurbulenceModel >::DphitEff(), surfactantProperties::dSigma(), Bezier::dxdbFace(), adjointRotatingWallVelocityFvPatchVectorField::dxdbMult(), shapeDesignVariables::dxdbVol(), volumetricBSplinesDesignVariables::dxdbVol(), lookup::e(), constantAbsorption::e(), multiBandAbsorption::e(), solidAbsorption::e(), faMesh::edgeLengthCorrection(), faPatch::edgeNormals(), PatchTools::edgeNormals(), ThermoCloud< CloudType >::Ep(), LESModel< BasicTurbulenceModel >::epsilon(), sigma< BasicTurbulenceModel >::epsilon(), kEpsilon< BasicTurbulenceModel >::epsilonSource(), LaunderSharmaKE< BasicTurbulenceModel >::epsilonSource(), realizableKE< BasicTurbulenceModel >::epsilonSource(), RNGkEpsilon< BasicTurbulenceModel >::epsilonSource(), age::execute(), boundedBackwardFaDdtScheme::facDdt(), polyPatch::faceCellCentres(), boundBox::faceCentres(), primitiveMeshTools::faceConcavity(), primitiveMeshTools::faceFlatness(), cellQuality::faceNonOrthogonality(), polyMeshTools::faceOrthogonality(), primitiveMeshTools::faceOrthogonality(), mappedPatchBase::facePoints(), cellQuality::faceSkewness(), polyMeshTools::faceSkewness(), primitiveMeshTools::faceSkewness(), polyMeshTools::faceWeights(), parseDriver::field_cellCentre(), parseDriver::field_cellSelection(), parseDriver::field_faceSelection(), parseDriver::field_rand(), sizeDistribution::filterField(), NURBS3DSurface::findClosestSurfacePoint(), fft::forwardTransform(), interfaceTrackingFvMesh::freeSurfacePressureJump(), interfaceTrackingFvMesh::freeSurfaceSnGradU(), interfaceTrackingFvMesh::freeSurfaceSnGradUn(), noiseFFT::frequencies(), SpalartAllmarasBase< BasicEddyViscosityModel >::ft2(), relaxedNonOrthoGaussLaplacianScheme< Type, GType >::fvmLaplacian(), heThermo< BasicThermo, MixtureType >::gamma(), adjointkOmegaSST::gamma(), kOmegaSSTBase< BasicEddyViscosityModel >::gamma(), kOmegaSSTBase< BasicEddyViscosityModel >::GbyNu0(), Foam::getBoundedColours(), Foam::getField(), ATCstandard::getFISensitivityTerm(), cancelATC::getFISensitivityTerm(), adjointSolver::getObjectiveSensitivities(), blockMesh::globalPosition(), adjointEikonalSolver::gradEikonal(), lduMatrix::H1(), faMesh::haloFaceCentres(), faMesh::haloFaceNormals(), MassTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), heheuPsiThermo< BasicPsiThermo, MixtureType >::heu(), boundBox::hexCorners(), rotorDiskSource::inflowVelocity(), cyclicFaPatch::interfaceInternalField(), processorFaPatch::interfaceInternalField(), cyclicFvPatch::interfaceInternalField(), cyclicACMIFvPatch::interfaceInternalField(), cyclicAMIFvPatch::interfaceInternalField(), processorFvPatch::interfaceInternalField(), lduPrimitiveProcessorInterface::interfaceInternalField(), oversetFvPatch::interfaceInternalField(), cyclicACMIGAMGInterface::internalFieldTransfer(), cyclicAMIGAMGInterface::internalFieldTransfer(), cyclicGAMGInterface::internalFieldTransfer(), oversetGAMGInterface::internalFieldTransfer(), oversetFvPatch::internalFieldTransfer(), calculatedProcessorGAMGInterface::internalFieldTransfer(), AssemblyFvPatch< CyclicType >::internalFieldTransfer(), cyclicFaPatch::internalFieldTransfer(), leastSquaresEdgeInterpolation< Type >::interpolate(), Foam::inv(), coordinateSystem::invTransformPointImpl(), sigma< BasicTurbulenceModel >::k(), heSolidThermo< BasicSolidThermo, MixtureType >::Kappa(), multiphaseInterSystem::kappaEff(), diffusionGasEvaporation< Thermo, OtherThermo >::Kexp(), interfaceHeatResistance< Thermo, OtherThermo >::Kexp(), interfaceOxideRate< Thermo, OtherThermo >::Kexp(), kineticGasEvaporation< Thermo, OtherThermo >::Kexp(), kL< BasicTurbulenceModel >::kSource(), kOmegaSSTBase< BasicEddyViscosityModel >::kSource(), dynamicKEqn< BasicTurbulenceModel >::kSource(), kEqn< BasicTurbulenceModel >::kSource(), kEpsilon< BasicTurbulenceModel >::kSource(), LaunderSharmaKE< BasicTurbulenceModel >::kSource(), realizableKE< BasicTurbulenceModel >::kSource(), RNGkEpsilon< BasicTurbulenceModel >::kSource(), interfaceHeatResistance< Thermo, OtherThermo >::KSu(), boundaryAdjointContributionIncompressible::laminarDiffusivity(), kOmegaSSTDES< BasicTurbulenceModel >::LESRegion(), SpalartAllmarasDES< BasicTurbulenceModel >::LESRegion(), upwind< Type >::limiter(), cylindrical::localToGlobal(), meshRefinement::makeDisplacementField(), mappedPatchFieldBase< Type >::mappedWeightField(), speciesSorptionFvPatchScalarField::mass(), noiseModel::meanPf(), momentOfInertia::meshInertia(), regionModel1D::moveMesh(), laminar::mut(), processorFaPatch::neighbEdgeNormals(), faPatch::ngbPolyPatchFaceNormals(), faPatch::ngbPolyPatchPointNormals(), basicFvGeometryScheme::nonOrthCorrectionVectors(), basicFvGeometryScheme::nonOrthDeltaCoeffs(), cellQuality::nonOrthogonality(), RASModelVariables::nut(), generalizedNewtonian< BasicMomentumTransportModel >::nut(), laminarModel< BasicTurbulenceModel >::nut(), Stokes< BasicTurbulenceModel >::nut(), adjointRASModel::nutJacobianTMVar1(), adjointRASModel::nutJacobianTMVar2(), RASModelVariables::nutPatchField(), noiseModel::octaves(), LESModel< BasicTurbulenceModel >::omega(), kOmegaSSTBase< BasicEddyViscosityModel >::omegaSource(), NURBS3DVolume::patchDxDb(), NURBS3DVolume::patchDxDbFace(), enthalpySorptionFvPatchScalarField::patchSource(), speciesSorptionFvPatchScalarField::patchSource(), noiseModel::Pf(), noiseFFT::Pf(), semiPermeableBaffleMassFractionFvPatchScalarField::phiY(), PatchTools::pointNormals(), searchableCone::points(), searchableCylinder::points(), searchablePlate::points(), searchableSurfaceCollection::points(), treeBoundBox::points(), lumpedPointMovement::pointsDisplacement(), lumpedPointMovement::pointsPosition(), projectCurveEdge::position(), projectEdge::position(), blockEdge::position(), PhaseCompressibleTurbulenceModel< TransportModel >::pPrime(), PhaseIncompressibleTurbulenceModel< TransportModel >::pPrime(), PhaseCompressibleTurbulenceModel< TransportModel >::pPrimef(), PhaseIncompressibleTurbulenceModel< TransportModel >::pPrimef(), filmTurbulenceModel::primaryRegionFriction(), noiseModel::PSDf(), SpalartAllmarasDES< BasicTurbulenceModel >::psi(), greyDiffusiveViewFactorFixedValueFvPatchScalarField::qro(), kOmegaSSTBase< BasicEddyViscosityModel >::Qsas(), adjointSpalartAllmaras::r(), diffusionMulticomponent< ReactionThermo, ThermoType >::R(), laminar< ReactionThermo >::R(), noCombustion< ReactionThermo >::R(), InertPhaseModel< BasePhaseModel >::R(), lookup::rDiff(), opaqueDiffusive::rDiff(), transparent::rDiff(), lumpedPointMovement::readDict(), reader::readField(), updateMethod::readOrZeroField(), fft::realTransform1D(), pointFieldReconstructor::reconstructField(), lduMatrix::residual(), fft::reverseTransform(), ReynoldsAnalogy::rho(), forces::rho(), heThermo< BasicThermo, MixtureType >::rhoEoS(), coordinateSystem::rotationsImpl(), lookup::rSpec(), opaqueDiffusive::rSpec(), transparent::rSpec(), Foam::safeLog10(), mappedPatchBase::samplePoints(), FriedrichModel::separatedMassRatio(), OwenRyleyModel::separatedMassRatio(), coalCloudList::Sh(), ThermoCloud< CloudType >::Sh(), electrostaticDepositionFvPatchScalarField::sigma(), ThermoCloud< CloudType >::sigmap(), edgeInterpolation::skewCorrectionVectors(), cellQuality::skewness(), fvMatrix< Type >::solveSegregated(), timeVaryingMassSorptionFvPatchScalarField::source(), coalCloudList::Srho(), coalCloudList::SU(), Foam::sumNeighbours(), interfaceTrackingFvMesh::surfaceTensionGrad(), coalCloudList::SYi(), lookup::t(), opaqueDiffusive::t(), opaqueReflective::t(), transparent::t(), constantTransmissivity::t(), multiBandTransmissivity::t(), heThermo< BasicPsiThermo, MixtureType >::THE(), heThermo< BasicThermo, MixtureType >::THE(), boundaryAdjointContributionIncompressible::thermalDiffusion(), dynamicContactAngleForce::theta(), constantAlphaContactAngleFvPatchScalarField::theta(), dynamicAlphaContactAngleFvPatchScalarField::theta(), timeVaryingAlphaContactAngleFvPatchScalarField::theta(), targetCoeffTrim::thetag(), Spiegler::TLeid(), RASModelVariables::TMVar1(), RASModelVariables::TMVar2(), boundaryAdjointContribution::TMVariable1(), boundaryAdjointContribution::TMVariable1Diffusion(), boundaryAdjointContribution::TMVariable2(), boundaryAdjointContribution::TMVariable2Diffusion(), adjointLaminar::topologySensitivities(), cyclicFaPatch::transfer(), sixDoFRigidBodyMotion::transform(), coordinateSystem::transformPointImpl(), rigidBodyMotion::transformPoints(), noiseModel::uniformFrequencies(), faMesh::unitLe(), fvMesh::unitSf(), triSurfaceTools::vertexNormals(), triSurfaceTools::vertexTriads(), blockMesh::vertices(), polyMeshTools::volRatio(), MassTransferPhaseSystem< BasePhaseSystem >::volTransfer(), waveModel::waterLevel(), surfaceFieldValue::weightingFactor(), basicFvGeometryScheme::weights(), general::x(), TableBase< Type >::x(), general::y(), nutkWallFunctionFvPatchScalarField::yPlus(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm(), and boundaryRadiationProperties::zoneTransmissivity().

|
inlinestatic |
The type-name, constructed from type-name of T.
Definition at line 28 of file tmpI.H.
References Foam::name(), and T.
Referenced by tmp< T >::tmp().


|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
True if this is a managed pointer (not a reference)
Definition at line 198 of file tmpI.H.
Referenced by tmp< T >::isTmp(), tmp< T >::operator=(), regIOobject::store(), and tmp< T >::tmp().

|
inlinenoexcept |
True if this is a reference (not a pointer)
Definition at line 206 of file tmpI.H.
Referenced by atmNutSource::atmNutSource(), and atmPlantCanopyTurbSource::atmPlantCanopyTurbSource().

|
inlinenoexcept |
True if this is a non-null managed pointer with a unique ref-count.
Definition at line 214 of file tmpI.H.
Referenced by DispersionRASModel< CloudType >::cacheFields(), and BrownianMotionForce< CloudType >::cacheFields().

|
inlinenoexcept |
Return pointer without nullptr checking.
Definition at line 268 of file tmp.H.
Referenced by refPtr< Foam::List >::cref(), refPtr< T >::reset(), and regIOobject::store().

|
inlinenoexcept |
|
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 221 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by incompressibleAdjointSolver::accumulateBCSensitivityIntegrand(), patchCellsSource::addSup(), DispersionRASModel< CloudType >::cacheFields(), BrownianMotionForce< CloudType >::cacheFields(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat(), tmp< T >::constCast(), kL< BasicTurbulenceModel >::correct(), EBRSM< BasicTurbulenceModel >::correct(), filmSeparation::correct(), FilterField::evaluate(), adjointSpalartAllmaras::FISensitivityTerm(), parseDriver::getField(), probes::getOrLoadField(), sampledSets::getOrLoadField(), leastSquaresEdgeInterpolation< Type >::interpolate(), tmp< Foam::edgeInterpolationScheme< scalar > >::operator const Foam::edgeInterpolationScheme< scalar > &(), tmp< T >::operator()(), parseDriver::patchInternalField(), parseDriver::patchNeighbourField(), parseDriver::patchNormalField(), FriedrichModel::separatedMassRatio(), OwenRyleyModel::separatedMassRatio(), regIOobject::store(), objectiveForce::update_dxdbMultiplier(), objectiveMoment::update_dxdbMultiplier(), and regionSizeDistribution::write().


|
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 235 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by MRFZoneList::absolute(), incompressibleAdjointSolver::accumulateGradDxDbMultiplier(), adjointNull::accumulateGradDxDbMultiplier(), jouleHeatingSource::addSup(), SemiImplicitSource< Type >::addSup(), phaseChange::addToDriftRate(), adjointkOmegaSST::adjointMeanFlowSource(), coordSetWriter::adjustFieldTemplate(), surfaceWriter::adjustFieldTemplate(), surfaceWriter::adjustSurface(), multiphaseInterSystem::alphaEff(), multiphaseInterSystem::alphahe(), MassTransferPhaseSystem< BasePhaseSystem >::alphaTransfer(), shapeDesignVariables::assembleSensitivities(), Foam::atan2(), Foam::fac::average(), Foam::fvc::average(), add::calcFieldType(), subtract::calcFieldType(), cellMDLimitedGrad< Type >::calcGrad(), faceLimitedGrad< Type >::calcGrad(), faceMDLimitedGrad< Type >::calcGrad(), nutUSpaldingWallFunctionFvPatchScalarField::calcNut(), geometricElementTransformPointSmoother::cellQuality(), treeDataEdge::centres(), Zuber::CHF(), HuaXu::CHFSubCool(), Tatsumoto::CHFSubCool(), Foam::cmptMag(), NURBS3DVolume::computeParametricCoordinates(), ISQP::computeResiduals(), MMA::computeResiduals(), nullSpace::computeResiduals(), ISQP::computeRHSForDeltaX(), Foam::constrainHbyA(), ShapeSensitivitiesBase::constructVolSensitivtyField(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::correct(), kL< BasicTurbulenceModel >::correct(), adjointkOmegaSST::correct(), adjointSpalartAllmaras::correct(), kkLOmega::correct(), LamBremhorstKE::correct(), LienCubicKE::correct(), LienLeschziner::correct(), qZeta::correct(), ShihQuadraticKE::correct(), mixtureKEpsilon< BasicTurbulenceModel >::correct(), kOmegaSSTBase< BasicEddyViscosityModel >::correct(), SpalartAllmarasBase< BasicEddyViscosityModel >::correct(), Maxwell< BasicTurbulenceModel >::correct(), DeardorffDiffStress< BasicTurbulenceModel >::correct(), EBRSM< BasicTurbulenceModel >::correct(), kEpsilonPhitF< BasicTurbulenceModel >::correct(), kOmega< BasicTurbulenceModel >::correct(), LaunderSharmaKE< BasicTurbulenceModel >::correct(), LRR< BasicTurbulenceModel >::correct(), realizableKE< BasicTurbulenceModel >::correct(), RNGkEpsilon< BasicTurbulenceModel >::correct(), SSG< BasicTurbulenceModel >::correct(), correctedLnGrad< Type >::correction(), fourthLnGrad< Type >::correction(), correctedSnGrad< Type >::correction(), faceCorrectedSnGrad< Type >::correction(), deferredCorrection< Type >::correction(), linearUpwind< Type >::correction(), linearUpwindV< Type >::correction(), CentredFitSnGradScheme< Type, Polynomial, Stencil >::correction(), cubic< Type >::correction(), outletStabilised< Type >::correction(), pointLinear< Type >::correction(), MassTransferPhaseSystem< BasePhaseSystem >::correctMassSources(), kOmegaSSTLM< BasicTurbulenceModel >::correctReThetatGammaInt(), multiphaseInterSystem::Cp(), multiphaseInterSystem::CpByCpv(), multiphaseInterSystem::Cpv(), Foam::fvc::curl(), motionSmootherAlgo::curPoints(), displacementLaplacianFvMotionSolver::curPoints(), displacementSBRStressFvMotionSolver::curPoints(), solidBodyDisplacementLaplacianFvMotionSolver::curPoints(), velocityLaplacianFvMotionSolver::curPoints(), laplacianMotionSolver::curPoints(), pLaplacianMotionSolver::curPoints(), rigidBodyMeshMotion::curPoints(), sixDoFRigidBodyMotionSolver::curPoints(), multiphaseInterSystem::Cv(), InterfaceCompositionModel< Thermo, OtherThermo >::D(), fvMatrix< Type >::DD(), MomentumTransferPhaseSystem< BasePhaseSystem >::ddtCorrByAs(), sigmoidalHeaviside::derivative(), smoothHeaviside::derivative(), BorrvallPeterssonInterpolation::derivative(), expInterpolation::derivative(), invBP::derivative(), SIMPInterpolation::derivative(), sinhInterpolation::derivative(), tanhInterpolation::derivative(), nonlinearEddyViscosity< BasicTurbulenceModel >::devRhoReff(), ISQP::diagPreconditioner(), adjointSpalartAllmaras::distanceSensitivities(), Foam::fam::div(), Foam::fac::div(), snappySnapDriver::doSnap(), adjointSpalartAllmaras::dr_dDelta(), adjointkOmegaSST::dR_dF1(), adjointkOmegaSST::dR_dnut(), adjointSpalartAllmaras::dr_dNuTilda(), adjointSpalartAllmaras::dr_dStilda(), SpalartAllmarasDES< BasicTurbulenceModel >::dTilda(), Foam::fac::edgeIntegrate(), Foam::fac::edgeSum(), edgeInterpolationScheme< Type >::euclidianInterpolate(), PopeIndex::execute(), scalarTransport::execute(), kOmegaSSTBase< BasicEddyViscosityModel >::F23(), EulerFaD2dt2Scheme< Type >::facD2dt2(), backwardFaDdtScheme< Type >::facDdt(), EulerFaDdtScheme< Type >::facDdt(), boundedBackwardFaDdtScheme::facDdt(), backwardFaDdtScheme< Type >::facDdt0(), EulerFaDdtScheme< Type >::facDdt0(), boundedBackwardFaDdtScheme::facDdt0(), gaussConvectionScheme< Type >::facDiv(), gaussLaplacianScheme< Type >::facLaplacian(), EulerFaD2dt2Scheme< Type >::famD2dt2(), boundedBackwardFaDdtScheme::famDdt(), backwardFaDdtScheme< Type >::famDdt(), EulerFaDdtScheme< Type >::famDdt(), gaussConvectionScheme< Type >::famDiv(), gaussLaplacianScheme< Type >::famLaplacian(), adjointkOmegaSST::FISensitivityTerm(), adjointSpalartAllmaras::FISensitivityTerm(), correctedSnGrad< Type >::fullGradCorrection(), faceCorrectedSnGrad< Type >::fullGradCorrection(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), ddtScheme< Type >::fvcDdtPhiCoeff(), ddtScheme< Type >::fvcDdtPhiCoeffExperimental(), steadyStateDdtScheme< Type >::fvcDdtPhiCorr(), steadyStateDdtScheme< Type >::fvcDdtUfCorr(), gaussConvectionScheme< Type >::fvcDiv(), fusedGaussConvectionScheme< Type >::fvcDiv(), gaussLaplacianScheme< Type, GType >::fvcLaplacian(), relaxedNonOrthoGaussLaplacianScheme< Type, GType >::fvcLaplacian(), fusedGaussLaplacianScheme< Type, GType >::fvcLaplacian(), EulerD2dt2Scheme< Type >::fvmD2dt2(), backwardDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), EulerDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), gaussConvectionScheme< Type >::fvmDiv(), fusedGaussConvectionScheme< Type >::fvmDiv(), gaussLaplacianScheme< Type, GType >::fvmLaplacian(), relaxedNonOrthoGaussLaplacianScheme< Type, GType >::fvmLaplacian(), fusedGaussLaplacianScheme< Type, GType >::fvmLaplacian(), gaussLaplacianScheme< Type, GType >::fvmLaplacianUncorrected(), relaxedNonOrthoGaussLaplacianScheme< Type, GType >::fvmLaplacianUncorrected(), fusedGaussLaplacianScheme< Type, GType >::fvmLaplacianUncorrected(), multiphaseInterSystem::gamma(), MMA::gConstr(), fvMeshDistribute::generateTestField(), NURBS3DVolume::getDxDb(), ATCstandard::getFISensitivityTerm(), MMA::getOrDefaultScalarField(), cylindrical::globalToLocal(), Foam::fac::grad(), multiphaseInterSystem::hc(), MassTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), AnisothermalPhaseModel< BasePhaseModel >::heEqn(), LBFGS::HessianDiag(), LBFGS::HessianVectorProduct(), BreenWestwater::htcFilmBoil(), Bromley::htcFilmBoil(), InterfaceCompositionPhaseChangePhaseSystem< BasePhaseSystem >::iDmdt(), surfaceInterpolationScheme< scalar >::interpolate(), edgeInterpolationScheme< Type >::interpolate(), surfaceInterpolationScheme< Type >::interpolate(), singleCellFvMesh::interpolate(), localMax< Type >::interpolate(), localMin< Type >::interpolate(), Foam::interpolate(), pointVolInterpolation::interpolate(), Foam::inv(), LBFGS::invHessianVectorProduct(), ISQP::invHFL(), ReynoldsStress< BasicTurbulenceModel >::k(), multiphaseInterSystem::K(), adjointkOmegaSST::kaEqnSourceFromCDkOmega(), multiphaseInterSystem::kappa(), interfaceOxideRate< Thermo, OtherThermo >::Kexp(), PhiScheme< Type, PhiLimiter >::limiter(), optimisationManager::lineSearchUpdate(), lnGradScheme< Type >::lnGrad(), Foam::fvc::magSqrGradGrad(), adjointSimple::mainIter(), processorFaPatch::makeCorrectionVectors(), processorFaPatch::makeDeltaCoeffs(), volPointInterpolationAdjoint::makeWeights(), cyclicACMIFvPatchField< Type >::manipulateMatrix(), cyclicAMIFvPatchField< Type >::manipulateMatrix(), mappedPatchFieldBase< Type >::mappedWeightField(), ISQP::matrixVectorProduct(), CoEulerDdtScheme< Type >::meshPhi(), localEulerDdtScheme< Type >::meshPhi(), SLTSDdtScheme< Type >::meshPhi(), Jeschar::MHF(), multiphaseInterSystem::mu(), Foam::fac::ndiv(), faPatchField< Type >::New(), fvPatchField< Type >::New(), Foam::fac::ngrad(), oversetFvMeshBase::normalisation(), multiphaseSystem::nu(), multiphaseInterSystem::nu(), JohnsonJacksonSchaeffer::nu(), MMA::p(), jumpCyclicAMIFvPatchField< Type >::patchNeighbourField(), topODesignVariables::penalty(), MMA::pLamda(), Foam::pow(), kineticTheoryModel::pPrime(), phasePressureModel::pPrime(), phasePressureModel::pPrimef(), boundaryAdjointContributionIncompressible::pressureSource(), MMA::q(), MMA::qLamda(), Kutadeladze::qNucleate(), nonlinearEddyViscosity< BasicTurbulenceModel >::R(), Foam::fvc::reconstruct(), Foam::fvc::reconstructMag(), MRFZoneList::relative(), ISQP::resFGs(), ISQP::resFL(), multiphaseInterSystem::rho(), fvDOM::Ru(), kOmegaSSTDDES< BasicTurbulenceModel >::S2(), kOmegaSSTDES< BasicTurbulenceModel >::S2(), ISQP::ShermanMorrisonRank1Update(), electrostaticDepositionFvPatchScalarField::sigma(), skewCorrectedEdgeInterpolation< Type >::skewCorrection(), skewCorrected< Type >::skewCorrection(), snGradScheme< Type >::snGrad(), twoPhaseSystem::solve(), fvMatrix< Type >::solveSegregated(), noiseModel::SPL(), LBFGS::SR1HessianDiag(), LBFGS::SR1HessianVectorProduct(), Foam::stabilise(), regionFunctionObject::store(), regionFunctionObject::storeInDb(), Foam::fvc::surfaceIntegrate(), surfaceNormalFixedValueFvPatchVectorField::surfaceNormalFixedValueFvPatchVectorField(), Foam::fvc::surfaceSum(), boundaryAdjointContributionIncompressible::tangentVelocitySource(), Foam::transform(), Foam::transformPoints(), function1::Tsat(), polynomial::Tsat(), phaseSystem::U(), designVariablesUpdate::update(), inverseDistance::update(), objectiveForce::update_dxdbMultiplier(), objectiveMoment::update_dxdbMultiplier(), electrostaticDepositionFvPatchScalarField::updateCoeffs(), surfaceNormalFixedValueFvPatchVectorField::updateCoeffs(), uniformNormalFixedValueFvPatchVectorField::updateCoeffs(), adjointFarFieldPressureFvPatchScalarField::updateCoeffs(), adjointFarFieldVelocityFvPatchVectorField::updateCoeffs(), adjointOutletPressureFvPatchScalarField::updateCoeffs(), adjointWallVelocityLowReFvPatchVectorField::updateCoeffs(), timeVaryingMassSorptionFvPatchScalarField::updateCoeffs(), enthalpySorptionFvPatchScalarField::updateCoeffs(), lumpedMassWallTemperatureFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), designVariablesUpdate::updateGradientsAndValues(), boundaryAdjointContributionIncompressible::velocitySource(), MassTransferPhaseSystem< BasePhaseSystem >::volTransfer(), adjointkOmegaSST::waEqnSourceFromCDkOmega(), extendedCellToFaceStencil::weightedSum(), extendedFaceToCellStencil::weightedSum(), extendedUpwindCellToFaceStencil::weightedSum(), faNVDscheme< Type, NVDweight >::weights(), clippedLinear< Type >::weights(), limitedSurfaceInterpolationScheme< Type >::weights(), outletStabilised< Type >::weights(), triSurfaceTools::writeCurvature(), Foam::edgeMeshTools::writeFeatureProximity(), Foam::ensightOutput::writeVolField(), nutUWallFunctionFvPatchScalarField::yPlus(), MRFZoneList::zeroFilter(), and wallLubricationModel::zeroGradWalls().

|
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 297 of file tmp.H.
References tmp< T >::cref(), and Foam::T().
Referenced by LESfilter::correctBoundaryConditions(), kaqRWallFunctionFvPatchScalarField::manipulateMatrix(), waveAlphaFvPatchScalarField::updateCoeffs(), and waveVelocityFvPatchVectorField::updateCoeffs().


|
inline |
Return managed pointer for reuse, or clone() the object reference.
Definition at line 256 of file tmpI.H.
Referenced by polyPatch::areaFraction(), DispersionRASModel< CloudType >::cacheFields(), BrownianMotionForce< CloudType >::cacheFields(), refPtr< Foam::List >::emplace(), gaussLaplacianScheme< Type, GType >::fvmLaplacian(), fusedGaussLaplacianScheme< Type, GType >::fvmLaplacian(), PtrDynList< T, SizeMin >::push_back(), PtrList< T >::push_back(), HashPtrTable< T, Key, Hash >::set(), PtrDynList< T, SizeMin >::set(), PtrListDictionary< T >::set(), regIOobject::store(), regionFunctionObject::store(), regionFunctionObject::storeInDb(), and PtrList< Foam::radiation::boundaryRadiationPropertiesPatch >::try_emplace().

|
inlinenoexcept |
If object pointer points to valid object: delete object and set pointer to nullptr.
Definition at line 289 of file tmpI.H.
Referenced by MRFZoneList::absolute(), incompressibleAdjointSolver::accumulateGradDxDbMultiplier(), boundBox::add(), adjointkOmegaSST::adjointMeanFlowSource(), lduMatrix::Amul(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::correct(), kL< BasicTurbulenceModel >::correct(), LamBremhorstKE::correct(), LienLeschziner::correct(), mixtureKEpsilon< BasicTurbulenceModel >::correct(), kOmegaSSTBase< BasicEddyViscosityModel >::correct(), SpalartAllmarasBase< BasicEddyViscosityModel >::correct(), dynamicKEqn< BasicTurbulenceModel >::correct(), kEqn< BasicTurbulenceModel >::correct(), EBRSM< BasicTurbulenceModel >::correct(), kEpsilonPhitF< BasicTurbulenceModel >::correct(), kOmega< BasicTurbulenceModel >::correct(), LaunderSharmaKE< BasicTurbulenceModel >::correct(), RNGkEpsilon< BasicTurbulenceModel >::correct(), kOmegaSSTLM< BasicTurbulenceModel >::correctReThetatGammaInt(), triSurfaceTools::curvatures(), Foam::fvc::DDt(), Foam::fac::div(), Foam::fam::div(), Foam::fvc::div(), Foam::fvm::div(), adjointkOmegaSST::divUMeanFlowSource(), edgeInterpolationScheme< Type >::euclidianInterpolate(), adjointSpalartAllmaras::FISensitivityTerm(), Foam::fvc::flux(), fft::forwardTransform(), updateMethod::globalSum(), fvMeshSubsetProxy::interpolate(), leastSquaresEdgeInterpolation< Type >::interpolate(), edgeInterpolationScheme< Type >::interpolate(), Foam::inv(), Foam::fam::laplacian(), Foam::fac::laplacian(), adjointSimple::mainIter(), meshedSurfRef::movePoints(), Foam::fac::ndiv(), Foam::fam::ndiv(), adjointkOmegaSST::nutMeanFlowSource(), anisotropicFilter::operator()(), noiseFFT::Pf(), realizableKE< BasicTurbulenceModel >::rCmu(), fft::realTransform1D(), Foam::fvc::reconstructMag(), MRFZoneList::relative(), fft::reverseTransform(), snGradScheme< Type >::snGrad(), Foam::stabilise(), lduMatrix::Tmul(), Foam::transform(), PatchFunction1< Type >::transform(), Foam::transformPoints(), objectiveForce::update_dxdbMultiplier(), objectiveMoment::update_dxdbMultiplier(), Foam::fvc::volumeIntegrate(), Foam::writeAreaFields(), Foam::writeDimFields(), Foam::writePointField(), and Foam::writeVolFields().
|
inlinenoexcept |
Use specified protection against moving for the managed pointer. No-op for references.
Definition at line 307 of file tmpI.H.
Referenced by regIOobject::store().

Clear existing and transfer ownership.
Definition at line 338 of file tmpI.H.
Referenced by coordSetWriter::adjustFieldTemplate(), surfaceWriter::adjustFieldTemplate(), Foam::constrainHbyA(), FilterField::evaluate(), fusedGaussGrad< Type >::fusedGaussGrad(), gaussGrad< Type >::gaussGrad(), tmp< T >::operator=(), sampledDistanceSurface::sampleOnIsoSurfacePoints(), sampledIsoSurface::sampleOnIsoSurfacePoints(), sampledCuttingPlane::sampleOnIsoSurfacePoints(), and regionSizeDistribution::write().

|
inlinenoexcept |
|
inline |
Reset with emplace construction. Return reference to the new content.
Definition at line 357 of file tmpI.H.
References args, clear(), and Foam::T().
Referenced by probes::getOrLoadField(), and sampledSets::getOrLoadField().


|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Swaps the managed object with other.
Definition at line 418 of file tmpI.H.
Referenced by FilterField::evaluate().

|
inline |
Dereferences (const) pointer to the managed object.
Fatal for a null managed pointer.
Definition at line 435 of file tmpI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

|
inline |
|
inline |
Return const reference to the object - same as cref() method.
Definition at line 424 of file tmp.H.
References tmp< T >::cref().

|
inlineexplicitnoexcept |
|
inline |
Transfer ownership of the managed pointer.
Fatal for a null managed pointer or if the object is const.
Definition at line 470 of file tmpI.H.
References Foam::abort(), clear(), Foam::FatalError, FatalErrorInFunction, tmp< T >::is_pointer(), Foam::name(), and Foam::T().

|
inline |
Take ownership of the pointer.
Fatal for a null pointer, or when the pointer is non-unique.
Definition at line 525 of file tmpI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, p, and reset().

|
inlinenoexcept |
Reset via assignment from literal nullptr.
Definition at line 464 of file tmp.H.
References tmp< T >::reset().

|
inlinenoexcept |
Identical to good(), or bool operator.
Definition at line 472 of file tmp.H.
References bool.
Referenced by SemiImplicitSource< Type >::addSup(), MassTransferPhaseSystem< BasePhaseSystem >::alphaTransfer(), basicMultiComponentMixture::basicMultiComponentMixture(), parseDriver::getField(), MassTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), fvMeshSubsetProxy::interpolate(), parseDriver::patchInternalField(), parseDriver::patchNeighbourField(), parseDriver::patchNormalField(), twoPhaseSystem::solve(), MassTransferPhaseSystem< BasePhaseSystem >::volTransfer(), and subCycleField< GeometricField >::~subCycleField().

|
inlinenoexcept |
Identical to is_pointer(). Prefer is_pointer() or movable().
Definition at line 480 of file tmp.H.
References tmp< T >::is_pointer().

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