Foam::foamVersion Namespace Reference

Namespace for OpenFOAM version information. More...

Functions

bool patched ()
 Test if the patch string appears to be in use, which is when it is defined (non-zero). More...
 
unsigned labelByteSize (const std::string &str)
 Extract label size (in bytes) from "label=" tag in string. More...
 
unsigned scalarByteSize (const std::string &str)
 Extract scalar size (in bytes) from "scalar=" tag in string. More...
 
void printBuildInfo (std::ostream &os, const bool full=true)
 Print information about version, build, arch to output stream. More...
 
std::string configuredProjectDir ()
 Compile-time definition of the OpenFOAM project directory or empty if not defined. More...
 
std::string configuredEtcDir ()
 Compile-time definition of the OpenFOAM etc/ directory or empty if not defined. More...
 

Variables

const int api
 OpenFOAM api number (integer) corresponding to the value of OPENFOAM at the time of compilation. More...
 
const std::string patch
 OpenFOAM patch number as a std::string. More...
 
const std::string build
 OpenFOAM build information as a std::string. More...
 
const std::string buildArch
 OpenFOAM build architecture information (machine endian, label/scalar sizes) as a std::string. More...
 
const std::string version
 OpenFOAM version (name or stringified number) as a std::string. More...
 

Detailed Description

Namespace for OpenFOAM version information.

Version information.

Note
Compile-time version information is conveyed by the OPENFOAM define provided in the wmake rules "General/general" and compile-time configuration of some paths via FOAM_EXTRA_CXXFLAGS:
  • FOAM_CONFIGURED_PROJECT_DIR
  • FOAM_CONFIGURED_PROJECT_ETC

For example,

FOAM_EXTRA_CXXFLAGS='-DFOAM_CONFIGURED_PROJECT_ETC=\"/etc/openfoam\"'

The foamVersion.H file is located directly in the src/OpenFOAM/include directory for easier use by external packages and to allow easier modification during packaging.

Source files

Function Documentation

◆ patched()

bool Foam::foamVersion::patched ( )

Test if the patch string appears to be in use, which is when it is defined (non-zero).

Referenced by argList::parse(), error::write(), and IOerror::write().

Here is the caller graph for this function:

◆ labelByteSize()

unsigned Foam::foamVersion::labelByteSize ( const std::string &  str)

Extract label size (in bytes) from "label=" tag in string.

Referenced by ITstream::extract(), IOstream::fatalCheckNativeSizes(), and IOobject::parseHeader().

Here is the caller graph for this function:

◆ scalarByteSize()

unsigned Foam::foamVersion::scalarByteSize ( const std::string &  str)

Extract scalar size (in bytes) from "scalar=" tag in string.

Referenced by ITstream::extract(), IOstream::fatalCheckNativeSizes(), and IOobject::parseHeader().

Here is the caller graph for this function:

◆ printBuildInfo()

void Foam::foamVersion::printBuildInfo ( std::ostream &  os,
const bool  full = true 
)

Print information about version, build, arch to output stream.

Eg,

Using: OpenFOAM-<VER> (API) - visit www.openfoam.com
Build: <BUILD> (patch=...)
Arch: <ARCH_INFO>
Parameters
osthe output stream
fullincludes Arch information

Referenced by argList::argList(), argList::parse(), and argList::printUsage().

Here is the caller graph for this function:

◆ configuredProjectDir()

std::string Foam::foamVersion::configuredProjectDir ( )

Compile-time definition of the OpenFOAM project directory or empty if not defined.

Functional equivalent to WM_PROJECT_DIR.

◆ configuredEtcDir()

std::string Foam::foamVersion::configuredEtcDir ( )

Compile-time definition of the OpenFOAM etc/ directory or empty if not defined.

Functional equivalent to WM_PROJECT_DIR/etc

Variable Documentation

◆ api

◆ patch

const std::string patch

OpenFOAM patch number as a std::string.

