Commit 305bdb59 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: add clear() method to coordinateSystem, coordinateRotation

parent 81c385e5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -167,6 +167,14 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New ...@@ -167,6 +167,14 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
} }
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::coordinateRotation::clear()
{
this->tensor::operator=(sphericalTensor::I);
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
void Foam::coordinateRotation::operator=(const dictionary& rhs) void Foam::coordinateRotation::operator=(const dictionary& rhs)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -165,6 +165,9 @@ public: ...@@ -165,6 +165,9 @@ public:
// Member Functions // Member Functions
//- Reset rotation to an identity rotation
virtual void clear();
//- Return local-to-global transformation tensor //- Return local-to-global transformation tensor
const tensor& R() const const tensor& R() const
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -290,6 +290,15 @@ Foam::tmp<Foam::vectorField> Foam::coordinateSystem::globalToLocal ...@@ -290,6 +290,15 @@ Foam::tmp<Foam::vectorField> Foam::coordinateSystem::globalToLocal
} }
void Foam::coordinateSystem::clear()
{
note_.clear();
origin_ = point::zero;
R_.clear();
Rtr_ = sphericalTensor::I;
}
void Foam::coordinateSystem::write(Ostream& os) const void Foam::coordinateSystem::write(Ostream& os) const
{ {
os << type() os << type()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -397,6 +397,10 @@ public: ...@@ -397,6 +397,10 @@ public:
return origin_; return origin_;
} }
//- Reset origin and rotation to an identity coordinateSystem
// Also resets the note
virtual void clear();
// Write // Write
......
Markdown is supported
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