Skip to content
Snippets Groups Projects
  1. Nov 22, 2018
  2. Nov 21, 2018
  3. Nov 20, 2018
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      ENH: modernize code in dimensionSet, dimensionSets · 5a9a2935
      Mark OLESEN authored
      - 'unfriend' operators on dimensionSet, since they operate without
        requiring access to non-public members.
      
      - add missing invTransform() function for dimensionSet.
      
      - make inv(const dimensionSet&) available as
        operator~(const dimensionSet&), which can be used instead
        of (dimless/ds).
      5a9a2935
    • Mark OLESEN's avatar
      ENH: added dimensionedType::writeEntry method · 72c4b318
      Mark OLESEN authored
      - writing of dictionary entry with the name of the dimensionedType
        suppressed if it is identical to the keyword.
        This corresponds to the input requirements.
      72c4b318
    • Mark OLESEN's avatar
      ENH: add read guard for dimensionedType constructors (#762) · dd87c983
      Mark OLESEN authored
      - deprecate dimensionedType constructors using an Istream in favour of
        versions accepting a keyword and a dictionary.
      
        Dictionary entries are almost the exclusive means of read
        constructing a dimensionedType. By construct from the dictionary
        entry instead of doing a lookup() first, we can detect possible
        input errors such as too many tokens as a result of a input syntax
        error.
      
        Constructing a dimensionedType from a dictionary entry now has
        two forms.
      
        1.  dimensionedType(key, dims, dict);
      
            This is the constructor that will normally be used.
      
            It accepts entries with optional leading names and/or
            dimensions. If the entry contains dimensions, they are
            verified against the expected dimensions and an IOError is
            raised if they do not correspond. On conclusion, checks the
            token stream for any trailing rubbish.
      
        2.  dimensionedType(key, dict);
      
            This constructor is used less frequently.
      
            Similar to the previous description, except that it is initially
            dimensionless. If entry contains dimensions, they are used
            without further verification. The constructor also includes a
            token stream check.
      
            This constructor is useful when the dimensions are entirely
            defined from the dictionary input, but also when handling
            transition code where the input dimensions are not obvious from
            the source.
      
            This constructor can also be handy when obtaining values from
            a dictionary without needing to worry about the input dimensions.
            For example,
      
               Info<< "rho: " << dimensionedScalar("rho", dict).value() << nl;
      
            This will accept a large range of inputs without hassle.
      
      ENH: consistent handling of dimensionedType for inputs (#1083)
      
      BUG: incorrect Omega dimensions (fixes #2084)
      dd87c983
  4. Nov 15, 2018
  5. Nov 13, 2018
  6. Nov 12, 2018
  7. Nov 11, 2018
  8. Nov 10, 2018
  9. Nov 09, 2018
    • Mark OLESEN's avatar
      ENH: add IOobjectList::findObject() method · faaa93fd
      Mark OLESEN authored
      - naming similar to objectRegistry, with unambiguous resolution.
        The lookup() methods have different return types depending on the
        calling parameter.
      
      STYLE: use IOobjectListTemplates.C for implementations
      
      - previously included as local definition within IOobjectList.C,
        but will be adding more templated methods soon.
      
      - adjust parameters (eg, matchName instead of matcher) to show their
        function
      
      ENH: handle objectRegistry::names<void>(...)
      
      - this is equivalent to no Type restriction, and can be used when
        filtering names. Eg,
      
           obr.names<void>(wordRe..);
      faaa93fd
    • Mark OLESEN's avatar
      ENH: add wordRes::matching() method · 91cfe4c2
      Mark OLESEN authored
      - returns indices of matching entries.
      91cfe4c2
  10. Nov 08, 2018
  11. Oct 02, 2018
    • Mark OLESEN's avatar
      ENH: multiple zone selection for fvMeshSubsetProxy (#973) · 2fb382bf
      Mark OLESEN authored
      - handle tmp fields in interpolate methods
      
      - special method interpolateInternal() for creating a volume field
        with zero-gradient treatment for patches from an internal field.
      
        This method was previously also called interpolate(), but that
        masked the ability to subset the internal field only.
      
        Ensight output needs the volume field:
            uses interpolateInternal().
      
        VTK output has separate handling of internal and patch fields:
            uses interpolate().
      
      ENH: added fvMeshSubset mesh() method for baseMesh or subMesh.
      
      - simplies coding when the fvMeshSubset may or may not be in active use.
      
      ENH: update foamToEnsight to use newer methods in wrapped form
      
      - static interpolate functions with renaming for manual use with
        fvMeshSubset (when fvMeshSubsetProxy may be too limiting in
        functionality)
      2fb382bf
  12. Nov 07, 2018
    • Mark OLESEN's avatar
      ENH: make sourceInfo sub-dictionary optional for topoSet (#1060) · 5f556ffb
      Mark OLESEN authored
      - helps reduce clutter in the topoSetDict files.
      
        Caveats when using this.
      
        The older specification styles using "name" will conflict with the
        set name. Eg,
      
          {
              name    f0
              type    faceSet;
              action  add;
              source  patchToFace;
              sourceInfo
              {
                  name   inlet;
              }
          }
      
          would flattened to the following
          {
              name    f0
              type    faceSet;
              action  add;
              source  patchToFace;
              name   inlet;
          }
          which overwrites the "name" used for the faceSet.
      
          The solution is to use the updated syntax:
      
          {
              name    f0
              type    faceSet;
              action  add;
              source  patchToFace;
              patch   inlet;
          }
      5f556ffb
  13. Nov 06, 2018
    • Mark OLESEN's avatar
      ENH: additional topoSources, and consistency changes (#1060) · 6090faed
      Mark OLESEN authored
      - faceBitSet, pointBitSet and faceBoolSet (similar to cellBitSet)
        * allows topo sources in a wider variety of places.
        * With copy or move constructors.
      
      - cylinderToPoint, searchableSurfaceToFace, searchableSurfaceToPoint,
        sphereToFace, sphereToPoint sources
      
      - optional innerRadius for sphere and cylinder sources to treat as hollow.
      
      - support "sets" as well as "set" for cellToCell, faceToFace... sources.
      
        * convenience and avoids writing the set during processing.
      6090faed
    • Mark OLESEN's avatar
      a7a346b2
  14. Nov 05, 2018
    • Mark OLESEN's avatar
      ENH: extend globalIndex toGlobal methods · f5baa9a5
      Mark OLESEN authored
      - now applicable to labelLists.
      
      Note:
        in some situations it will be more efficient to use
        Foam::identity() directly. Eg,
      
           globalIndex globalCells(mesh.nCells());
           ...
           labelList cellIds
           (
               identity(globalCells.localSize(), globalCells.localStart())
           );
      f5baa9a5
  15. Nov 03, 2018
  16. Nov 02, 2018
  17. Nov 01, 2018
  18. Oct 30, 2018
  19. Oct 29, 2018
  20. Oct 17, 2018
  21. Oct 29, 2018
  22. Oct 19, 2018
  23. Oct 18, 2018
    • Mark OLESEN's avatar
      ENH: cleanup of Enum class · 3b745122
      Mark OLESEN authored
      - more dictionary-like methods, enforce keyType::LITERAL for all
        lookups to avoid any spurious keyword matching.
      
      - new readEntry, readIfPresent methods
      
      - The get() method replaces the now deprecate lookup() method.
      
      - Deprecate lookupOrFailsafe()
        Failsafe behaviour is now an optional parameter for lookupOrDefault,
        which makes it easier to tailor behaviour at runtime.
      
      - output of the names is now always flatted without line-breaks.
        Thus,
      
           os << flatOutput(someEnumNames.names()) << nl;
           os << someEnumNames << nl;
      
        both generate the same output.
      
      - Constructor now uses C-string (const char*) directly instead of
        Foam::word in its initializer_list.
      
      - Remove special enum + initializer_list constructor form since
        it can create unbounded lookup indices.
      
      - Removd old hasEnum, hasName forms that were provided during initial
        transition from NamedEnum.
      
      - Added static_assert on Enum contents to restrict to enum or
        integral values.  Should not likely be using this class to enumerate
        other things since it internally uses an 'int' for its values.
      
        Changed volumeType accordingly to enumerate on its type (enum),
        not the class itself.
      3b745122