diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C index 7768a42eb284e9ef347352254d297b48c9e754de..d0364e12dbe13d3ff8685a1c6e91ebe004e6003e 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C +++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C @@ -201,14 +201,14 @@ Foam::plane::plane(const dictionary& dict) const dictionary& subDict = dict.subDict("pointAndNormalDict"); point_ = - subDict.found("point") - ? subDict.lookup("point") - : subDict.lookup("basePoint"); + subDict.found("basePoint") + ? subDict.lookup("basePoint") + : subDict.lookup("point"); normal_ = - subDict.found("normal") - ? subDict.lookup("normal") - : subDict.lookup("normalVector"); + subDict.found("normalVector") + ? subDict.lookup("normalVector") + : subDict.lookup("normal"); normal_ /= mag(normal_); } diff --git a/src/sampling/cuttingPlane/cuttingPlane.H b/src/sampling/cuttingPlane/cuttingPlane.H index 44097254e48f6ee401f68cb063d9d5d3f9581b10..c6c3669ebd37c94d738e609268ef84845066d7c8 100644 --- a/src/sampling/cuttingPlane/cuttingPlane.H +++ b/src/sampling/cuttingPlane/cuttingPlane.H @@ -118,6 +118,7 @@ protected: //- Construct plane description without cutting cuttingPlane(const plane&); + // Protected Member Functions //- Recut mesh with existing planeDesc, restricted to a list of cells diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.C b/src/sampling/sampledSurface/sampledPlane/sampledPlane.C index c698bb8a26e87ba1fe125242318f0a4279c87031..135338d1fad82c67ec3a453ec823c06b17ad29ad 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.C +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.C @@ -71,24 +71,12 @@ Foam::sampledPlane::sampledPlane ) : sampledSurface(name, mesh, dict), - cuttingPlane - ( - plane - ( - dict.found("point") - ? dict.lookup("point") - : dict.lookup("basePoint"), - - dict.found("normal") - ? dict.lookup("normal") - : dict.lookup("normalVector") - ) - ), + cuttingPlane(plane(dict)), zoneKey_(keyType::null), triangulate_(dict.lookupOrDefault("triangulate", true)), needsUpdate_(true) { - // make plane relative to the coordinateSystem (Cartesian) + // Make plane relative to the coordinateSystem (Cartesian) // allow lookup from global coordinate systems if (dict.found("coordinateSystem")) { @@ -97,7 +85,7 @@ Foam::sampledPlane::sampledPlane point base = cs.globalPosition(planeDesc().refPoint()); vector norm = cs.globalVector(planeDesc().normal()); - // assign the plane description + // Assign the plane description static_cast<plane&>(*this) = plane(base, norm); } @@ -127,7 +115,7 @@ bool Foam::sampledPlane::needsUpdate() const bool Foam::sampledPlane::expire() { - // already marked as expired + // Already marked as expired if (needsUpdate_) { return false;