Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Wiki
  • Upgrade
  • v2106 Developer Upgrade Guide

Last edited by Mark Olesen Jun 29, 2021
Page history

v2106 Developer Upgrade Guide

home upgrade code

Preview information, subject to change at any time !!!

  • Incompatibilities
  • Deprecation and Removal
    • Deprecated classes
    • Deprecated Methods
    • Removed Methods
    • Removed Items
  • Changes in definition
  • Changes in behaviour
  • Tokenization/Parsing Improvements
  • New methods
  • Other

Incompatibilities

  • fvMeshDistribute : geometric tolerances have been removed, which means that the constructor now takes a single parameter only.

  • protected UList::size(label) : renamed to setAddressableSize(label)
    The longer name for this low-level protected method eliminates some ambiguity (eg, with resize, setSize) and enables more precise inheritance patterns. The name is consistent with PtrListDetail internals.

  • ITstream : parsing constructor
    Elminate mandatory name for parsing versions. This makes it easier to use ITstream, IStringStream, UListStream interchangeable.

Deprecation and Removal

Deprecated classes

  • partialFaceAreaWeightAMI : functionality replaced by the faceAreaWeightAMI class.
  • fieldValueDelta : equivalent and more flexible functionality offered by the multiFieldValue function object.

Deprecated Methods

Internal hashing functors have been standardized with method name to reduce clutter and provide better alignment with standard C++ practices.

// Old:
FixedList<label, 3>::Hash<>()

// New:
FixedList<label, 3>::hasher()

// Unchanged:
labelHashSet::hasher()

Existing Hash<> functor namings are still supported, but deprecated.

Removed Methods

  • The longestEdge global function, which was deprecated and replaced by the face::longestEdge() method (2017-04) has now been removed.

  • Removed construct List from two iterators. This constructor was added for similarity with std::vector, but continues to cause various annoyances. If The ListOps::create() function provides a lengthier alternative but one that can also incorporate transformations.

  • removed fileName::clean() const method
    Relying on const/non-const to control the behaviour (inplace change or return a copy) is too fragile and the const version was almost never used. Now replace with a two-stage process when needed.

    // OLD (2012 and earlier)
    fileName sanitized = constPath.clean();
    
    // NEW (2106)
    fileName sanitized(constPath);
    sanitized.clean());

Removed Items

Changes in definition

Changes in behaviour

  • construction of DynamicField with a size is now consistent with DynamicList - it now reserves space only and leaves the initial addressable size as zero.

Tokenization/Parsing Improvements

To better harness the OpenFOAM parsing routines, the token handling and ITstream have been extended to include numerous failsafe access methods and direct checking of types.

Direct check of punctuation and word tokens: For example,

if (tok.isWord("uniform")) ..

while (!tok.isPunctuation(token::BEGIN_LIST)) ..

instead of the equivalent lengthier versions:

if (tok.isWord() && tok.wordToken() == "uniform") ..

while (!(tok.isPunctuation() && tok.pToken() == token::BEGIN_LIST)) ..

Failsafe versions for lookahead tokens: Istream peek(), ITstream peek(), peekFirst(), peekLast(). Failsafe traversing: ITstream skip(). This makes it possible to write LALR(1) parsers using OpenFOAM classes.

For example,

ITstream& is = dict.lookup(key);
if (is.peek().isWord())
{
    is.skip();
}

New methods

The face class now has a symmetric hasher that starts with lowest vertex value and walks in the direction of the next lowest value. This ensures that the hash code is independent of face orientation and face rotation.

Other

  • Replaced keyType with wordRe for matching selections

  • noexcept version of size_bytes() for List and other containers. Used when the is_contiguous check has already been done outside the loop. Naming as per std::span.


Clone repository
  • Submitting issues
  • building
  • building
    • cross compile mingw
  • coding
    • git workflow
    • patterns
      • HashTable
      • dictionary
      • memory
      • patterns
      • precision
      • selectors
      • strings
    • style
      • style
  • configuring
  • Home
  • icons
    • info
View All Pages