mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: minor adjustments for fan tables (#1229)
This commit is contained in:
committed by
Andrew Heather
parent
c0e5f77e4f
commit
c4a13897a1
@ -62,7 +62,7 @@ class TableBase
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected Data
|
||||||
|
|
||||||
//- Table name
|
//- Table name
|
||||||
const word name_;
|
const word name_;
|
||||||
@ -93,9 +93,6 @@ protected:
|
|||||||
//- Return (demand driven) interpolator
|
//- Return (demand driven) interpolator
|
||||||
const interpolationWeights& interpolator() const;
|
const interpolationWeights& interpolator() const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
//- No copy assignment
|
//- No copy assignment
|
||||||
void operator=(const TableBase<Type>&) = delete;
|
void operator=(const TableBase<Type>&) = delete;
|
||||||
|
|
||||||
|
|||||||
@ -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) 2016-2017 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
@ -37,12 +37,12 @@ Foam::Function1Types::TableFile<Type>::TableFile
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
TableBase<Type>(entryName, dict),
|
TableBase<Type>(entryName, dict),
|
||||||
fName_("none")
|
fName_()
|
||||||
{
|
{
|
||||||
dict.readEntry("file", fName_);
|
dict.readEntry("file", fName_);
|
||||||
|
|
||||||
fileName expandedFile(fName_);
|
fileName expandedFile(fName_);
|
||||||
//IFstream is(expandedFile.expand());
|
|
||||||
autoPtr<ISstream> isPtr(fileHandler().NewIFstream(expandedFile.expand()));
|
autoPtr<ISstream> isPtr(fileHandler().NewIFstream(expandedFile.expand()));
|
||||||
ISstream& is = isPtr();
|
ISstream& is = isPtr();
|
||||||
|
|
||||||
@ -66,13 +66,6 @@ Foam::Function1Types::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::Function1Types::TableFile<Type>::~TableFile()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -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 |
|
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
@ -27,7 +27,7 @@ Class
|
|||||||
Foam::Function1Types::TableFile
|
Foam::Function1Types::TableFile
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Templated table container function where data is read from file.
|
Templated table container function where data are read from file.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
\verbatim
|
\verbatim
|
||||||
@ -40,8 +40,8 @@ Description
|
|||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Data is stored as a list of Tuple2's. First column is always stored as
|
Data are stored as a list of Tuple2's. First column is always stored as
|
||||||
scalar entries. Data is read in the form, e.g. for an entry \<entryName\>
|
scalar entries. Data are read in the form, e.g. for an entry \<entryName\>
|
||||||
that is (scalar, vector):
|
that is (scalar, vector):
|
||||||
\verbatim
|
\verbatim
|
||||||
(
|
(
|
||||||
@ -77,7 +77,7 @@ class TableFile
|
|||||||
:
|
:
|
||||||
public TableBase<Type>
|
public TableBase<Type>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- File name for csv table (optional)
|
//- File name for csv table (optional)
|
||||||
fileName fName_;
|
fileName fName_;
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from entry name and Istream
|
//- Construct from entry name and "file" found in dictionary
|
||||||
TableFile(const word& entryName, const dictionary& dict);
|
TableFile(const word& entryName, const dictionary& dict);
|
||||||
|
|
||||||
//- Copy constructor
|
//- Copy constructor
|
||||||
@ -105,7 +105,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~TableFile();
|
virtual ~TableFile() = default;
|
||||||
|
|
||||||
|
|
||||||
// I/O
|
// I/O
|
||||||
|
|||||||
@ -87,7 +87,7 @@ Usage
|
|||||||
componentColumns 1(1);
|
componentColumns 1(1);
|
||||||
separator ",";
|
separator ",";
|
||||||
mergeSeparators no;
|
mergeSeparators no;
|
||||||
file "<constant>/pressureVsU";
|
file "<constant>/UvsPressure";
|
||||||
}
|
}
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,6 +131,7 @@ template<class Type>
|
|||||||
void Foam::uniformJumpFvPatchField<Type>::write(Ostream& os) const
|
void Foam::uniformJumpFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fixedJumpFvPatchField<Type>::write(os);
|
fixedJumpFvPatchField<Type>::write(os);
|
||||||
|
|
||||||
if (this->cyclicPatch().owner())
|
if (this->cyclicPatch().owner())
|
||||||
{
|
{
|
||||||
jumpTable_->writeData(os);
|
jumpTable_->writeData(os);
|
||||||
|
|||||||
@ -94,7 +94,7 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- "jump" table
|
//- The "jump" table
|
||||||
autoPtr<Function1<Type>> jumpTable_;
|
autoPtr<Function1<Type>> jumpTable_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user