ENH: potentialFoam/cylinder: added #codeStream for blockMeshDict

This commit is contained in:
mattijs
2011-06-03 12:57:54 +01:00
parent 0211d507b1
commit 976035d502
2 changed files with 45 additions and 41 deletions

View File

@ -16,47 +16,49 @@ FoamFile
convertToMeters 1; convertToMeters 1;
vertices vertices #codeStream
( {
(0.5 0 -0.5) codeInclude
(1 0 -0.5) #{
(2 0 -0.5) #include "pointField.H"
(2 0.707107 -0.5) #};
(0.707107 0.707107 -0.5)
(0.353553 0.353553 -0.5) code
(2 2 -0.5) #{
(0.707107 2 -0.5) pointField points(19);
(0 2 -0.5) points[0] = point(0.5, 0, -0.5);
(0 1 -0.5) points[1] = point(1, 0, -0.5);
(0 0.5 -0.5) points[2] = point(2, 0, -0.5);
(-0.5 0 -0.5) points[3] = point(2, 0.707107, -0.5);
(-1 0 -0.5) points[4] = point(0.707107, 0.707107, -0.5);
(-2 0 -0.5) points[5] = point(0.353553, 0.353553, -0.5);
(-2 0.707107 -0.5) points[6] = point(2, 2, -0.5);
(-0.707107 0.707107 -0.5) points[7] = point(0.707107, 2, -0.5);
(-0.353553 0.353553 -0.5) points[8] = point(0, 2, -0.5);
(-2 2 -0.5) points[9] = point(0, 1, -0.5);
(-0.707107 2 -0.5) points[10] = point(0, 0.5, -0.5);
(0.5 0 0.5) points[11] = point(-0.5, 0, -0.5);
(1 0 0.5) points[12] = point(-1, 0, -0.5);
(2 0 0.5) points[13] = point(-2, 0, -0.5);
(2 0.707107 0.5) points[14] = point(-2, 0.707107, -0.5);
(0.707107 0.707107 0.5) points[15] = point(-0.707107, 0.707107, -0.5);
(0.353553 0.353553 0.5) points[16] = point(-0.353553, 0.353553, -0.5);
(2 2 0.5) points[17] = point(-2, 2, -0.5);
(0.707107 2 0.5) points[18] = point(-0.707107, 2, -0.5);
(0 2 0.5)
(0 1 0.5) // Duplicate z points
(0 0.5 0.5) label sz = points.size();
(-0.5 0 0.5) points.setSize(2*sz);
(-1 0 0.5) for (label i = 0; i < sz; i++)
(-2 0 0.5) {
(-2 0.707107 0.5) const point& pt = points[i];
(-0.707107 0.707107 0.5) points[i+sz] = point(pt.x(), pt.y(), -pt.z());
(-0.353553 0.353553 0.5) }
(-2 2 0.5)
(-0.707107 2 0.5) os << points;
); #};
};
blocks blocks
( (

View File

@ -49,8 +49,10 @@ functions
{ {
difference difference
{ {
// Load the library containing the 'coded' functionObject
functionObjectLibs ("libutilityFunctionObjects.so"); functionObjectLibs ("libutilityFunctionObjects.so");
type coded; type coded;
// Name of on-the-fly generated functionObject
redirectType error; redirectType error;
code code
#{ #{