sampledPlane: Correct handling of coordinate system specification

Patches provided by Timm Severin
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1764
This commit is contained in:
Henry Weller
2015-06-25 22:04:00 +01:00
parent e9ecd7ddef
commit c981db68c7
2 changed files with 12 additions and 2 deletions

View File

@ -175,10 +175,20 @@ surfaces
interpolatedPlane interpolatedPlane
{ {
type plane; // always triangulated type plane; // always triangulated
// make plane relative to the coordinateSystem (Cartesian)
// Make plane relative to the coordinateSystem (Cartesian)
coordinateSystem coordinateSystem
{ {
origin (0.0501 0.0501 0.005); origin (0.0501 0.0501 0.005);
// Add a coordinate rotation
// (required, so here one that doesn't change anything)
coordinateRotation
{
type axesRotation;
e1 (1 0 0);
e2 (0 1 0);
}
} }
basePoint (0 0 0); basePoint (0 0 0);
normalVector (0.1 0.1 1); normalVector (0.1 0.1 1);

View File

@ -80,7 +80,7 @@ Foam::sampledPlane::sampledPlane
// allow lookup from global coordinate systems // allow lookup from global coordinate systems
if (dict.found("coordinateSystem")) if (dict.found("coordinateSystem"))
{ {
coordinateSystem cs(mesh, dict); coordinateSystem cs(mesh, dict.subDict("coordinateSystem"));
point base = cs.globalPosition(planeDesc().refPoint()); point base = cs.globalPosition(planeDesc().refPoint());
vector norm = cs.globalVector(planeDesc().normal()); vector norm = cs.globalVector(planeDesc().normal());