ENH: make 'planeType' optional for dictionary construct of a plane

- simpler to write for sampled cutting planes etc.
  For example,

      slice
      {
          type        cuttingPlane;
          point       (0 0 0);
          normal      (0 0 1);
          interpolate true;
      }

  instead of

      slice
      {
          type        cuttingPlane;
          planeType   pointAndNormal;
          pointAndNormalDict
          {
              point   (0 0 0);
              normal  (0 0 1);
          }
          interpolate true;
      }

STYLE: add noexcept to some plane methods
This commit is contained in:
Mark Olesen
2022-06-08 11:19:08 +02:00
parent da157dca47
commit fbaadf3a94
26 changed files with 166 additions and 271 deletions

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -31,14 +31,10 @@ functions
{
yNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0.063);
normal (0 0 1);
}
interpolate true;
type cuttingPlane;
point (0 0 0.063);
normal (0 0 1);
interpolate true;
}
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -136,14 +136,9 @@ functions
{
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 -0.01);
normal (0 0 1);
}
interpolate false;
type cuttingPlane;
point (0 0 -0.01);
normal (0 0 1);
}
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -132,16 +132,10 @@ postPro1
// Same colours and scaling as surface
${_surface};
type plane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (1 0 0);
}
offsets (0.1 0.2 0.3 0.4 0.5);
type plane;
point (0 0 0);
normal (1 0 0);
offsets (0.1 0.2 0.3 0.4 0.5);
colourMap coolToWarm;
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -25,15 +25,9 @@ planes
_plane
{
type plane; //cuttingPlane;
planeType pointAndNormal;
interpolate false;
pointAndNormalDict
{
point (0 0 0);
normal (1 0 0);
}
type plane; //cuttingPlane;
point (0 0 0);
normal (1 0 0);
}
surfaces
@ -41,19 +35,13 @@ planes
plane0
{
${_plane}
pointAndNormalDict
{
point (0 0 0);
}
point (0 0 0);
}
plane1
{
${_plane}
pointAndNormalDict
{
point (-0.1 0 0);
}
point (-0.1 0 0);
}
}

View File

@ -21,14 +21,10 @@ surfaces
{
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (0 0 1);
}
interpolate true;
type cuttingPlane;
point (0 0 0);
normal (0 0 1);
interpolate true;
}
isoQ

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -22,14 +22,10 @@ cuttingPlane
{
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (0 0 1);
}
interpolate true;
type cuttingPlane;
point (0 0 0);
normal (0 0 1);
interpolate true;
}
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -27,15 +27,11 @@ samples
{
yNormal
{
type cuttingPlane;
planeType pointAndNormal;
interpolate true;
store true;
pointAndNormalDict
{
point (0 0 0);
normal (0 1 0);
}
type cuttingPlane;
point (0 0 0);
normal (0 1 0);
interpolate true;
store true;
}
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -21,14 +21,10 @@ cuttingPlane
{
yNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (0 1 0);
}
interpolate true;
type cuttingPlane;
point (0 0 0);
normal (0 1 0);
interpolate true;
}
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -80,13 +80,8 @@ sampled
source cells;
store true;
planeType pointAndNormal;
pointAndNormalDict
{
normal (-1 0 0);
point (-0.04 0 0);
}
point (-0.04 0 0);
normal (-1 0 0);
}
surfaces

View File

@ -202,14 +202,9 @@ postPro1
cutting
{
type plane;
planeType pointAndNormal;
pointAndNormalDict
{
point (100 100 50);
normal (1 0 0);
}
point (100 100 50);
normal (1 0 0);
offsets (0 200);
smooth true;

View File

@ -20,7 +20,6 @@ planes
_plane
{
type cuttingPlane;
planeType pointAndNormal;
interpolate false;
}
@ -29,32 +28,23 @@ planes
plane0
{
${_plane}
pointAndNormalDict
{
point (100 100 50);
normal (1 -1 0);
}
point (100 100 50);
normal (1 -1 0);
enabled false;
}
plane1
{
${_plane}
pointAndNormalDict
{
point (100 100 50);
normal (1 1 0);
}
point (100 100 50);
normal (1 1 0);
}
plane2
{
${_plane}
pointAndNormalDict
{
point (200 100 50);
normal (1 0 0);
}
point (200 100 50);
normal (1 0 0);
}
};