Foam::functionObjects::yPlus::yPlus ( const word& name, const Time& runTime, const dictionary& dict ) : fvMeshFunctionObject(name, runTime, dict), logFiles(obr_, name), writeLocalObjects(obr_, log) { volScalarField* yPlusPtr ( new volScalarField ( IOobject ( type(), mesh_.time().timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), mesh_, dimensionedScalar("0", dimless, 0.0) ) ); mesh_.objectRegistry::store(yPlusPtr); read(dict); resetName(typeName); resetLocalObjectName(typeName); }
Foam::yPlus::yPlus ( const word& name, const objectRegistry& obr, const dictionary& dict, const bool loadFromFiles ) : functionObjectFile(obr, name, typeName), name_(name), obr_(obr), active_(true), log_(true), phiName_("phi") { // Check if the available mesh is an fvMesh, otherwise deactivate if (!isA<fvMesh>(obr_)) { active_ = false; WarningIn ( "yPlus::yPlus" "(" "const word&, " "const objectRegistry&, " "const dictionary&, " "const bool" ")" ) << "No fvMesh available, deactivating " << name_ << nl << endl; } if (active_) { const fvMesh& mesh = refCast<const fvMesh>(obr_); volScalarField* yPlusPtr ( new volScalarField ( IOobject ( type(), mesh.time().timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("0", dimless, 0.0) ) ); mesh.objectRegistry::store(yPlusPtr); } }
Foam::functionObjects::yPlus::yPlus ( const word& name, const Time& runTime, const dictionary& dict ) : writeFiles(name, runTime, dict, name) { if (!isA<fvMesh>(obr_)) { FatalErrorInFunction << "objectRegistry is not an fvMesh" << exit(FatalError); } const fvMesh& mesh = refCast<const fvMesh>(obr_); volScalarField* yPlusPtr ( new volScalarField ( IOobject ( type(), mesh.time().timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("0", dimless, 0.0) ) ); mesh.objectRegistry::store(yPlusPtr); read(dict); resetName(typeName); }