ENH: simpler coordinateSystem writeEntry with single parameter
This commit is contained in:
parent
4b7f92935e
commit
befbcfce24
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -244,7 +244,10 @@ void Foam::engineValve::writeDict(Ostream& os) const
|
||||
{
|
||||
os << nl << name() << nl << token::BEGIN_BLOCK;
|
||||
|
||||
cs().writeEntry(coordinateSystem::typeName_(), os);
|
||||
if (csysPtr_)
|
||||
{
|
||||
csysPtr_->writeEntry(os);
|
||||
}
|
||||
|
||||
os << "bottomPatch " << bottomPatch_.name() << token::END_STATEMENT << nl
|
||||
<< "poppetPatch " << poppetPatch_.name() << token::END_STATEMENT << nl
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -127,7 +127,7 @@ void Foam::coordinateScaling<Type>::writeEntry(Ostream& os) const
|
||||
{
|
||||
if (coordSys_)
|
||||
{
|
||||
coordSys_->writeEntry(coordinateSystem::typeName_(), os);
|
||||
coordSys_->writeEntry(os);
|
||||
}
|
||||
forAll(scale_, dir)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -426,6 +426,12 @@ void Foam::coordinateSystem::write(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::coordinateSystem::writeEntry(Ostream& os) const
|
||||
{
|
||||
writeEntry(coordinateSystem::typeName_(), os);
|
||||
}
|
||||
|
||||
|
||||
void Foam::coordinateSystem::writeEntry(const word& keyword, Ostream& os) const
|
||||
{
|
||||
if (!valid())
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -530,6 +530,9 @@ public:
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
//- Write 'coordinateSystem' dictionary entry
|
||||
virtual void writeEntry(Ostream& os) const;
|
||||
|
||||
//- Write dictionary entry
|
||||
virtual void writeEntry(const word& keyword, Ostream& os) const;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -87,6 +87,12 @@ void Foam::coordSystem::indirect::write(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::coordSystem::indirect::writeEntry(Ostream& os) const
|
||||
{
|
||||
writeEntry(coordinateSystem::typeName_(), os);
|
||||
}
|
||||
|
||||
|
||||
void Foam::coordSystem::indirect::writeEntry
|
||||
(
|
||||
const word& keyword,
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -259,6 +259,9 @@ public:
|
||||
//- Write
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
//- Write 'coordinateSystem' dictionary entry
|
||||
virtual void writeEntry(Ostream& os) const;
|
||||
|
||||
//- Write dictionary entry
|
||||
virtual void writeEntry(const word& keyword, Ostream& os) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user