Commit ab84869c authored by Mark Olesen's avatar Mark Olesen
Browse files

TUT: use general 'scale' instead of 'convertToMeters' in blockMeshDict

- although this has been supported for many years, the tutorials
  continued to use "convertToMeters" entry, which is specific to blockMesh.
  The "scale" is more consistent with other dictionaries.

ENH:
- ignore "scale 0;" (treat as no scaling) for blockMeshDict,
  consistent with use elsewhere.
parent e50eb00d
......@@ -24,7 +24,7 @@ backgroundMesh
rBcells 50;
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -27,7 +27,7 @@ backgroundMesh
zCells 20;
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -58,7 +58,7 @@ geometry
}
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -27,7 +27,7 @@ backgroundMesh
zCells 20;
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -27,7 +27,7 @@ backgroundMesh
zCells 20;
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -27,7 +27,7 @@ backgroundMesh
zCells 20;
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -58,7 +58,7 @@ geometry
}
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -27,7 +27,7 @@ backgroundMesh
zCells 20;
}
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -157,7 +157,7 @@ class blockMesh
void createPatches() const;
//- As copy (not implemented)
blockMesh(const blockMesh&);
blockMesh(const blockMesh&) = delete;
public:
......
......@@ -362,6 +362,12 @@ Foam::polyMesh* Foam::blockMesh::createTopology
meshDescription.readIfPresent("scale", scaleFactor_);
}
  • @mark Should there be any warning for this deprecated keyword?

  • Author Maintainer

    I don't see any reason for a warning. blockMesh simply accepts either convertToMeters or scale in that precedence. It is both forward and backward compatible (probably since version 1.5) so no issues of exchanging files there either.

Please register or sign in to reply
// Require (scale > 0), treat (scale <= 0) as scaling == 1 (no scaling).
if (scaleFactor_ <= 0)
{
scaleFactor_ = 1.0;
}
// Read the block edges
if (meshDescription.found("edges"))
{
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
scale 1;
vertices
(
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
scale 1;
vertices #codeStream
{
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.001;
scale 0.001;
vertices
(
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.001;
scale 0.001;
vertices
(
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1.0;
scale 1.0;
vertices
(
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.001;
scale 0.001;
vertices
(
......
......@@ -14,7 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.001;
scale 0.001;
vertices
(
......
......@@ -23,7 +23,7 @@ define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(
define(pi, 3.14159265)
define(angle, 45)
convertToMeters 1;
scale 1;
/* User parameter for geometry */
define(L_square, 0.06)
......
......@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
scale 1;
vertices
(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment