Skip to content
Snippets Groups Projects
  1. Dec 01, 2016
    • Mark Olesen's avatar
      ENH: improve IOobjectList functionality (issue #322) · 1d3782a8
      Mark Olesen authored
      - provide additional filtering methods on names(), sortedNames()
        For example,
      
            IOobjectList objects = ...;
            wordReList selection = ...;
      
            objects.sortedNames(VolFieldType::typeName, selection);
      1d3782a8
    • 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
    • Mark Olesen's avatar
      ENH: add Test-objectRegistry (issue #322) · 8628ddac
      Mark Olesen authored
      - test clearly shows failure to insert a sub-registry when it has
        the same name as one of the parent sub-registry.
      8628ddac
  2. Nov 29, 2016
  3. Nov 28, 2016
  4. Nov 27, 2016
  5. Nov 25, 2016
  6. Nov 24, 2016
  7. Nov 23, 2016
  8. Nov 22, 2016