openfoam/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/system
Mark Olesen b0072bfab8 ENH: regIOobject store() now also registers the object
- previously the store() method just set the ownedByRegistry flag.
  Now ensure that it is indeed registered first.

- support register/store of tmp<> items.
  The tmp parameter is not cleared, but changed from PTR to CREF
  to allow further use.

  The implicit registration allows code simplification using the
  GeometricField::New factory method, for example.

  Old Code
  ========
      volScalarField* ptr = new volScalarField
      (
          IOobject
          (
              fieldName,
              mesh.time().timeName(),
              mesh,
              IOobject::NO_READ,
              IOobject::NO_WRITE,
              true  // Register
          ),
          mesh,
          dimless,
          zeroGradientFvPatchField<scalar>::typeName
      );
      ptr->store();

  New Code
  ========
      auto tptr = volScalarField::New
      (
          fieldName,
          mesh,
          dimless,
          zeroGradientFvPatchField<scalar>::typeName
      );
      regIOobject::store(tptr);

  or even
      regIOobject::store
      (
          volScalarField::New
          (
              fieldName,
              mesh,
              dimless,
              zeroGradientFvPatchField<scalar>::typeName
          )
      );
2020-01-13 15:37:25 +00:00
..
blockMeshDict.m4 STYLE: cleanup rhoPorousSimpleFoam tutorial case 2016-06-29 14:21:02 +02:00
controlDict REL: Release preparations 2019-12-23 09:49:23 +00:00
fvSchemes REL: Release preparations 2019-12-23 09:49:23 +00:00
fvSolution REL: Release preparations 2019-12-23 09:49:23 +00:00
sampling ENH: regIOobject store() now also registers the object 2020-01-13 15:37:25 +00:00