A class for managing temporary objects. More...
Public Types | |
typedef T | Type |
typedef Foam::refCount | refCount |
Public Member Functions | |
tmp (T *=0, bool nonReusable=false) | |
Store object pointer of a non-reusable or reusable temporary object. More... | |
tmp (const T &) | |
Store object const reference. More... | |
tmp (const tmp< T > &) | |
Construct copy and increment reference count. More... | |
tmp (const tmp< T > &&) | |
Construct copy moving content, does not increment reference count. More... | |
tmp (const tmp< T > &, bool allowTransfer) | |
Construct copy transferring content of temporary if required. More... | |
~tmp () | |
Destructor: deletes temporary object when the reference count is 0. More... | |
bool | isTmp () const |
Return true if this is really a temporary object. More... | |
bool | empty () const |
Return true if this temporary object empty,. More... | |
bool | valid () const |
Is this temporary object valid,. More... | |
word | typeName () const |
Return the type name of the tmp. More... | |
T & | ref () const |
Return non-const reference or generate a fatal error. More... | |
T * | ptr () const |
Return tmp pointer for reuse. More... | |
void | clear () const |
If object pointer points to valid object: More... | |
const T & | operator() () const |
Const dereference operator. More... | |
operator const T & () const | |
Const cast to the underlying type reference. More... | |
T * | operator-> () |
Return object pointer. More... | |
const T * | operator-> () const |
Return const object pointer. More... | |
void | operator= (T *) |
Assignment to pointer changing this tmp to a temporary T. More... | |
void | operator= (const tmp< T > &) |
Assignment transferring the temporary T to this tmp. More... | |
void | operator= (const tmp< T > &&) |
Move assignment transferring the temporary T to this tmp. More... | |
A class for managing temporary objects.
typedef Foam::refCount refCount |
|
inline |
|
inline |
Return true if this is really a temporary object.
Definition at line 153 of file tmpI.H.
Referenced by DispersionRASModel< CloudType >::cacheFields(), BrownianMotionForce< CloudType >::cacheFields(), Foam::constrainHbyA(), and Foam::constrainPhiHbyA().
|
inline |
|
inline |
Is this temporary object valid,.
ie, it is a reference or a temporary that has been allocated
Definition at line 167 of file tmpI.H.
Referenced by basicSpecieMixture::basicSpecieMixture(), Foam::meshEdge(), and subCycleField< GeometricField >::~subCycleField().
|
inline |
|
inline |
Return non-const reference or generate a fatal error.
if the object is const.
Definition at line 181 of file tmpI.H.
Referenced by fvMatrix< Type >::A(), MRFZoneList::absolute(), greyMean::aCont(), wideBand::aCont(), interRegionHeatTransfer::addSup(), cloud::aDisp(), pairGAMGAgglomeration::agglomerate(), pairPatchAgglomeration::agglomerate(), GAMGInterface::agglomerateCoeffs(), MomentumCloud< Foam::DSMCCloud >::alpha(), waveAlphaFvPatchScalarField::alphan(), parcelCloudList::ap(), ThermoCloud< Foam::DSMCCloud >::ap(), Foam::atan2(), snappySnapDriver::avgCellCentres(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::boundaryInternalField(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::boundaryNeighbourField(), faceLimitedGrad< Type >::calcGrad(), faceMDLimitedGrad< Type >::calcGrad(), cellMDLimitedGrad< Type >::calcGrad(), curvatureSeparation::calcInvR1(), semiPermeableBaffleMassFractionFvPatchScalarField::calcPhiYp(), rotorDiskSource::calculate(), chemistryModel< ThermoType >::calculateRR(), nutkFilmWallFunctionFvPatchScalarField::calcUTau(), nutUSpaldingWallFunctionFvPatchScalarField::calcUTau(), primitiveMeshTools::cellDeterminant(), heThermo< BasicSolidThermo, MixtureType >::cellSetProperty(), MRFZoneList::centrifugalAcceleration(), Foam::checkMethod(), Foam::cmptAv(), Foam::cmptMag(), Foam::cmptMax(), Foam::cmptMin(), fvPatch::Cn(), FieldField< Foam::fvPatchField, scalar >::component(), Field< PointType >::component(), processorLduInterface::compressedReceive(), fvMeshStitcher::conformalNccBoundaryField(), fvMeshStitcher::conformalOrigBoundaryField(), kinematicSingleLayer::constrainFilmField(), Foam::constrainHbyA(), Foam::constrainPhiHbyA(), searchableBox::coordinates(), searchableSurfaceCollection::coordinates(), triSurfaceMesh::coordinates(), forceList::correct(), thermocapillaryForce::correct(), contactAngleForce::correct(), DeardorffDiffStress< BasicMomentumTransportModel >::correct(), LamBremhorstKE::correct(), ShihQuadraticKE::correct(), kOmega< BasicMomentumTransportModel >::correct(), LienLeschziner::correct(), kEpsilon< compressible::momentumTransportModel >::correct(), LaunderSharmaKE< BasicMomentumTransportModel >::correct(), kOmega2006< BasicMomentumTransportModel >::correct(), SpalartAllmaras< BasicMomentumTransportModel >::correct(), LienCubicKE::correct(), SpalartAllmarasDES< BasicMomentumTransportModel >::correct(), SSG< BasicMomentumTransportModel >::correct(), RNGkEpsilon< BasicMomentumTransportModel >::correct(), realizableKE< BasicMomentumTransportModel >::correct(), lambdaThixotropic< BasicMomentumTransportModel >::correct(), LRR< BasicMomentumTransportModel >::correct(), qZeta::correct(), kEpsilonLopesdaCosta< BasicMomentumTransportModel >::correct(), mixtureKEpsilon< BasicMomentumTransportModel >::correct(), v2f< BasicMomentumTransportModel >::correct(), kkLOmega::correct(), kOmegaSST< eddyViscosity< RASModel< BasicMomentumTransportModel > >, BasicMomentumTransportModel >::correct(), cubic< Type >::correction(), pointLinear< Type >::correction(), CentredFitSnGradScheme< Type, Polynomial, Stencil >::correction(), correctedSnGrad< Type >::correction(), faceCorrectedSnGrad< Type >::correction(), outletStabilised< Type >::correction(), basicSpecieMixture::correctMassFractions(), kOmegaSSTLM< BasicMomentumTransportModel >::correctReThetatGammaInt(), Foam::fvc::curl(), multiSolidBodyMotionSolver::curPoints(), solidBodyMotionSolver::curPoints(), velocityComponentLaplacianFvMotionSolver::curPoints(), interpolatingSolidBodyMotionSolver::curPoints(), displacementSBRStressFvMotionSolver::curPoints(), displacementComponentLaplacianFvMotionSolver::curPoints(), displacementLinearMotionMotionSolver::curPoints(), triSurface::curvature(), fvMatrix< Type >::D(), fvMatrix< Type >::DD(), cyclicAMIFvPatch::delta(), fvMesh::delta(), blackBodyEmission::deltaLambdaT(), nonlinearEddyViscosity< incompressible::RASModel >::devTau(), regionSizeDistribution::divide(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::divq(), nonUnityLewisEddyDiffusivity< TurbulenceThermophysicalTransportModel >::divq(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::divq(), blackBodyEmission::EbDeltaLambdaT(), wideBandCombustion::ECont(), greyMeanCombustion::ECont(), PatchTools::edgeNormals(), cloud::EDisp(), parcelCloudList::Ep(), ThermoCloud< Foam::DSMCCloud >::Ep(), atmBoundaryLayer::epsilon(), Foam::evaluate(), age::execute(), wallHeatTransferCoeff::execute(), scalarTransport::execute(), polyPatch::faceCellCentres(), primitiveMeshTools::faceConcavity(), lduMatrix::faceH(), PatchToPatchInterpolation< FromPatch, ToPatch >::faceInterpolate(), cellQuality::faceNonOrthogonality(), primitiveMeshTools::faceOrthogonality(), mappedPatchBase::facePoints(), polyMeshTools::faceSkewness(), primitiveMeshTools::faceSkewness(), cellQuality::faceSkewness(), PrimitivePatchInterpolation< Foam::PrimitivePatch >::faceToEdgeInterpolate(), PrimitivePatchInterpolation< Foam::PrimitivePatch >::faceToPointInterpolate(), fvMeshStitcher::fieldRMapSum(), surfaceFieldValue::filterField(), fvMatrix< Type >::flux(), fft::forwardTransform(), interfaceProperties::fraction(), correctedSnGrad< Type >::fullGradCorrection(), faceCorrectedSnGrad< Type >::fullGradCorrection(), EulerDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), ddtScheme< Type >::fvcDdtPhiCoeff(), gaussConvectionScheme< Type >::fvcDiv(), gaussLaplacianScheme< Type, GType >::fvcLaplacian(), EulerD2dt2Scheme< Type >::fvmD2dt2(), EulerDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), gaussConvectionScheme< Type >::fvmDiv(), gaussLaplacianScheme< Type, GType >::fvmLaplacian(), gaussLaplacianScheme< Type, GType >::fvmLaplacianUncorrected(), surfaceFieldValue::getFieldValues(), fvMeshStitcher::getOrigNccMagSfb(), lduMatrix::H(), fvMatrix< Type >::H(), lduMatrix::H1(), parcelCloudList::hsCoeff(), parcelCloudList::hsTrans(), ReynoldsAnalogy::htcByRhoCp(), kappaEff::htcByRhoCp(), FieldFunction1< Type, Sine< Type > >::integral(), GAMGInterface::interfaceInternalField(), cyclicAMIGAMGInterface::internalFieldTransfer(), cyclicGAMGInterface::internalFieldTransfer(), isoSurface::interpolate(), pointToPointPlanarInterpolation::interpolate(), PLICU::interpolate(), localMin< Type >::interpolate(), localMax< Type >::interpolate(), PLIC::interpolate(), vtkMesh::interpolate(), interfaceCompressionNew::interpolate(), surfaceInterpolationScheme< GType >::interpolate(), fvMeshSubset::interpolate(), fieldInterpolation< scalar, interpolationCellPoint< scalar > >::interpolate(), cyclicAMIPolyPatch::interpolate(), volPointInterpolation::interpolate(), plane::interpolateField(), isoSurface::interpolateField(), thresholdCellFaces::interpolateField(), patch::interpolateField(), triSurfaceMesh::interpolateField(), AMIInterpolation::interpolateToSource(), AMIInterpolation::interpolateToTarget(), volPointInterpolation::interpolateUnconstrained(), Foam::inv(), isoSurface::isoSurface(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::j(), ReynoldsStress< LESModel< BasicMomentumTransportModel > >::k(), SpalartAllmarasDES< BasicMomentumTransportModel >::k(), atmBoundaryLayer::k(), heSolidThermo< BasicSolidThermo, MixtureType >::Kappa(), Foam::levelSetFraction(), PhiScheme< Type, PhiLimiter >::limiter(), LimitedScheme< Type, Limiter, LimitFunc >::limiter(), Foam::mag(), Foam::magSqr(), Foam::fvc::magSqrGradGrad(), directFieldMapper::map(), distributedWeightedFvPatchFieldMapper::map(), generalFieldMapper::map(), timeVaryingMappedFvPatchField< Type >::map(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), momentOfInertia::meshInertia(), Foam::min(), regionModel1D::moveMesh(), fvMesh::movePoints(), primitiveMesh::movePoints(), Foam::New(), fvMeshStitcher::nonConformalBoundaryField(), cellQuality::nonOrthogonality(), basicSpecieMixture::normalise(), strainRateFunction::nu(), nutkWallFunctionFvPatchScalarField::nut(), nutUWallFunctionFvPatchScalarField::nut(), nutURoughWallFunctionFvPatchScalarField::nut(), nutkAtmRoughWallFunctionFvPatchScalarField::nut(), nutkRoughWallFunctionFvPatchScalarField::nut(), consumptionSpeed::omega0Sigma(), inversePointDistanceDiffusivity::operator()(), anisotropicFilter::operator()(), RaviPetersen::operator()(), Foam::operator/(), heThermo< BasicSolidThermo, MixtureType >::patchFieldProperty(), fvPatch::patchInternalField(), AMIInterpolation::patchMagSf(), jumpCyclicFvPatchField< Type >::patchNeighbourField(), jumpCyclicAMIFvPatchField< Type >::patchNeighbourField(), cyclicAMIFvsPatchField< Type >::patchNeighbourField(), cyclicFvPatchField< Type >::patchNeighbourField(), cyclicAMIFvPatchField< Type >::patchNeighbourField(), kinematicSingleLayer::pe(), noiseFFT::Pf(), specieTransferTemperatureFvPatchScalarField::phiHep(), specieTransferVelocityFvPatchVectorField::phip(), sampledSurface::pointAverage(), PatchToPatchInterpolation< FromPatch, ToPatch >::pointInterpolate(), PatchTools::pointNormals(), boundBox::points(), searchablePlate::points(), searchableCylinder::points(), treeBoundBox::points(), searchableSurfaceCollection::points(), PrimitivePatchInterpolation< Foam::PrimitivePatch >::pointToFaceInterpolate(), projectCurveEdge::position(), projectEdge::position(), blockEdge::position(), Foam::pow(), sampledSurface::project(), Fickian< unityLewisFourier< laminarThermophysicalTransportModel > >::q(), nonUnityLewisEddyDiffusivity< TurbulenceThermophysicalTransportModel >::q(), MaxwellStefan< unityLewisFourier< laminarThermophysicalTransportModel > >::q(), chemistryModel< ThermoType >::Qdot(), laminar::R(), EDC::R(), mappedPatchBase::readListOrField(), processorLduInterface::receive(), Foam::fvc::reconstruct(), MRFZoneList::relative(), fvMatrix< Type >::residual(), LduMatrix< Type, DType, LUType >::residual(), lduMatrix::residual(), fft::reverseTransform(), MomentumCloud< Foam::DSMCCloud >::rhoEff(), fvDOM::Ru(), patchProbes::sample(), probes::sample(), triSurfaceMesh::sampleField(), patch::sampleField(), patchInternalField::sampleField(), sampledSets::sampleLocalType(), mappedPatchBase::samplePoints(), waveSuperposition::scale(), parcelCloudList::Sh(), thermoSingleLayer::Sh(), ThermoCloud< Foam::DSMCCloud >::Sh(), nonlinearEddyViscosity< incompressible::RASModel >::sigma(), temperatureDependent::sigma(), kinematicSingleLayer::sigma(), cloud::sigmaEff(), parcelCloudList::sigmap(), ThermoCloud< Foam::DSMCCloud >::sigmap(), skewCorrected< Type >::skewCorrection(), cellQuality::skewness(), snGradScheme< Type >::snGrad(), LLTMatrix< Type >::solve(), QRMatrix< MatrixType >::solve(), LUscalarMatrix::solve(), thermalBaffle::solveEnergy(), fvModels::source(), fvModel::source(), SlicedGeometricField< Type, PatchField, SlicedPatchField, GeoMesh >::splice(), Foam::sqr(), parcelCloudList::Srho(), ReactingCloud< Foam::DSMCCloud >::Srho(), kinematicSingleLayer::Srho(), Foam::stabilise(), regionFunctionObject::store(), parcelCloudList::SU(), MomentumCloud< Foam::DSMCCloud >::SU(), kinematicSingleLayer::SU(), MPLIC::surfaceAlpha(), parcelCloudList::SYi(), ReactingCloud< Foam::DSMCCloud >::SYi(), thermoSingleLayer::SYi(), fvMeshStitcher::synchronisedBoundaryField(), FieldField< Foam::fvPatchField, scalar >::T(), Field< PointType >::T(), DimensionedField< Type, Foam::pointMesh >::T(), GeometricField< vector, pointPatchField, pointMesh >::T(), chemistryModel< ThermoType >::tc(), temperatureDependentContactAngleForce::theta(), perturbedTemperatureDependentContactAngleForce::theta(), parcelCloudList::theta(), MomentumCloud< Foam::DSMCCloud >::theta(), targetCoeffTrim::thetag(), Foam::transform(), sixDoFRigidBodyMotion::transform(), Foam::transformFieldMask< tensor >(), porosityModel::transformModelData(), Foam::transformPoints(), EulerCoordinateRotation::transformVector(), STARCDCoordinateRotation::transformVector(), axesRotation::transformVector(), cylindrical::transformVector(), triSurface::triSurfInstance(), thermoSingleLayer::Tw(), SRFModel::Uabs(), parcelCloudList::UCoeff(), waveAtmBoundaryLayerSuperposition::UGas(), waveVelocityFvPatchVectorField::Un(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), parcelCloudList::UTrans(), kinematicSingleLayer::Uw(), FieldFunction2< Type, ZeroConstant< Type > >::value(), FieldFunction1< Type, Sine< Type > >::value(), MomentumCloud< Foam::DSMCCloud >::vDotSweep(), heThermo< BasicSolidThermo, MixtureType >::volScalarFieldProperty(), midPoint< Type >::weights(), reverseLinear< Type >::weights(), outletStabilised< Type >::weights(), clippedLinear< Type >::weights(), limitedSurfaceInterpolationScheme< scalar >::weights(), noiseFFT::window(), Table< scalar >::y(), nutUWallFunctionFvPatchScalarField::yPlus(), nutURoughWallFunctionFvPatchScalarField::yPlus(), MRFZoneList::zeroFilter(), Foam::zip(), DimensionedField< Type, Foam::pointMesh >::~DimensionedField(), FSD::~FSD(), Gulders::~Gulders(), and GuldersEGR::~GuldersEGR().
|
inline |
Return tmp pointer for reuse.
Returns a clone if the object is not a temporary
Definition at line 205 of file tmpI.H.
Referenced by DispersionRASModel< CloudType >::cacheFields(), BrownianMotionForce< CloudType >::cacheFields(), Foam::checkMethod(), gaussLaplacianScheme< Type, GType >::fvmLaplacian(), volPointInterpolation::interpolate(), volPointInterpolation::interpolateUnconstrained(), FieldField< Foam::fvPatchField, scalar >::operator=(), sampledSets::sampleLocalType(), PtrListDictionary< fvModel >::set(), regionFunctionObject::store(), and gradScheme< Type >::~gradScheme().
|
inline |
If object pointer points to valid object:
delete object and set pointer to nullptr
Definition at line 237 of file tmpI.H.
Referenced by MRFZoneList::absolute(), lduMatrix::Amul(), boundBox::boundBox(), Foam::checkMethod(), kEqn< BasicMomentumTransportModel >::correct(), LamBremhorstKE::correct(), kOmega< BasicMomentumTransportModel >::correct(), dynamicKEqn< BasicMomentumTransportModel >::correct(), LienLeschziner::correct(), kEpsilon< compressible::momentumTransportModel >::correct(), LaunderSharmaKE< BasicMomentumTransportModel >::correct(), SpalartAllmarasDES< BasicMomentumTransportModel >::correct(), RNGkEpsilon< BasicMomentumTransportModel >::correct(), kEpsilonLopesdaCosta< BasicMomentumTransportModel >::correct(), mixtureKEpsilon< BasicMomentumTransportModel >::correct(), kOmegaSST< eddyViscosity< RASModel< BasicMomentumTransportModel > >, BasicMomentumTransportModel >::correct(), kOmegaSSTLM< BasicMomentumTransportModel >::correctReThetatGammaInt(), Foam::fvc::DDt(), Foam::fvm::div(), Foam::fvc::div(), Foam::fvc::flux(), fft::forwardTransform(), surfaceInterpolationScheme< GType >::interpolate(), Foam::inv(), Foam::min(), anisotropicFilter::operator()(), noiseFFT::Pf(), PatchToPatchInterpolation< FromPatch, ToPatch >::pointInterpolate(), Foam::pow(), realizableKE< BasicMomentumTransportModel >::rCmu(), Foam::fvc::reconstructMag(), MRFZoneList::relative(), fft::reverseTransform(), snGradScheme< Type >::snGrad(), Foam::stabilise(), lduMatrix::Tmul(), Foam::transform(), Foam::transformPoints(), and Foam::fvc::volumeIntegrate().
|
inline |
Const dereference operator.
Definition at line 279 of file tmpI.H.
Referenced by tmp< Foam::surfaceInterpolationScheme< GType > >::clear().
|
inline |
|
inline |
|
inline |