diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index f2adc1b5980a206a1ba01244389e5fc242eb7811..116a158bfa671e131cce917250a4ad889cbabefd 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -134,10 +134,7 @@ Foam::dictionary::dictionary if (iter().keyword().isPattern()) { patterns_.insert(&iter()); - regexps_.insert - ( - autoPtr<regExp>(new regExp(iter().keyword())) - ); + regexps_.insert(autoPtr<regExp>::New(iter().keyword())); } } } @@ -159,10 +156,7 @@ Foam::dictionary::dictionary if (iter().keyword().isPattern()) { patterns_.insert(&iter()); - regexps_.insert - ( - autoPtr<regExp>(new regExp(iter().keyword())) - ); + regexps_.insert(autoPtr<regExp>::New(iter().keyword())); } } } @@ -612,10 +606,7 @@ Foam::entry* Foam::dictionary::add(entry* entryPtr, bool mergeEntry) if (entryPtr->keyword().isPattern()) { patterns_.insert(entryPtr); - regexps_.insert - ( - autoPtr<regExp>(new regExp(entryPtr->keyword())) - ); + regexps_.insert(autoPtr<regExp>::New(entryPtr->keyword())); } return entryPtr; // now an entry in the dictionary @@ -641,10 +632,7 @@ Foam::entry* Foam::dictionary::add(entry* entryPtr, bool mergeEntry) if (entryPtr->keyword().isPattern()) { patterns_.insert(entryPtr); - regexps_.insert - ( - autoPtr<regExp>(new regExp(entryPtr->keyword())) - ); + regexps_.insert(autoPtr<regExp>::New(entryPtr->keyword())); } return entryPtr; // now an entry in the dictionary diff --git a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H index 65b4f73c6db6988f0f019a2ba1d72ad6a48dc4f4..c7850f31248e94feb60bd422bc933bff4e390d4f 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H +++ b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.H @@ -51,7 +51,7 @@ SourceFiles namespace Foam { -// Forward declaration of friend functions and operators +// Forward declarations class dictionaryEntry; Ostream& operator<<(Ostream& os, const dictionaryEntry& e); @@ -75,7 +75,8 @@ public: // Constructors - //- Construct from the parent dictionary and Istream + //- Construct from the parent dictionary and Istream. + // The keyword is extracted from the stream dictionaryEntry(const dictionary& parentDict, Istream& is); //- Construct from the keyword, parent dictionary and a Istream diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index 2453f3760b5d474447e77c5109e978e3ce9b01b9..7a51ae2d6754fcce5296ef31e62c675aaac3dc87 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -100,13 +100,27 @@ bool Foam::dictionary::read(Istream& is, bool keepHeader) return false; } + // The expected end character + int endChar = token::END_BLOCK; token currToken(is); - if (currToken != token::BEGIN_BLOCK) + + if (currToken == token::END_BLOCK) + { + FatalIOErrorInFunction(is) + << "Dictionary input cannot start with '}'" + << exit(FatalIOError); + } + else if (currToken != token::BEGIN_BLOCK) { is.putBack(currToken); + endChar = 0; } - while (!is.eof() && entry::New(*this, is)) + while + ( + !is.eof() + && entry::New(*this, is, entry::inputMode::GLOBAL, endChar) + ) {} if (!keepHeader) diff --git a/src/OpenFOAM/db/dictionary/dictionarySearch.C b/src/OpenFOAM/db/dictionary/dictionarySearch.C index 34bdd4bca9525294757410fe52827dfb22d674ae..4c8ec03c07832be83cb7c6e701e3b2da4d87b847 100644 --- a/src/OpenFOAM/db/dictionary/dictionarySearch.C +++ b/src/OpenFOAM/db/dictionary/dictionarySearch.C @@ -689,10 +689,7 @@ bool Foam::dictionary::changeKeyword if (newKeyword.isPattern()) { patterns_.insert(iter()); - regexps_.insert - ( - autoPtr<regExp>(new regExp(newKeyword)) - ); + regexps_.insert(autoPtr<regExp>::New(newKeyword)); } return true; diff --git a/src/OpenFOAM/db/dictionary/entry/entry.H b/src/OpenFOAM/db/dictionary/entry/entry.H index 5b73b78c7d65b27555f4e3bba13e5ae00cccdfa3..ec7b17bd04624e5d414d39c28851a356cdd61bb5 100644 --- a/src/OpenFOAM/db/dictionary/entry/entry.H +++ b/src/OpenFOAM/db/dictionary/entry/entry.H @@ -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) 2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,14 +51,13 @@ SourceFiles namespace Foam { +// Forward declarations class ITstream; class dictionary; - -// Forward declaration of friend functions and operators - class entry; Ostream& operator<<(Ostream& os, const entry& e); + /*---------------------------------------------------------------------------*\ Class entry Declaration \*---------------------------------------------------------------------------*/ @@ -137,15 +136,36 @@ public: // Note: the parent directory is set to dictionary::null virtual autoPtr<entry> clone() const; - //- Construct from Istream and insert into dictionary + //- Construct from an Istream and insert into the dictionary + // \param parentDict dictionary to insert into + // \param is the input stream + // \param inpMode the input mode. + // The default is to use the currently active #globalInputMode + // \param endChar the expected end character (eg, a closing brace). + // The endChar is 0 if no expectations are asserted. static bool New ( dictionary& parentDict, Istream& is, - const inputMode inMode = inputMode::GLOBAL + const inputMode inpMode = inputMode::GLOBAL, + const int endChar = 0 ); - //- Construct on freestore from Istream and return + //- Construct an entry from Istream. + // The expected input comprises a keyword followed by a + // dictionaryEntry or a primitiveEntry. + // + // - The dictionaryEntry starts with a '{' left brace and ends + // with a '}' right brace. + // - The primitiveEntry ends with a ';' semi-colon. + // + // Example input + // \verbatim + // key1 { ... } // dictionary input + // key2 ... ; // primitive input + // \endverbatim + // + // \return The #entry read, or nullptr on error. static autoPtr<entry> New(Istream& is); //- Reset the #globalInputMode to %merge @@ -153,8 +173,7 @@ public: //- Destructor - virtual ~entry() - {} + virtual ~entry() = default; // Member functions diff --git a/src/OpenFOAM/db/dictionary/entry/entryIO.C b/src/OpenFOAM/db/dictionary/entry/entryIO.C index aea73192715df5db2b363efbeb8de1cd13bcb004..0e50a68e9b3ace8ac6e95b06eaaf649325a1ed95 100644 --- a/src/OpenFOAM/db/dictionary/entry/entryIO.C +++ b/src/OpenFOAM/db/dictionary/entry/entryIO.C @@ -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) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,7 +78,7 @@ bool Foam::entry::getKeyword(keyType& keyword, Istream& is) return true; } - // Do some more checking + // Mark as invalid, but allow for some more checking if (keyToken == token::END_BLOCK || is.eof()) { return false; @@ -89,7 +89,7 @@ bool Foam::entry::getKeyword(keyType& keyword, Istream& is) << "--> FOAM Warning :" << nl << " From function " << FUNCTION_NAME << nl << " in file " << __FILE__ << " at line " << __LINE__ << nl - << " Reading " << is.name().c_str() << nl + << " Reading " << is.name() << nl << " found " << keyToken << nl << " expected either " << token::END_BLOCK << " or EOF" << std::endl; @@ -101,24 +101,23 @@ bool Foam::entry::New ( dictionary& parentDict, Istream& is, - const entry::inputMode inMode + const entry::inputMode inpMode, + const int endChar ) { // The inputMode for dealing with duplicate entries const entry::inputMode mode = ( - inMode == inputMode::GLOBAL + inpMode == inputMode::GLOBAL ? globalInputMode - : inMode + : inpMode ); // If somehow the global itself is 'global' - this is a severe logic error. if (mode == inputMode::GLOBAL) { - FatalIOErrorInFunction - ( - is - ) << "Cannot use 'GLOBAL' as an inputMode" + FatalIOErrorInFunction(is) + << "Cannot use 'GLOBAL' as an inputMode" << exit(FatalIOError); } @@ -130,37 +129,63 @@ bool Foam::entry::New // Get the next keyword and if a valid keyword return true const bool valid = getKeyword(keyword, keyToken, is); + // Can accept a list of entries too + if + ( + keyToken.isLabel() + || (keyToken.isPunctuation() && keyToken.pToken() == token::BEGIN_LIST) + ) + { + is.putBack(keyToken); + return parentDict.add + ( + new dictionaryListEntry(parentDict, is), + false + ); + } + if (!valid) { + // Error processing for invalid or unexpected input + // Do some more checking - if (keyToken == token::END_BLOCK || is.eof()) + if (keyToken == token::END_BLOCK) { + if (token::END_BLOCK != endChar) + { + FatalIOErrorInFunction(is) + << "Unexpected '}' while reading dictionary entry" + << exit(FatalIOError); + } + return false; + } + if (is.eof()) + { + if (endChar) + { + FatalIOErrorInFunction(is) + << "Unexpected EOF while reading dictionary entry" + << exit(FatalIOError); + } return false; } - if - ( - keyToken.isLabel() - || (keyToken.isPunctuation() && keyToken.pToken() == token::BEGIN_LIST) - ) + + if (endChar) { - is.putBack(keyToken); - return parentDict.add - ( - new dictionaryListEntry(parentDict, is), - false - ); + FatalIOErrorInFunction(is) + << "Found " << keyToken + << " but expected " << char(endChar) + << exit(FatalIOError); + } + else + { + FatalIOErrorInFunction(is) + << "Found " << keyToken + << " but expected EOF, or perhaps a '}' char" + << exit(FatalIOError); } - // Otherwise the token is invalid - std::cerr - << "--> FOAM Warning :" << nl - << " From function " << FUNCTION_NAME << nl - << " in file " << __FILE__ << " at line " << __LINE__ << nl - << " Reading " << is.name().c_str() << nl - << " found " << keyToken << nl - << " expected either " << token::END_BLOCK << " or EOF" - << std::endl; return false; } diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C index efebf3170c634a2b143dc69e2fc6d6866e4f33e8..4a2be026bec053e3dc78995d9bab76c083825cdd 100644 --- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C +++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C @@ -264,17 +264,8 @@ Foam::primitiveEntry::primitiveEntry Foam::primitiveEntry::primitiveEntry(const keyType& key, Istream& is) : - entry(key), - ITstream - ( - is.name() + '.' + key, - tokenList(10), - is.format(), - is.version() - ) -{ - readEntry(dictionary::null, is); -} + primitiveEntry(key, dictionary::null, is) +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index da90401515ca271dc6fefff448d94770b9872d6b..0b1fc37250bbb767f8f23122e0facb444260561f 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -73,25 +73,30 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New Info<< "Selecting function " << functionType << endl; } - if (dict.found("functionObjectLibs")) + // Load any additional libraries { - const_cast<Time&>(runTime).libs().open - ( - dict, - "functionObjectLibs", - dictionaryConstructorTablePtr_ - ); - } - else - { - const_cast<Time&>(runTime).libs().open - ( - dict, - "libs", - dictionaryConstructorTablePtr_ - ); + const auto finder = + dict.csearchCompat("libs", {{"functionObjectLibs", 1612}}); + + if (finder.found()) + { + const_cast<Time&>(runTime).libs().open + ( + dict, + finder.ref().keyword(), + dictionaryConstructorTablePtr_ + ); + } } + // This is the simplified version without compatibility messages + // const_cast<Time&>(runTime).libs().open + // ( + // dict, + // "libs", + // dictionaryConstructorTablePtr_ + // ); + if (!dictionaryConstructorTablePtr_) { FatalErrorInFunction diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C index 755ca039672ac5abebefe2f87f4a5f6deaeed1e0..41d8d4e0afc7235b2f256bdf8bd2df381379406a 100644 --- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.C @@ -217,12 +217,7 @@ Foam::codedFixedValuePointPatchField<Type>::codedFixedValuePointPatchField fixedValuePointPatchField<Type>(p, iF, dict, valueRequired), codedBase(), dict_(dict), - name_ - ( - dict.found("redirectType") - ? dict.lookup("redirectType") - : dict.lookup("name") - ), + name_(dict.getCompat<word>("name", {{"redirectType", 1706}})), redirectPatchFieldPtr_() { updateLibrary(name_); diff --git a/src/dynamicMesh/motionSolvers/displacement/codedPoints0/codedPoints0MotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/codedPoints0/codedPoints0MotionSolver.C index 67cf8c2db3e28fa52fdbcd79fe798479e2440db4..e3c0f914dd61a4ab61b39bf83d7eec4ebc6f3d33 100644 --- a/src/dynamicMesh/motionSolvers/displacement/codedPoints0/codedPoints0MotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/codedPoints0/codedPoints0MotionSolver.C @@ -120,15 +120,7 @@ Foam::codedPoints0MotionSolver::codedPoints0MotionSolver motionSolver(mesh, dict, typeName), codedBase() { - // Backward compatibility - if (dict.found("redirectType")) - { - dict.lookup("redirectType") >> name_; - } - else - { - dict.lookup("name") >> name_; - } + dict.readCompat<word>("name", {{"redirectType", 1706}}, name_); updateLibrary(name_); redirectMotionSolver(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C index 95c50f56aaac4ebd46a98cbb4158aa7034ba47f7..15a391ade589d2ad044cd6182e21a7d0567a74f0 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C @@ -215,12 +215,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField fixedValueFvPatchField<Type>(p, iF, dict), codedBase(), dict_(dict), - name_ - ( - dict.found("redirectType") - ? dict.lookup("redirectType") - : dict.lookup("name") - ), + name_(dict.getCompat<word>("name", {{"redirectType", 1706}})), redirectPatchFieldPtr_() { updateLibrary(name_); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C index f03e966e152fb9d646c6ca03d55cff1f43f2a142..a71902673e8bf85b7ba2c816664ee92738d5d9ef 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.C @@ -215,12 +215,7 @@ Foam::codedMixedFvPatchField<Type>::codedMixedFvPatchField mixedFvPatchField<Type>(p, iF, dict), codedBase(), dict_(dict), - name_ - ( - dict.found("redirectType") - ? dict.lookup("redirectType") - : dict.lookup("name") - ), + name_(dict.getCompat<word>("name", {{"redirectType", 1706}})), redirectPatchFieldPtr_() { updateLibrary(name_); diff --git a/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C b/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C index 8e2c1c1ffb02321f885f4f29ca9108b7fdb82b5e..62d65ffaf3095f44f5c29ba7ff8b6ce39545489e 100644 --- a/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C +++ b/src/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C @@ -191,15 +191,7 @@ bool Foam::functionObjects::codedFunctionObject::read(const dictionary& dict) { functionObject::read(dict); - // Backward compatibility - if (dict.found("redirectType")) - { - dict.lookup("redirectType") >> name_; - } - else - { - dict.lookup("name") >> name_; - } + dict.readCompat<word>("name", {{"redirectType", 1706}}, name_); const entry* dataPtr = dict.lookupEntryPtr ( diff --git a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C index a90b1903b38e65d409c6dbd2570efe3dce821452..3c7cb43b2667d102d9c3742a5ae718448dcb6b6c 100644 --- a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C +++ b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C @@ -119,18 +119,10 @@ bool Foam::fv::explicitPorositySource::read(const dictionary& dict) { if (cellSetOption::read(dict)) { - if (coeffs_.found("UNames")) + if (!coeffs_.readIfPresent("UNames", fieldNames_)) { - coeffs_.lookup("UNames") >> fieldNames_; - } - else if (coeffs_.found("U")) - { - word UName(coeffs_.lookup("U")); - fieldNames_ = wordList(1, UName); - } - else - { - fieldNames_ = wordList(1, "U"); + fieldNames_.resize(1); + fieldNames_.first() = coeffs_.lookupOrDefault<word>("U", "U"); } applied_.setSize(fieldNames_.size(), false); diff --git a/src/fvOptions/sources/general/codedSource/CodedSourceIO.C b/src/fvOptions/sources/general/codedSource/CodedSourceIO.C index 089970684177877d9d792b32b71235947763aea5..1c2b661c0f4760273fa95197a13e9b12c8817fa6 100644 --- a/src/fvOptions/sources/general/codedSource/CodedSourceIO.C +++ b/src/fvOptions/sources/general/codedSource/CodedSourceIO.C @@ -36,15 +36,7 @@ bool Foam::fv::CodedSource<Type>::read(const dictionary& dict) coeffs_.lookup("fields") >> fieldNames_; applied_.setSize(fieldNames_.size(), false); - // Backward compatibility - if (coeffs_.found("redirectType")) - { - coeffs_.lookup("redirectType") >> name_; - } - else - { - coeffs_.lookup("name") >> name_; - } + dict.readCompat<word>("name", {{"redirectType", 1706}}, name_); // Code snippets { diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C index 60a7b7436bbfb655c8524c49e8cf131ce4c87e0b..db3d7b14663b36a45636082815f0aee2f97340cd 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C @@ -85,13 +85,18 @@ Foam::boxToCell::boxToCell ) : topoSetSource(mesh), - bbs_ - ( - dict.found("box") - ? treeBoundBoxList(1, treeBoundBox(dict.lookup("box"))) - : dict.lookup("boxes") - ) -{} + bbs_() +{ + if (dict.found("box")) + { + bbs_.resize(1); + dict.read("box", bbs_.first()); + } + else + { + dict.read("boxes", bbs_); + } +} Foam::boxToCell::boxToCell diff --git a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C index c15b2963ad1dc3a25078b45561de672a1fcfbd01..f9b276118f542c62f99a658c34b59df0c45b3470 100644 --- a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C +++ b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C @@ -85,13 +85,18 @@ Foam::boxToFace::boxToFace ) : topoSetSource(mesh), - bbs_ - ( - dict.found("box") - ? treeBoundBoxList(1, treeBoundBox(dict.lookup("box"))) - : dict.lookup("boxes") - ) -{} + bbs_() +{ + if (dict.found("box")) + { + bbs_.resize(1); + dict.read("box", bbs_.first()); + } + else + { + dict.read("boxes", bbs_); + } +} Foam::boxToFace::boxToFace diff --git a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C index 7f55b9eb07077335efe2af0301742dc9e04efacf..25805bc61e40c77f26d3d3c95a81589229f22fe5 100644 --- a/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C +++ b/src/meshTools/sets/pointSources/boxToPoint/boxToPoint.C @@ -84,13 +84,18 @@ Foam::boxToPoint::boxToPoint ) : topoSetSource(mesh), - bbs_ - ( - dict.found("box") - ? treeBoundBoxList(1, treeBoundBox(dict.lookup("box"))) - : dict.lookup("boxes") - ) -{} + bbs_() +{ + if (dict.found("box")) + { + bbs_.resize(1); + dict.read("box", bbs_.first()); + } + else + { + dict.read("boxes", bbs_); + } +} Foam::boxToPoint::boxToPoint diff --git a/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C b/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C index 883d52b0024b396d010586124ed6b1084062c0c7..0c9198a40fc3b3d90cd66205558ccd7716f30a84 100644 --- a/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C +++ b/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C @@ -207,18 +207,10 @@ bool Foam::fv::multiphaseMangrovesSource::read(const dictionary& dict) { if (option::read(dict)) { - if (coeffs_.found("UNames")) + if (!coeffs_.readIfPresent("UNames", fieldNames_)) { - coeffs_.lookup("UNames") >> fieldNames_; - } - else if (coeffs_.found("U")) - { - word UName(coeffs_.lookup("U")); - fieldNames_ = wordList(1, UName); - } - else - { - fieldNames_ = wordList(1, "U"); + fieldNames_.resize(1); + fieldNames_.first() = coeffs_.lookupOrDefault<word>("U", "U"); } applied_.setSize(fieldNames_.size(), false); diff --git a/src/waveModels/fvOptions/multiphaseMangrovesTurbulenceModel/multiphaseMangrovesTurbulenceModel.C b/src/waveModels/fvOptions/multiphaseMangrovesTurbulenceModel/multiphaseMangrovesTurbulenceModel.C index 59f50d3a3029ccf7e2de30422265c1ccf56db280..039904c85f1565ae3f7a6668fec5ca34f078d985 100644 --- a/src/waveModels/fvOptions/multiphaseMangrovesTurbulenceModel/multiphaseMangrovesTurbulenceModel.C +++ b/src/waveModels/fvOptions/multiphaseMangrovesTurbulenceModel/multiphaseMangrovesTurbulenceModel.C @@ -205,19 +205,19 @@ void Foam::fv::multiphaseMangrovesTurbulenceModel::addSup if (eqn.psi().name() == epsilonName_) { - fvMatrix<scalar> epsilonEqn - ( + fvMatrix<scalar> epsilonEqn + ( - fvm::Sp(rho*epsilonCoeff(U), eqn.psi()) ); eqn += epsilonEqn; } else if (eqn.psi().name() == kName_) { - fvMatrix<scalar> kEqn - ( + fvMatrix<scalar> kEqn + ( - fvm::Sp(rho*kCoeff(U), eqn.psi()) ); - eqn += kEqn; + eqn += kEqn; } } @@ -226,20 +226,19 @@ bool Foam::fv::multiphaseMangrovesTurbulenceModel::read(const dictionary& dict) { if (option::read(dict)) { - if (coeffs_.found("epsilonNames")) + if (!coeffs_.readIfPresent("epsilonNames", fieldNames_)) { - coeffs_.lookup("epsilonNames") >> fieldNames_; - } - else if (coeffs_.found("epsilon")) - { - word UName(coeffs_.lookup("epsilon")); - fieldNames_ = wordList(1, UName); - } - else - { - fieldNames_.setSize(2); - fieldNames_[0] = "epsilon"; - fieldNames_[1] = "k"; + if (coeffs_.found("epsilon")) + { + fieldNames_.resize(1); + coeffs_.read("epsilon", fieldNames_.first()); + } + else + { + fieldNames_.resize(2); + fieldNames_[0] = "epsilon"; + fieldNames_[1] = "k"; + } } applied_.setSize(fieldNames_.size(), false); diff --git a/tutorials/IO/dictionary/Allrun b/tutorials/IO/dictionary/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..850ea90ee4170c448b947e8b3134cf2f1e6c70d4 --- /dev/null +++ b/tutorials/IO/dictionary/Allrun @@ -0,0 +1,7 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +runApplication ./TestParsing "$@" + +#------------------------------------------------------------------------------ diff --git a/tutorials/IO/dictionary/TestParsing b/tutorials/IO/dictionary/TestParsing new file mode 100755 index 0000000000000000000000000000000000000000..7ff9d065d14de2448a774029473922967d6daab2 --- /dev/null +++ b/tutorials/IO/dictionary/TestParsing @@ -0,0 +1,111 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +echo "dictionary input tests" + +verbose=true +npass=0 +nwarn=0 +nfail=0 + +foamDictionary -help > /dev/null 2>&1 || { + echo "Error: non-functional foamDictionary" + exit 2 +} + + +# Reduced verbosity in test mode? +if isTest "$@" +then + verbose=false +fi + + +for dict in \ + good*.dict \ + warn*.dict \ + fatal*.dict \ +; +do + [ -f "$dict" ] || continue # protect against bad globs + + # capture stderr, ignore stdout + stderr=$(foamDictionary -keywords $dict 2>&1 >/dev/null) + exitCode=$? + + case "$dict" in + *fatal*) + if [ $exitCode -eq 0 ] + then + echo "NOK did not detect fatal input $dict" + nfail=$(($fail + 1)) + else + echo "OK detected fatal input $dict" + npass=$(($npass + 1)) + fi + ;; + + *good*) + if [ $exitCode -eq 0 ] + then + npass=$(($npass + 1)) + if [ "${#stderr}" -gt 0 ] + then + # count unexpected warnings + nwarn=$(($nwarn + 1)) + echo "NOK unexpected warnings: $dict" + else + echo "OK good input $dict" + fi + else + echo "NOK failed input $dict" + nfail=$(($fail + 1)) + fi + ;; + + *warn*) + if [ $exitCode -eq 0 ] + then + npass=$(($npass + 1)) + if [ "${#stderr}" -gt 0 ] + then + echo "OK trapped warnings: $dict" + else + # count missing warnings + nwarn=$(($nwarn + 1)) + echo "NOK missing expected warnings: $dict" + fi + else + nfail=$(($fail + 1)) + echo "NOK failed (not warn) input $dict" + fi + ;; + + esac + + if [ "$verbose" = true ] && [ "${#stderr}" -gt 0 ] + then + echo "================" 1>&2 + echo "dictionary = $dict" 1>&2 + echo "$stderr" 1>&2 + echo "================" 1>&2 + fi + +done + +echo "$npass passed" +echo "$nwarn warnings" +echo "$nfail failed" + +if test $nfail -eq 0 +then + echo + echo End + echo +else + exit 1 +fi + + +#------------------------------------------------------------------------------ diff --git a/tutorials/IO/dictionary/fatal-ending1.dict b/tutorials/IO/dictionary/fatal-ending1.dict new file mode 100644 index 0000000000000000000000000000000000000000..2fa8e588d643af00eee8112e17ddfdd65e434559 --- /dev/null +++ b/tutorials/IO/dictionary/fatal-ending1.dict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +} // A stray '}' before any real entries + +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-ending2.dict b/tutorials/IO/dictionary/fatal-ending2.dict new file mode 100644 index 0000000000000000000000000000000000000000..fb4f85fd944bc5fa0b1a6c698ddc20171be406d6 --- /dev/null +++ b/tutorials/IO/dictionary/fatal-ending2.dict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // oops extra stray '}' + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-ending3.dict b/tutorials/IO/dictionary/fatal-ending3.dict new file mode 100644 index 0000000000000000000000000000000000000000..073e489efa63c34c9ece1c14974bc1cf11c73ab1 --- /dev/null +++ b/tutorials/IO/dictionary/fatal-ending3.dict @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +{ + +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-ending4.dict b/tutorials/IO/dictionary/fatal-ending4.dict new file mode 100644 index 0000000000000000000000000000000000000000..7f97b1578df1c962d7908d9ce2843fb2f8af5c75 --- /dev/null +++ b/tutorials/IO/dictionary/fatal-ending4.dict @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dict +{ + { key val; } // A stray '{}' pair after the first entries +} + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-premature-ending1.dict b/tutorials/IO/dictionary/fatal-premature-ending1.dict new file mode 100644 index 0000000000000000000000000000000000000000..40ee0b48db8518843c8be926ce1da5c0642f0bf8 --- /dev/null +++ b/tutorials/IO/dictionary/fatal-premature-ending1.dict @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dict +{ + key1 value1; + key2 value2; + +// oops no trailing '}' + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-premature-ending2.dict b/tutorials/IO/dictionary/fatal-premature-ending2.dict new file mode 100644 index 0000000000000000000000000000000000000000..7df892f725532938bd20945c20eff590e9a602ee --- /dev/null +++ b/tutorials/IO/dictionary/fatal-premature-ending2.dict @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dict1 +{ + key1 value1; + key2 value2; +} + +} // oops extra stray '}' + + +dict2 +{ + key1 value1; + key2 value2; +} + + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-primitive-ending1.dict b/tutorials/IO/dictionary/fatal-primitive-ending1.dict new file mode 100644 index 0000000000000000000000000000000000000000..d097357658e4704d17426dc8e0a7bbe98c7d5c73 --- /dev/null +++ b/tutorials/IO/dictionary/fatal-primitive-ending1.dict @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dict +{ + key missing ending +} + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-primitive-ending2.dict b/tutorials/IO/dictionary/fatal-primitive-ending2.dict new file mode 100644 index 0000000000000000000000000000000000000000..918718394926066304c082c43caf25a457f2191a --- /dev/null +++ b/tutorials/IO/dictionary/fatal-primitive-ending2.dict @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dict +{ + key missing ending + +// no closing } either + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/fatal-primitive-ending3.dict b/tutorials/IO/dictionary/fatal-primitive-ending3.dict new file mode 100644 index 0000000000000000000000000000000000000000..0c326f6569b609c308b07398965a9c02cd687f6d --- /dev/null +++ b/tutorials/IO/dictionary/fatal-primitive-ending3.dict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +key missing ending + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/good-empty1.dict b/tutorials/IO/dictionary/good-empty1.dict new file mode 100644 index 0000000000000000000000000000000000000000..7d3bbc1e3796ac661ee433483efefed77c31e852 --- /dev/null +++ b/tutorials/IO/dictionary/good-empty1.dict @@ -0,0 +1 @@ +// A dictionary file that exists, but without any tokens diff --git a/tutorials/IO/dictionary/good-empty2.dict b/tutorials/IO/dictionary/good-empty2.dict new file mode 100644 index 0000000000000000000000000000000000000000..9c4a3f7a0a77be8f93d6d9154cf4e7b33cd5c57e --- /dev/null +++ b/tutorials/IO/dictionary/good-empty2.dict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// A dictionary file without any tokens except the header + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/good-ending1.dict b/tutorials/IO/dictionary/good-ending1.dict new file mode 100644 index 0000000000000000000000000000000000000000..29078dcbe883531b45bd79bd7c48f05b45fd982d --- /dev/null +++ b/tutorials/IO/dictionary/good-ending1.dict @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dict1 +{ + key1 value1; + key2 value2; +} + + +dict2 +{ + key1 value1; + key2 value2; +} + + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/good-primitive-ending1.dict b/tutorials/IO/dictionary/good-primitive-ending1.dict new file mode 100644 index 0000000000000000000000000000000000000000..62c70cee37ad7e4d6c92d3fbb6b9d8e25238d6dc --- /dev/null +++ b/tutorials/IO/dictionary/good-primitive-ending1.dict @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dict +{ + key with ending; +} + + +// ************************************************************************* // diff --git a/tutorials/IO/dictionary/missed-ending3.dict b/tutorials/IO/dictionary/missed-ending3.dict new file mode 100644 index 0000000000000000000000000000000000000000..ec002dad47f8c9ba0256b7c6ca82f0744bca3fbe --- /dev/null +++ b/tutorials/IO/dictionary/missed-ending3.dict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +{} // A stray '{}' pair before any real entries + +FoamFile +{ + version 2; + format ascii; + class dictionary; + object dictionary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/tutorials/basic/potentialFoam/cylinder/system/controlDict b/tutorials/basic/potentialFoam/cylinder/system/controlDict index 922b333d8af63b09d723d1b39b99bbf0cf64b1c3..07650fc4fbdd6a83d4c40443da5b4e391a23b59f 100644 --- a/tutorials/basic/potentialFoam/cylinder/system/controlDict +++ b/tutorials/basic/potentialFoam/cylinder/system/controlDict @@ -49,13 +49,9 @@ functions { error { - // Load the library containing the 'coded' functionObject - libs ("libutilityFunctionObjects.so"); - - type coded; - - // Name of on-the-fly generated functionObject - name error; + name error; + type coded; + libs ("libutilityFunctionObjects.so"); codeEnd #{ diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy index 27dcf2052242370f4a5eb58f4772777308cac6c0..24d81a7e0d8d660f8473fce799a815e20e680de2 100644 --- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy +++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy @@ -23,13 +23,13 @@ boundaryField { walls { - type fixedValue; - value $internalField; + type fixedValue; + value $internalField; } cylinder { - type codedFixedValue; - name pointDisplacementy_cylinder; + name pointDisplacementy_cylinder; + type codedFixedValue; code #{ const scalar t = this->db().time().value(); @@ -37,21 +37,21 @@ boundaryField const scalar f = 200; operator==(a*sin(constant::mathematical::twoPi*f*t)); #}; - value $internalField; + value $internalField; } "inlet.*" { - type fixedValue; - value $internalField; + type fixedValue; + value $internalField; } outlet { - type fixedValue; - value $internalField; + type fixedValue; + value $internalField; } frontAndBack { - type empty; + type empty; } } diff --git a/tutorials/combustion/XiEngineFoam/kivaTest/system/controlDict b/tutorials/combustion/XiEngineFoam/kivaTest/system/controlDict index c123f7c5da910e587efbdbd9a9142ab7fcca7b3e..206d28ff02f790ae881c1a05909c502193cffe88 100644 --- a/tutorials/combustion/XiEngineFoam/kivaTest/system/controlDict +++ b/tutorials/combustion/XiEngineFoam/kivaTest/system/controlDict @@ -55,9 +55,9 @@ functions { timeStep { - type coded; - libs ("libutilityFunctionObjects.so"); - name setDeltaT; + name setDeltaT; + type coded; + libs ("libutilityFunctionObjects.so"); code #{ diff --git a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/system/preProcess b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/system/preProcess index a1134c2a748d5b51f242b80b7a96f571f4960c2a..cc331bb5841cdbde14181b52bbbbad1a7aa372cf 100644 --- a/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/system/preProcess +++ b/tutorials/compressible/rhoPimpleAdiabaticFoam/rutlandVortex2D/system/preProcess @@ -19,10 +19,10 @@ functions { createVortex { - type coded; - libs ("libutilityFunctionObjects.so"); - name createVortices; - enabled yes; + name createVortices; + type coded; + libs ("libutilityFunctionObjects.so"); + enabled yes; codeInclude #{ diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U b/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U index a70ebbdb623d6e0429ce1c7416c2e117b8dcd39c..c1ab604234c409ca5ec25c3aa17d6dcb83e43e25 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0.orig/U @@ -24,8 +24,8 @@ boundaryField inlet { - type codedFixedValue; name swirl; + type codedFixedValue; code #{ diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions index 349148c268983aab137a2178ae38f17dc0359797..abaf0e973f076da5dbedc0cd6f0700d6c413c353 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/system/continuityFunctions @@ -8,8 +8,8 @@ inletMassFlowRate { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); fields ( @@ -31,8 +31,8 @@ inletMassFlowRate outletMassFlowRate { - type surfaceFieldValue; - libs ("libfieldFunctionObjects.so"); + type surfaceFieldValue; + libs ("libfieldFunctionObjects.so"); fields ( @@ -54,9 +54,9 @@ outletMassFlowRate totalMass { - type coded; - libs ("libutilityFunctionObjects.so"); name error; + type coded; + libs ("libutilityFunctionObjects.so"); code #{