1. 31 Oct, 2019 1 commit
  2. 27 Sep, 2019 1 commit
  3. 06 Apr, 2019 1 commit
  4. 06 Feb, 2019 2 commits
    • OpenFOAM bot's avatar
      BOT: Cleaned up header files · 154029dd
      OpenFOAM bot authored
      154029dd
    • Mark Olesen's avatar
      ENH: refactored regIOobject searching in object registry · 6d6f43d7
      Mark Olesen authored
      - The findObject() methods are template-typed and used to locate a
        particular Type/name combination.
      
        Eg,
      
            volScalarField* ptr = obr.findObject<volScalarField>("xyz");
      
      - The findIOobject() methods are un-typed and use the name only.
      
        Eg,
      
            regIOobject* ptr = obr.findIOobject("xyz");
      
      The typed versions will be most commonly used, but the un-typed lookup
      can be useful in a templating.
      
      - Simplified findObject* methods to use findIOobject* as the backend.
      6d6f43d7
  5. 18 Jan, 2019 1 commit
  6. 11 Nov, 2018 1 commit
  7. 10 Nov, 2018 1 commit
  8. 09 Nov, 2018 1 commit
    • 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
  9. 17 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: simplify objectRegistry access names (issue #322) · 8fabc325
      Mark Olesen authored
        New name:  findObject(), cfindObject()
        Old name:  lookupObjectPtr()
      
            Return a const pointer or nullptr on failure.
      
        New name:  findObject()
        Old name:  --
      
            Return a non-const pointer or nullptr on failure.
      
        New name:  getObjectPtr()
        Old name:  lookupObjectRefPtr()
      
            Return a non-const pointer or nullptr on failure.
            Can be called on a const object and it will perform a
            const_cast.
      
      - use these updated names and functionality in more places
      
      NB: The older methods names are deprecated, but continue to be defined.
      8fabc325
  10. 26 Jul, 2018 1 commit
  11. 17 May, 2017 1 commit
    • Mark Olesen's avatar
      ENH: added classes() method to objectRegistry/IOobjectList · 9761e9d8
      Mark Olesen authored
      - provides a summary hash of classes used and their associated object names.
      
        The HashTable representation allows us to leverage various HashTable
        methods. This hashed summary view can be useful when querying
        particular aspects, but is most useful when reducing the objects in
        consideration to a particular subset. For example,
      
            const wordHashSet interestingTypes
            {
                volScalarField::typeName,
                volVectorField::typeName
            };
      
            IOobjectList objects(runTime, runTime.timeName());
            HashTable<wordHashSet> classes = objects.classes();
      
            classes.retain(interestingTypes);
      
            // Or do just the opposite:
            classes.erase(unsupportedTypes);
      
        Can also use the underlying HashTable filter methods
      
      STYLE: use templated internals to avoid findString() when matching subsets
      9761e9d8
  12. 01 Dec, 2016 2 commits
    • Mark Olesen's avatar
      STYLE: simplify logic statement · d5e2b735
      Mark Olesen authored
      d5e2b735
    • Mark Olesen's avatar
      ENH: improve objectRegistry functionality (issue #322) · 92fa5a19
      Mark Olesen authored
      - Recursive searching for objects within a registry is now optional
        (previous it was always done).
      
        A recursive search effectively blocks the construction of sub-sub-registries
        if their names are 'masked' by some parent level sub-registry with
        the same name! (BUG)
      
      - Recursive search is now turned OFF by default, which makes it consistent
        with dictionary and probably causes the least number of surprises.
      
      ----
      Various new convenience methods added:
      
      lookupObjectRef()
      - returns a non-const reference.
        For example,
      
            volScalarField& U = mesh().lookupObjectRef<volScalarField>("U");
      
        Instead of
      
            volScalarField& U = const_cast<volScalarField&>
            (
                mesh().lookupObject<volScalarField>("U")
            );
      
      --
      lookupObjectPtr()
      - returns a const pointer, and nullptr on failure.
        For example,
      
            const volScalarField* Uptr = mesh().lookupObjectPtr<volScalarField>("U");
            if (Uptr)
            {
                const volScalarField& U = *Uptr;
                ...
            }
      
        Instead of
      
            if (mesh().foundObject<volScalarField>("U"))
            {
                const volScalarField& U = mesh().lookupObject<volScalarField>("U");
                ...
            }
      
      --
      lookupObjectRefPtr()
      - returns a non-const pointer, and nullptr on failure.
        For example,
      
            volScalarField* Uptr = mesh().lookupObjectRefPtr<volScalarField>("U");
            if (Uptr)
            {
                volScalarField& U = *Uptr;  // use as reference
                (*Uptr) = ...;              // or use directly
            }
      
        Instead of
      
            if (mesh().foundObject<volScalarField>("U"))
            {
                volScalarField& U = const_cast<volScalarField&>
                (
                    mesh().lookupObject<volScalarField>("U")
                );
            }
      
      --
      sortedNames()
      - now works with template parameters and with regular expression
        matching as well.
        For example,
      
            wordList names  = mesh().sortedNames();
            wordList fields = mesh().sortedName<volScalarField>();
      
        Instead of
      
            wordList names  = mesh().sortedNames();
            wordList fields = mesh().names<volScalarField>();
            Foam::sort(fields);
      
      --
      92fa5a19
  13. 08 Nov, 2015 1 commit
  14. 15 Dec, 2014 1 commit
  15. 08 Apr, 2013 1 commit
  16. 05 Apr, 2013 1 commit
  17. 26 Feb, 2013 2 commits
  18. 13 Aug, 2012 1 commit
  19. 09 Aug, 2012 2 commits
  20. 14 Aug, 2011 1 commit
  21. 19 Jan, 2011 1 commit
  22. 14 Jan, 2011 1 commit
  23. 07 Jan, 2011 1 commit
  24. 05 Jan, 2011 2 commits
  25. 08 Dec, 2010 1 commit
  26. 28 Jul, 2010 1 commit
  27. 29 Mar, 2010 1 commit
  28. 12 Mar, 2009 1 commit
  29. 05 Mar, 2009 1 commit
    • Mark Olesen's avatar
      regIOobject, Hasher, IOobject tweak · 7544164d
      Mark Olesen authored
      - regIOobject: don't re-register an unregister object on rename/assignment
      - Hasher: split-off HasherInt with uint32_t specializations
      - IOobject: writeBanner/writeDivider return Stream for easier chaining.
      
      ... also dropped some namespace bracketing while I was at it.
      7544164d
  30. 31 Dec, 2008 1 commit
  31. 25 Jun, 2008 2 commits
  32. 15 Apr, 2008 1 commit