Referenced by incompressibleAdjointSolver::accumulateBCSensitivityIntegrand(), incompressibleAdjointSolver::accumulateGradDxDbMultiplier(), topOVariablesBase::addBoundaryFacesToIsoline(), objectiveFlowRate::addHeaderColumns(), objectiveFlowRatePartition::addHeaderColumns(), objectiveFlowRatePartition::addHeaderInfo(), oversetFvMeshBase::addInterpolation(), topOZones::addIOcellsZone(), fvMeshTools::addPatch(), adjointkOmegaSST::addWallFunctionTerms(), adjointkOmegaSST::adjointMeanFlowSource(), pairPatchAgglomeration::agglomerate(), alphatWallBoilingWallFunctionFvPatchScalarField::alphatWallBoilingWallFunctionFvPatchScalarField(), advancingFrontAMI::appendNbrFaces(), sensitivitySurface::assembleSensitivities(), sensitivitySurfacePoints::assembleSensitivities(), atmBoundaryLayerInletEpsilonFvPatchScalarField::atmBoundaryLayerInletEpsilonFvPatchScalarField(), atmBoundaryLayerInletKFvPatchScalarField::atmBoundaryLayerInletKFvPatchScalarField(), atmBoundaryLayerInletOmegaFvPatchScalarField::atmBoundaryLayerInletOmegaFvPatchScalarField(), atmBoundaryLayerInletVelocityFvPatchVectorField::atmBoundaryLayerInletVelocityFvPatchVectorField(), FreeStream< CloudType >::autoMap(), faMesh::boundaryPoints(), nearWallFields::calcAddressing(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat(), nutLowReWallFunctionFvPatchScalarField::calcNut(), nutkWallFunctionFvPatchScalarField::calcNut(), nutUWallFunctionFvPatchScalarField::calcNut(), nutUTabulatedWallFunctionFvPatchScalarField::calcNut(), nutkRoughWallFunctionFvPatchScalarField::calcNut(), nutkFilmWallFunctionFvPatchScalarField::calcNut(), nutUBlendedWallFunctionFvPatchScalarField::calcNut(), atmNutUWallFunctionFvPatchScalarField::calcNut(), nutUSpaldingWallFunctionFvPatchScalarField::calcNut(), atmNutkWallFunctionFvPatchScalarField::calcNut(), atmNutWallFunctionFvPatchScalarField::calcNut(), createShellMesh::calcPointRegions(), atmOmegaWallFunctionFvPatchScalarField::calculate(), atmEpsilonWallFunctionFvPatchScalarField::calculate(), omegaWallFunctionFvPatchScalarField::calculate(), epsilonWallFunctionFvPatchScalarField::calculate(), nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus(), nutkFilmWallFunctionFvPatchScalarField::calcUTau(), nutUBlendedWallFunctionFvPatchScalarField::calcUTau(), nutUSpaldingWallFunctionFvPatchScalarField::calcUTau(), nutUWallFunctionFvPatchScalarField::calcYPlus(), deltaBoundary::cellCenters_d(), FaceCellWave< Foam::wallPointData< bool > >::checkCyclic(), nutWallFunctionFvPatchScalarField::checkType(), alphatJayatillekeWallFunctionFvPatchScalarField::checkType(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::checkType(), atmAlphatkWallFunctionFvPatchScalarField::checkType(), processorGAMGInterfaceField::clone(), NURBS3DVolume::computeControlPointSensitivities(), sensitivityShapeESI::computeDxDbMult(), sensitivitySurface::computeFaceDerivativesSize(), betaMax::computeLength(), NURBS3DVolume::computeMaxBoundaryDisplacement(), NURBS3DVolume::computeNewBoundaryPoints(), adjointSpalartAllmaras::conservativeMomentumSource(), sensitivitySurfacePoints::constructGlobalPointNormalsAndAreas(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), cellDistFuncs::correctBoundaryCells(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), AMIInterpolation::createTree(), adjointSpalartAllmaras::distanceSensitivities(), Bezier::dndbBasedSensitivities(), NURBS3DVolume::dndbBasedSensitivities(), adjointkOmegaSST::dR_dnut(), Bezier::dxdbFace(), adjointRotatingWallVelocityFvPatchVectorField::dxdbMult(), engineMesh::engineMesh(), directionInfo::enterDomain(), FaceCellWave< Foam::wallPointData< bool > >::enterDomain(), epsilonWallFunctionFvPatchScalarField::epsilon(), alphaContactAngleTwoPhaseFvPatchScalarField::evaluate(), surfaceDistance::execute(), yPlus::execute(), extractEulerianParticles::execute(), externalWallHeatFluxTemperatureFvPatchScalarField::externalWallHeatFluxTemperatureFvPatchScalarField(), faceCells::faceCells(), faMesh::faces(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField(), distanceSurface::filterPrepareRegionSplit(), sensitivitySurfacePoints::finalisePointSensitivities(), treeDataPrimitivePatch< PatchType >::findIntersection(), adjointSpalartAllmaras::FISensitivityTerm(), FreeStream< CloudType >::FreeStream(), omegaWallFunctionFvPatchScalarField::G(), epsilonWallFunctionFvPatchScalarField::G(), FaceCellWave< Foam::wallPointData< bool > >::getChangedPatchFaces(), NURBS3DVolume::getDxCellsDb(), ATCstandard::getFISensitivityTerm(), combineFaces::getMergeSets(), boundaryMesh::getNPoints(), cellDistFuncs::getPointNeighbours(), adjointFarFieldPressureFvPatchScalarField::gradientBoundaryCoeffs(), adjointFarFieldPressureFvPatchScalarField::gradientInternalCoeffs(), FaceCellWave< Foam::wallPointData< bool > >::handleAMICyclicPatches(), FaceCellWave< Foam::wallPointData< bool > >::handleCyclicPatches(), particle< Type >::hitBoundaryFace(), particle< Type >::hitCyclicACMIPatch(), particle< Type >::hitCyclicAMIPatch(), particle< Type >::hitCyclicPatch(), DSMCParcel< ParcelType >::hitWallPatch(), humidityTemperatureCoupledMixedFvPatchScalarField::humidityTemperatureCoupledMixedFvPatchScalarField(), FreeStream< CloudType >::inflow(), movingConeTopoFvMesh::init(), marchingCells::initialise(), extractEulerianParticles::initialiseBins(), fluxSummary::initialiseCellZoneAndDirection(), topODesignVariables::initialize(), faMesh::internalPoints(), patchTransformedInterpolation::interpolate(), volPointInterpolationAdjoint::interpolateSensitivitiesField(), objectivePartialVolume::J(), objectiveMoment::J(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::kappa(), FaceCellWave< Foam::wallPointData< bool > >::leaveDomain(), Foam::levelSetFraction(), solidBodyMotionDisplacementPointPatchVectorField::localPoints0(), waveModel::lookupOrCreate(), lumpedPointDisplacementPointPatchVectorField::lumpedPointDisplacementPointPatchVectorField(), kaqRWallFunctionFvPatchScalarField::manipulateMatrix(), waWallFunctionFvPatchScalarField::manipulateMatrix(), adjointOutletVelocityFluxFvPatchVectorField::manipulateMatrix(), adjointWallVelocityFvPatchVectorField::manipulateMatrix(), mixedEnergyFvPatchScalarField::manipulateMatrix(), omegaWallFunctionFvPatchScalarField::manipulateMatrix(), epsilonWallFunctionFvPatchScalarField::manipulateMatrix(), fvMeshAdder::MapSurfaceField(), fvMeshAdder::MapVolField(), betaMax::markProcessorEdges(), cellDistFuncs::maxPatchSize(), FaceCellWave< Foam::wallPointData< bool > >::mergeFaceInfo(), meshRefinement::mergePatchFaces(), meshRefinement::mergePatchFacesUndo(), faceZone::meshEdges(), fvMotionSolverEngineMesh::move(), lumpedPointDisplacementPointPatchVectorField::movement(), cyclicAMIFvPatch::movePoints(), boundaryAdjointContribution::New(), fvPatch::New(), facePointPatch::New(), waveModel::New(), objectivePartialVolume::objectivePartialVolume(), omegaWallFunctionFvPatchScalarField::omega(), findNearestMaskedOp< PatchType >::operator()(), treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::operator()(), adjointFarFieldPressureFvPatchScalarField::operator*=(), adjointFarFieldPressureFvPatchScalarField::operator/=(), adjointOutletVelocityFvPatchVectorField::operator=(), adjointOutletVelocityFluxFvPatchVectorField::operator=(), filmHeightInletVelocityFvPatchVectorField::operator=(), argList::parse(), NURBS3DVolume::patchDxDb(), NURBS3DVolume::patchDxDbFace(), boundaryMesh::patchify(), wallBoundedParticle::patchInteraction(), speciesSorptionFvPatchScalarField::patchSource(), semiPermeableBaffleMassFractionFvPatchScalarField::phiY(), pointCells::pointCells(), faMesh::points(), particle< Type >::prepareForParallelTransfer(), greyDiffusiveViewFactorFixedValueFvPatchScalarField::qro(), regionSplit2D::regionSplit2D(), cyclicACMIPolyPatch::resetAMI(), pLaplacianMotionSolver::setBoundaryConditions(), laplacianMotionSolver::setBoundaryConditions(), displacementMethodelasticityMotionSolver::setMotionField(), patchInjectionBase::setPositionAndCell(), addPatchCellLayer::setRefinement(), foamReport::setStaticBuiltins(), cellDistFuncs::smallestDist(), Foam::fvc::smooth(), adjointFarFieldPressureFvPatchScalarField::snGrad(), Helmholtz::solveEqn(), timeVaryingMassSorptionFvPatchScalarField::source(), Foam::fvc::spread(), cellDistFuncs::sumPatchSize(), Foam::fvc::sweep(), timeVaryingAlphaContactAngleFvPatchScalarField::theta(), dynamicAlphaContactAngleFvPatchScalarField::theta(), temperatureDependentAlphaContactAngleFvPatchScalarField::theta(), triSurfaceTools::triangulate(), triSurfaceTools::triangulateFaceCentre(), boundaryMesh::triangulateLocal(), advancingFrontAMI::triangulatePatch(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::turbulentTemperatureRadCoupledMixedFvPatchScalarField(), movingConeTopoFvMesh::update(), objectiveForce::update_boundarydJdGradU(), objectiveForce::update_boundarydJdnut(), objectiveMoment::update_boundarydJdnut(), objectiveMoment::update_boundarydJdp(), objectivePartialVolume::update_dSdbMultiplier(), objectiveMoment::update_dSdbMultiplier(), objectivePartialVolume::update_dxdbDirectMultiplier(), objectiveMoment::update_dxdbDirectMultiplier(), objectiveForce::update_dxdbMultiplier(), objectiveMoment::update_dxdbMultiplier(), adjointOutletNuaTildaFvPatchScalarField::updateCoeffs(), adjointOutletKaFvPatchScalarField::updateCoeffs(), adjointOutletWaFvPatchScalarField::updateCoeffs(), freeSurfaceVelocityFvPatchVectorField::updateCoeffs(), adjointFarFieldTMVar2FvPatchScalarField::updateCoeffs(), adjointFarFieldTMVar1FvPatchScalarField::updateCoeffs(), fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs(), adjointFarFieldVelocityFvPatchVectorField::updateCoeffs(), adjointFarFieldNuaTildaFvPatchScalarField::updateCoeffs(), adjointOutletPressureFvPatchScalarField::updateCoeffs(), gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs(), mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs(), adjointOutletNuaTildaFluxFvPatchScalarField::updateCoeffs(), fixedEnergyFvPatchScalarField::updateCoeffs(), mixedEnergyFvPatchScalarField::updateCoeffs(), adjointOutletVelocityFluxFvPatchVectorField::updateCoeffs(), inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs(), inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs(), adjointWallVelocityFvPatchVectorField::updateCoeffs(), wideBandDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), waveAlphaFvPatchScalarField::updateCoeffs(), waveVelocityFvPatchVectorField::updateCoeffs(), JohnsonJacksonParticleSlipFvPatchVectorField::updateCoeffs(), alphaFixedPressureFvPatchScalarField::updateCoeffs(), JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs(), semiPermeableBaffleVelocityFvPatchVectorField::updateCoeffs(), copiedFixedValueFvPatchScalarField::updateCoeffs(), adjointFarFieldPressureFvPatchScalarField::updateCoeffs(), fixedIncidentRadiationFvPatchScalarField::updateCoeffs(), greyDiffusiveViewFactorFixedValueFvPatchScalarField::updateCoeffs(), gradientEnergyFvPatchScalarField::updateCoeffs(), fixedShearStressFvPatchVectorField::updateCoeffs(), SRFWallVelocityFvPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs(), filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs(), convectiveHeatTransferFvPatchScalarField::updateCoeffs(), alphatWallFunctionFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), lumpedMassWallTemperatureFvPatchScalarField::updateCoeffs(), atmBoundaryLayerInletKFvPatchScalarField::updateCoeffs(), turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs(), lumpedPointDisplacementPointPatchVectorField::updateCoeffs(), semiPermeableBaffleMassFractionFvPatchScalarField::updateCoeffs(), freeSurfacePressureFvPatchScalarField::updateCoeffs(), wallHeatTransferFvPatchScalarField::updateCoeffs(), atmBoundaryLayerInletOmegaFvPatchScalarField::updateCoeffs(), outletMappedUniformInletHeatAdditionFvPatchField::updateCoeffs(), fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs(), atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs(), SRFFreestreamVelocityFvPatchVectorField::updateCoeffs(), atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs(), greyDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs(), SRFVelocityFvPatchVectorField::updateCoeffs(), alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs(), alphatFilmWallFunctionFvPatchScalarField::updateCoeffs(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs(), atmAlphatkWallFunctionFvPatchScalarField::updateCoeffs(), atmTurbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(), filmHeightInletVelocityFvPatchVectorField::updateCoeffs(), timeVaryingMassSorptionFvPatchScalarField::updateCoeffs(), omegaWallFunctionFvPatchScalarField::updateCoeffs(), outletMachNumberPressureFvPatchScalarField::updateCoeffs(), epsilonWallFunctionFvPatchScalarField::updateCoeffs(), enthalpySorptionFvPatchScalarField::updateCoeffs(), waveMakerPointPatchVectorField::updateCoeffs(), externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs(), sorptionWallFunctionFvPatchScalarField::updateCoeffs(), speciesSorptionFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs(), alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs(), patchFaceOrientation::updateEdge(), patchEdgeFaceRegions::updateEdge(), patchEdgeFaceInfo::updateEdge(), patchFaceOrientation::updateFace(), patchEdgeFaceRegions::updateFace(), patchEdgeFaceInfo::updateFace(), patchInjectionBase::updateMesh(), omegaWallFunctionFvPatchScalarField::updateWeightedCoeffs(), epsilonWallFunctionFvPatchScalarField::updateWeightedCoeffs(), mappedPatchBase::upToDate(), LookupField< Type >::value(), adjointSpalartAllmaras::wallShapeSensitivities(), AC3DsurfaceFormat< Face >::write(), dsmcFields::write(), sensitivitySurfacePoints::write(), lumpedPointDisplacementPointPatchVectorField::write(), yPlus::write(), error::write(), IOerror::write(), externalCoupledTemperatureMixedFvPatchScalarField::writeData(), topOVariablesBase::writeSurfaceFiles(), interfaceTrackingFvMesh::writeVTK(), Foam::writeZone(), alphatJayatillekeWallFunctionFvPatchScalarField::yPlus(), nutLowReWallFunctionFvPatchScalarField::yPlus(), nutkWallFunctionFvPatchScalarField::yPlus(), nutUWallFunctionFvPatchScalarField::yPlus(), nutUTabulatedWallFunctionFvPatchScalarField::yPlus(), nutkFilmWallFunctionFvPatchScalarField::yPlus(), nutUBlendedWallFunctionFvPatchScalarField::yPlus(), nutUSpaldingWallFunctionFvPatchScalarField::yPlus(), nutURoughWallFunctionFvPatchScalarField::yPlus(), adjointkOmegaSST::zeroFirstCell(), meshRefinement::zonify(), and lumpedPointDisplacementPointPatchVectorField::~lumpedPointDisplacementPointPatchVectorField().

◆ build

const std::string build

OpenFOAM build information as a std::string.

Referenced by argList::parse(), foamReport::setStaticBuiltins(), and profilingSysInfo::writeEntries().

◆ buildArch

const std::string buildArch

OpenFOAM build architecture information (machine endian, label/scalar sizes) as a std::string.

Referenced by argList::parse(), foamReport::setStaticBuiltins(), and IOobject::writeHeaderContent().

◆ version