Merge remote-tracking branch 'origin/merge-foundation' into adjust-config-foundation-merge
This commit is contained in:
@ -110,6 +110,7 @@ Foam::functionObjects::DESModelRegions::~DESModelRegions()
|
||||
|
||||
bool Foam::functionObjects::DESModelRegions::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
writeFile::read(dict);
|
||||
|
||||
dict.readIfPresent("resultName", resultName_);
|
||||
|
||||
@ -144,6 +144,7 @@ Foam::functionObjects::PecletNo::PecletNo
|
||||
rhoName_("rho")
|
||||
{
|
||||
setResultName("Pe", "phi");
|
||||
read(dict);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,6 +63,12 @@ Foam::functionObjects::XiReactionRate::~XiReactionRate()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::functionObjects::XiReactionRate::read(const dictionary& dict)
|
||||
{
|
||||
return fvMeshFunctionObject::read(dict);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::XiReactionRate::execute()
|
||||
{
|
||||
return true;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -107,10 +107,13 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Read the reaction rate data
|
||||
virtual bool read(const dictionary&);
|
||||
|
||||
//- Do nothing
|
||||
virtual bool execute();
|
||||
|
||||
//- Write the cell-centre fields
|
||||
//- Write the reaction rate fields
|
||||
virtual bool write();
|
||||
};
|
||||
|
||||
|
||||
@ -63,9 +63,7 @@ Foam::functionObjects::components::components
|
||||
)
|
||||
:
|
||||
fieldExpression(name, runTime, dict)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -151,6 +151,8 @@ Foam::functionObjects::ddt2::~ddt2()
|
||||
|
||||
bool Foam::functionObjects::ddt2::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
if (word(mesh_.ddtScheme("default")) == "steadyState")
|
||||
{
|
||||
WarningInFunction
|
||||
|
||||
@ -854,6 +854,8 @@ bool Foam::functionObjects::externalCoupled::end()
|
||||
|
||||
bool Foam::functionObjects::externalCoupled::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
dict.readIfPresent("enabled", enabled_);
|
||||
|
||||
if (!enabled_)
|
||||
|
||||
@ -619,6 +619,7 @@ Foam::functionObjects::fluxSummary::~fluxSummary()
|
||||
|
||||
bool Foam::functionObjects::fluxSummary::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
writeFile::read(dict);
|
||||
|
||||
mode_ = modeTypeNames_.read(dict.lookup("mode"));
|
||||
|
||||
@ -61,9 +61,7 @@ Foam::functionObjects::grad::grad
|
||||
)
|
||||
:
|
||||
fieldExpression(name, runTime, dict)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -92,6 +92,8 @@ Foam::functionObjects::histogram::~histogram()
|
||||
|
||||
bool Foam::functionObjects::histogram::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("field") >> fieldName_;
|
||||
dict.lookup("max") >> max_;
|
||||
min_ = dict.lookupOrDefault<scalar>("min", 0);
|
||||
|
||||
@ -64,9 +64,7 @@ Foam::functionObjects::mag::mag
|
||||
)
|
||||
:
|
||||
fieldExpression(name, runTime, dict)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -64,9 +64,7 @@ Foam::functionObjects::magSqr::magSqr
|
||||
)
|
||||
:
|
||||
fieldExpression(name, runTime, dict)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -166,6 +166,8 @@ Foam::functionObjects::mapFields::~mapFields()
|
||||
|
||||
bool Foam::functionObjects::mapFields::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("fields") >> fieldNames_;
|
||||
createInterpolation(dict);
|
||||
return true;
|
||||
|
||||
@ -60,7 +60,12 @@ void Foam::functionObjects::nearWallFields::calcAddressing()
|
||||
DebugInFunction << "nPatchFaces: " << globalWalls.size() << endl;
|
||||
|
||||
// Construct cloud
|
||||
Cloud<findCellParticle> cloud(mesh_, IDLList<findCellParticle>());
|
||||
Cloud<findCellParticle> cloud
|
||||
(
|
||||
mesh_,
|
||||
cloud::defaultName,
|
||||
IDLList<findCellParticle>()
|
||||
);
|
||||
|
||||
// Add particles to track to sample locations
|
||||
nPatchFaces = 0;
|
||||
|
||||
@ -230,6 +230,8 @@ Foam::functionObjects::pressure::~pressure()
|
||||
|
||||
bool Foam::functionObjects::pressure::read(const dictionary& dict)
|
||||
{
|
||||
fieldExpression::read(dict);
|
||||
|
||||
dict.readIfPresent("U", UName_);
|
||||
dict.readIfPresent("rho", rhoName_);
|
||||
|
||||
|
||||
@ -267,6 +267,7 @@ bool Foam::functionObjects::reactionsSensitivityAnalysis<chemistryType>::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
writeFile::read(dict);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -353,6 +353,8 @@ Foam::functionObjects::regionSizeDistribution::~regionSizeDistribution()
|
||||
|
||||
bool Foam::functionObjects::regionSizeDistribution::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("field") >> alphaName_;
|
||||
dict.lookup("patches") >> patchNames_;
|
||||
dict.lookup("threshold") >> threshold_;
|
||||
|
||||
@ -507,6 +507,8 @@ Foam::functionObjects::streamLineBase::~streamLineBase()
|
||||
|
||||
bool Foam::functionObjects::streamLineBase::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
Info<< type() << " " << name() << ":" << nl;
|
||||
|
||||
dict.lookup("fields") >> fields_;
|
||||
|
||||
@ -74,6 +74,8 @@ bool Foam::functionObjects::surfaceInterpolate::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("fields") >> fieldSet_;
|
||||
|
||||
return true;
|
||||
|
||||
@ -146,6 +146,8 @@ Foam::functionObjects::turbulenceFields::~turbulenceFields()
|
||||
|
||||
bool Foam::functionObjects::turbulenceFields::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
if (dict.found("field"))
|
||||
{
|
||||
fieldSet_.insert(word(dict.lookup("field")));
|
||||
|
||||
@ -106,6 +106,7 @@ Foam::functionObjects::valueAverage::~valueAverage()
|
||||
|
||||
bool Foam::functionObjects::valueAverage::read(const dictionary& dict)
|
||||
{
|
||||
regionFunctionObject::read(dict);
|
||||
writeFile::read(dict);
|
||||
|
||||
dict.lookup("functionObjectName") >> functionObjectName_;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,6 +62,12 @@ Foam::functionObjects::writeCellCentres::~writeCellCentres()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::functionObjects::writeCellCentres::read(const dictionary& dict)
|
||||
{
|
||||
return fvMeshFunctionObject::read(dict);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::writeCellCentres::execute()
|
||||
{
|
||||
return true;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -107,6 +107,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Read the cell-centre rate data
|
||||
virtual bool read(const dictionary&);
|
||||
|
||||
//- Do nothing
|
||||
virtual bool execute();
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,6 +62,12 @@ Foam::functionObjects::writeCellVolumes::~writeCellVolumes()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::functionObjects::writeCellVolumes::read(const dictionary& dict)
|
||||
{
|
||||
return fvMeshFunctionObject::read(dict);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::writeCellVolumes::execute()
|
||||
{
|
||||
return true;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -106,10 +106,13 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Read the cell-volume data
|
||||
virtual bool read(const dictionary&);
|
||||
|
||||
//- Do nothing
|
||||
virtual bool execute();
|
||||
|
||||
//- Write the cell-centre fields
|
||||
//- Write the cell-volume fields
|
||||
virtual bool write();
|
||||
};
|
||||
|
||||
|
||||
@ -156,25 +156,27 @@ void Foam::functionObjects::forceCoeffs::writeIntegratedData
|
||||
const List<Field<scalar>>& coeff
|
||||
) const
|
||||
{
|
||||
if (!log)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
scalar pressure = sum(coeff[0]);
|
||||
scalar viscous = sum(coeff[1]);
|
||||
scalar porous = sum(coeff[2]);
|
||||
scalar total = pressure + viscous + porous;
|
||||
|
||||
if (log)
|
||||
Info<< " " << title << " : " << total << token::TAB
|
||||
<< "("
|
||||
<< "pressure: " << pressure << token::TAB
|
||||
<< "viscous: " << viscous;
|
||||
|
||||
if (porosity_)
|
||||
{
|
||||
Info<< " " << title << " : " << total << token::TAB
|
||||
<< "("
|
||||
<< "pressure: " << pressure << token::TAB
|
||||
<< "viscous: " << viscous;
|
||||
|
||||
if (porosity_)
|
||||
{
|
||||
Info<< token::TAB << "porous: " << porous;
|
||||
}
|
||||
|
||||
Info<< ")" << endl;
|
||||
Info<< token::TAB << "porous: " << porous;
|
||||
}
|
||||
|
||||
Info<< ")" << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -388,21 +390,21 @@ bool Foam::functionObjects::forceCoeffs::execute()
|
||||
if (writeFields_)
|
||||
{
|
||||
const volVectorField& force =
|
||||
obr_.lookupObject<volVectorField>(fieldName("force"));
|
||||
lookupObject<volVectorField>(fieldName("force"));
|
||||
|
||||
const volVectorField& moment =
|
||||
obr_.lookupObject<volVectorField>(fieldName("moment"));
|
||||
lookupObject<volVectorField>(fieldName("moment"));
|
||||
|
||||
volVectorField& forceCoeff =
|
||||
const_cast<volVectorField&>
|
||||
(
|
||||
obr_.lookupObject<volVectorField>(fieldName("forceCoeff"))
|
||||
lookupObject<volVectorField>(fieldName("forceCoeff"))
|
||||
);
|
||||
|
||||
volVectorField& momentCoeff =
|
||||
const_cast<volVectorField&>
|
||||
(
|
||||
obr_.lookupObject<volVectorField>(fieldName("momentCoeff"))
|
||||
lookupObject<volVectorField>(fieldName("momentCoeff"))
|
||||
);
|
||||
|
||||
dimensionedScalar f0("f0", dimForce, Aref_*pDyn);
|
||||
@ -421,10 +423,10 @@ bool Foam::functionObjects::forceCoeffs::write()
|
||||
if (writeFields_)
|
||||
{
|
||||
const volVectorField& forceCoeff =
|
||||
obr_.lookupObject<volVectorField>(fieldName("forceCoeff"));
|
||||
lookupObject<volVectorField>(fieldName("forceCoeff"));
|
||||
|
||||
const volVectorField& momentCoeff =
|
||||
obr_.lookupObject<volVectorField>(fieldName("momentCoeff"));
|
||||
lookupObject<volVectorField>(fieldName("momentCoeff"));
|
||||
|
||||
forceCoeff.write();
|
||||
momentCoeff.write();
|
||||
|
||||
@ -90,6 +90,8 @@ Foam::functionObjects::runTimePostProcessing::~runTimePostProcessing()
|
||||
|
||||
bool Foam::functionObjects::runTimePostProcessing::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
Info<< type() << " " << name() << ": reading post-processing data" << endl;
|
||||
|
||||
scene_.read(dict);
|
||||
|
||||
@ -75,6 +75,7 @@ Foam::functionObjects::dsmcFields::~dsmcFields()
|
||||
|
||||
bool Foam::functionObjects::dsmcFields::read(const dictionary& dict)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -114,6 +114,8 @@ Foam::functionObjects::abort::~abort()
|
||||
|
||||
bool Foam::functionObjects::abort::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
if (dict.found("action"))
|
||||
{
|
||||
action_ = actionTypeNames_.read(dict.lookup("action"));
|
||||
|
||||
@ -184,6 +184,8 @@ bool Foam::codedFunctionObject::end()
|
||||
|
||||
bool Foam::codedFunctionObject::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
// Backward compatibility
|
||||
if (dict.found("redirectType"))
|
||||
{
|
||||
|
||||
@ -72,6 +72,8 @@ Foam::functionObjects::removeRegisteredObject::~removeRegisteredObject()
|
||||
|
||||
bool Foam::functionObjects::removeRegisteredObject::read(const dictionary& dict)
|
||||
{
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
dict.lookup("objects") >> objectNames_;
|
||||
|
||||
return true;
|
||||
|
||||
@ -77,6 +77,8 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
fvMeshFunctionObject::read(dict);
|
||||
|
||||
const dictionary& conditionsDict = dict.subDict("conditions");
|
||||
const wordList conditionNames(conditionsDict.toc());
|
||||
conditions_.setSize(conditionNames.size());
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -92,6 +92,8 @@ bool Foam::functionObjects::setTimeStepFunctionObject::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
timeStepPtr_ = Function1<scalar>::New("deltaT", dict);
|
||||
|
||||
// Check that adjustTimeStep is active
|
||||
|
||||
@ -74,6 +74,8 @@ Foam::functionObjects::systemCall::~systemCall()
|
||||
|
||||
bool Foam::functionObjects::systemCall::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
dict.readIfPresent("executeCalls", executeCalls_);
|
||||
dict.readIfPresent("endCalls", endCalls_);
|
||||
dict.readIfPresent("writeCalls", writeCalls_);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -103,6 +103,8 @@ bool Foam::functionObjects::timeActivatedFileUpdate::read
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
dict.lookup("fileToUpdate") >> fileToUpdate_;
|
||||
dict.lookup("timeVsFile") >> timeVsFile_;
|
||||
|
||||
|
||||
@ -122,6 +122,8 @@ Foam::functionObjects::writeDictionary::~writeDictionary()
|
||||
|
||||
bool Foam::functionObjects::writeDictionary::read(const dictionary& dict)
|
||||
{
|
||||
regionFunctionObject::read(dict);
|
||||
|
||||
wordList dictNames(dict.lookup("dictNames"));
|
||||
HashSet<word> uniqueNames(dictNames);
|
||||
dictNames_ = uniqueNames.toc();
|
||||
|
||||
@ -98,6 +98,8 @@ Foam::functionObjects::writeObjects::~writeObjects()
|
||||
|
||||
bool Foam::functionObjects::writeObjects::read(const dictionary& dict)
|
||||
{
|
||||
functionObject::read(dict);
|
||||
|
||||
if (dict.found("field"))
|
||||
{
|
||||
objectNames_.setSize(1);
|
||||
|
||||
Reference in New Issue
Block a user