ENH: add IOobjectList::findObject() method

- 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..);
This commit is contained in:
Mark Olesen
2018-11-09 21:57:55 +01:00
parent ffec4c6fa7
commit faaa93fdb5
12 changed files with 481 additions and 343 deletions

View File

@ -141,7 +141,7 @@ int main(int argc, char *argv[])
// Pressure field
autoPtr<volScalarField> pField
= loadField<volScalarField>(mesh, objects.lookup("p"));
= loadField<volScalarField>(mesh, objects.findObject("p"));
// The forces per zone
if (movement().forcesAndMoments(mesh, forces, moments))