diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index 5facf32e4980c1b18a9384fe4953f23fc96a00e1..73d0f580318c593a5c183c44aec5963aa7c83d22 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -485,9 +485,10 @@ class CylinderField : public Field public: std::string getDescription() { - return "The value of this field is VIn inside the cylinder, VOut outside.\n" + return "The value of this field is VIn inside a frustrated cylinder, VOut outside.\n" "The cylinder is given by\n\n" " ||dX||^2 < R^2 &&\n" + " (X-X0).A < ||A||^2\n" " dX = (X - X0) - ((X - X0).A)/(||A||^2) . A"; } CylinderField() @@ -535,7 +536,7 @@ class CylinderField : public Field dy -= adx * ya; dz -= adx * za; - return (dx*dx + dy*dy + dz*dz < R*R) ? v_in : v_out; + return ((dx*dx + dy*dy + dz*dz < R*R) && fabs(adx) < 1) ? v_in : v_out; } };