mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add clear() method to coordinateSystem, coordinateRotation
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -167,6 +167,14 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::coordinateRotation::clear()
|
||||
{
|
||||
this->tensor::operator=(sphericalTensor::I);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::coordinateRotation::operator=(const dictionary& rhs)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -165,6 +165,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Reset rotation to an identity rotation
|
||||
virtual void clear();
|
||||
|
||||
//- Return local-to-global transformation tensor
|
||||
const tensor& R() const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -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
|
||||
{
|
||||
os << type()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -397,6 +397,10 @@ public:
|
||||
return origin_;
|
||||
}
|
||||
|
||||
//- Reset origin and rotation to an identity coordinateSystem
|
||||
// Also resets the note
|
||||
virtual void clear();
|
||||
|
||||
|
||||
// Write
|
||||
|
||||
|
||||
Reference in New Issue
Block a user