ENH: blockMesh enhancements

- support non-uniform scaling, prescaling and cartesian coordinate
  transformations.

  Eg, stretch in one direction and then rotate
  ```
  prescale  (1.5 1 1);
  transform
  {
      origin   (0 0 0);
      rotation
      {
          type  axisAngle;
          axis  (0 0 1);
          angle 45;
      }
  }
  ```

- support "transformed" versions of blockMesh vertices, topology.
  With the additional of transformations etc, a simplistic application
  of a single scale parameter is no longer sufficient.

    new:  blMesh.vertices(true);
    old:  blMesh.vertices() * blMesh.scaleFactor();

    new:  blMesh.topology(true);
    old:  N/A

- add individual edge access for blockDescriptor.
  Saves copying and duplicate calculations.

- handle '(block face)' specification for curved faces,
  which is ok for external block faces, but likely somewhat
  questionable if used for internal block faces.
This commit is contained in:
Mark Olesen
2021-07-18 22:01:42 +02:00
parent 4eeff16735
commit d31f351c15
17 changed files with 1029 additions and 460 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -16,7 +16,8 @@ Description
\*---------------------------------------------------------------------------*/
{
const polyMesh& topoMesh = blocks.topology();
refPtr<polyMesh> topoMeshPtr(blocks.topology(true));
const polyMesh& topoMesh = topoMeshPtr();
// Write mesh as edges
{

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -19,7 +19,9 @@ Description
// Non-legacy and ASCII (mesh is small, want readable output)
const vtk::outputOptions writeOpts = vtk::formatType::INLINE_ASCII;
const polyMesh& topoMesh = blocks.topology();
refPtr<polyMesh> topoMeshPtr(blocks.topology(true));
const polyMesh& topoMesh = topoMeshPtr();
const vtk::vtuCells topoCells(topoMesh, writeOpts);
vtk::internalMeshWriter writer