mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use noexcept creation of InfoProxy and dereference as '*iproxy'
- this removes the 'magic' use of the exposed t_ member in favour of a generic dereference
This commit is contained in:
@ -33,10 +33,10 @@ template<class Gt, class Cb>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<CGAL::indexedCell<Gt, Cb>>& p
|
const InfoProxy<CGAL::indexedCell<Gt, Cb>>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const CGAL::indexedCell<Gt, Cb>& iv = p.t_;
|
const auto& iv = *iproxy;
|
||||||
|
|
||||||
os << "Cell: ";
|
os << "Cell: ";
|
||||||
|
|
||||||
|
|||||||
@ -249,9 +249,9 @@ public:
|
|||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print indexedCell information to a stream
|
//- used to print information to a stream
|
||||||
Foam::InfoProxy<indexedCell<Gt, Cb>> info() const
|
Foam::InfoProxy<indexedCell<Gt, Cb>> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -261,7 +261,6 @@ public:
|
|||||||
Foam::Ostream&,
|
Foam::Ostream&,
|
||||||
const Foam::InfoProxy<indexedCell<Gt, Cb>>&
|
const Foam::InfoProxy<indexedCell<Gt, Cb>>&
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -156,10 +156,10 @@ template<class Gt, class Vb>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<CGAL::indexedVertex<Gt, Vb>>& p
|
const InfoProxy<CGAL::indexedVertex<Gt, Vb>>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const CGAL::indexedVertex<Gt, Vb>& iv = p.t_;
|
const auto& iv = *iproxy;
|
||||||
|
|
||||||
const Foam::point pt
|
const Foam::point pt
|
||||||
(
|
(
|
||||||
|
|||||||
@ -313,8 +313,9 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
//- Info proxy, to print information to a stream
|
//- Return info proxy,
|
||||||
Foam::InfoProxy<indexedVertex<Gt, Vb>> info() const
|
//- used to print information to a stream
|
||||||
|
Foam::InfoProxy<indexedVertex<Gt, Vb>> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -654,7 +654,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
const InfoProxy<PDRobstacle>& iproxy
|
const InfoProxy<PDRobstacle>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const PDRobstacle& obs = iproxy.t_;
|
const auto& obs = *iproxy;
|
||||||
|
|
||||||
switch (obs.typeId)
|
switch (obs.typeId)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,8 +37,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef PDRobstacle_H
|
#ifndef Foam_PDRobstacle_H
|
||||||
#define PDRobstacle_H
|
#define Foam_PDRobstacle_H
|
||||||
|
|
||||||
#include "InfoProxy.H"
|
#include "InfoProxy.H"
|
||||||
#include "labelPair.H"
|
#include "labelPair.H"
|
||||||
@ -290,8 +290,9 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
InfoProxy<PDRobstacle> info() const
|
//- used to print information to a stream
|
||||||
|
InfoProxy<PDRobstacle> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -510,8 +510,9 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
InfoProxy<PackedList<Width>> info() const
|
//- used to print information to a stream
|
||||||
|
InfoProxy<PackedList<Width>> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -271,7 +271,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
const InfoProxy<PackedList<Width>>& iproxy
|
const InfoProxy<PackedList<Width>>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const PackedList<Width>& list = iproxy.t_;
|
const auto& list = *iproxy;
|
||||||
|
|
||||||
os << "PackedList<" << Width
|
os << "PackedList<" << Width
|
||||||
<< "> size=" << list.size() << "/" << list.capacity()
|
<< "> size=" << list.size() << "/" << list.capacity()
|
||||||
|
|||||||
@ -604,8 +604,9 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
//- Return info proxy
|
//- Return info proxy,
|
||||||
InfoProxy<bitSet> info() const
|
//- used to print information to a stream
|
||||||
|
InfoProxy<bitSet> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -634,7 +635,7 @@ template<> struct Hash<bitSet> : bitSet::hasher {};
|
|||||||
Ostream& operator<<(Ostream& os, const bitSet& bitset);
|
Ostream& operator<<(Ostream& os, const bitSet& bitset);
|
||||||
|
|
||||||
//- Output bitset information
|
//- Output bitset information
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<bitSet>& info);
|
Ostream& operator<<(Ostream& os, const InfoProxy<bitSet>& iproxy);
|
||||||
|
|
||||||
|
|
||||||
//- Bitset complement, returns a copy of the bitset with all its bits flipped
|
//- Bitset complement, returns a copy of the bitset with all its bits flipped
|
||||||
|
|||||||
@ -42,10 +42,10 @@ Foam::Ostream& Foam::operator<<
|
|||||||
const InfoProxy<bitSet>& iproxy
|
const InfoProxy<bitSet>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const bitSet& bitset = iproxy.t_;
|
const auto& bitset = *iproxy;
|
||||||
|
|
||||||
os << "bitSet<" << bitSet::elem_per_block
|
os << "bitSet<" << bitSet::elem_per_block
|
||||||
<< "> size=" << bitset.size() << "/" << bitset.capacity()
|
<< "> size=" << bitset.size() << '/' << bitset.capacity()
|
||||||
<< " count=" << bitset.count()
|
<< " count=" << bitset.count()
|
||||||
<< nl;
|
<< nl;
|
||||||
|
|
||||||
|
|||||||
@ -101,8 +101,8 @@ SourceFiles
|
|||||||
#include "fileName.H"
|
#include "fileName.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "InfoProxy.H"
|
|
||||||
#include "Enum.H"
|
#include "Enum.H"
|
||||||
|
#include "InfoProxy.H"
|
||||||
#include "IOobjectOption.H"
|
#include "IOobjectOption.H"
|
||||||
#include "IOstreamOption.H"
|
#include "IOstreamOption.H"
|
||||||
|
|
||||||
@ -115,6 +115,11 @@ namespace Foam
|
|||||||
class Time;
|
class Time;
|
||||||
class dictionary;
|
class dictionary;
|
||||||
class objectRegistry;
|
class objectRegistry;
|
||||||
|
class IOobject;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<IOobject>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class IOobject Declaration
|
Class IOobject Declaration
|
||||||
@ -646,11 +651,9 @@ public:
|
|||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy, for printing information to a stream
|
//- Return info proxy,
|
||||||
InfoProxy<IOobject> info() const
|
//- for printing information to a stream
|
||||||
{
|
InfoProxy<IOobject> info() const noexcept { return *this; }
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
@ -668,10 +671,6 @@ inline bool IOobject::isHeaderClass<void>() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<IOobject>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
//- Template function for obtaining global vs. local status
|
//- Template function for obtaining global vs. local status
|
||||||
template<class T>
|
template<class T>
|
||||||
inline bool typeGlobal()
|
inline bool typeGlobal()
|
||||||
|
|||||||
@ -31,9 +31,13 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<IOobject>& ip)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const InfoProxy<IOobject>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const IOobject& io = ip.t_;
|
const auto& io = *iproxy;
|
||||||
|
|
||||||
os << "IOobject: "
|
os << "IOobject: "
|
||||||
<< io.type() << ' ' << io.name()
|
<< io.type() << ' ' << io.name()
|
||||||
|
|||||||
@ -138,9 +138,13 @@ void Foam::IOstream::print(Ostream& os, const int streamState) const
|
|||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<IOstream>& ip)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const InfoProxy<IOstream>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ip.t_.print(os);
|
(*iproxy).print(os);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,13 @@ using std::cout;
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
|
class IOstream;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<IOstream>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class IOstream Declaration
|
Class IOstream Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -405,21 +412,12 @@ public:
|
|||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print IOstream information to a stream
|
//- used to print IOstream information to a stream
|
||||||
InfoProxy<IOstream> info() const
|
InfoProxy<IOstream> info() const noexcept { return *this; }
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<IOstream>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// ------ Manipulators (not taking arguments)
|
// ------ Manipulators (not taking arguments)
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|||||||
@ -583,11 +583,9 @@ public:
|
|||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy for printing token information to a stream
|
//- Return info proxy,
|
||||||
InfoProxy<token> info() const
|
//- for printing token information to a stream
|
||||||
{
|
InfoProxy<token> info() const noexcept { return *this; }
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
@ -658,7 +656,7 @@ public:
|
|||||||
friend Ostream& operator<<(Ostream& os, const punctuationToken& pt);
|
friend Ostream& operator<<(Ostream& os, const punctuationToken& pt);
|
||||||
friend ostream& operator<<(ostream& os, const punctuationToken& pt);
|
friend ostream& operator<<(ostream& os, const punctuationToken& pt);
|
||||||
|
|
||||||
friend ostream& operator<<(ostream& os, const InfoProxy<token>& ct);
|
friend ostream& operator<<(ostream& os, const InfoProxy<token>& ip);
|
||||||
|
|
||||||
|
|
||||||
// Housekeeping
|
// Housekeeping
|
||||||
|
|||||||
@ -260,16 +260,24 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const token::compound& ct)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
ostream& Foam::operator<<(ostream& os, const InfoProxy<token>& ip)
|
ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
ostream& os,
|
||||||
|
const InfoProxy<token>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return printTokenInfo(os, ip.t_);
|
return printTokenInfo(os, *iproxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<token>& ip)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const InfoProxy<token>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return printTokenInfo(os, ip.t_);
|
return printTokenInfo(os, *iproxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,8 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef dictionaryEntry_H
|
#ifndef Foam_dictionaryEntry_H
|
||||||
#define dictionaryEntry_H
|
#define Foam_dictionaryEntry_H
|
||||||
|
|
||||||
#include "entry.H"
|
#include "entry.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
@ -54,10 +54,13 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class dictionaryEntry;
|
class dictionaryEntry;
|
||||||
Ostream& operator<<(Ostream& os, const dictionaryEntry& e);
|
Ostream& operator<<(Ostream& os, const dictionaryEntry& e);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<dictionaryEntry>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class dictionaryEntry Declaration
|
Class dictionaryEntry Declaration
|
||||||
@ -68,14 +71,14 @@ class dictionaryEntry
|
|||||||
public entry,
|
public entry,
|
||||||
public dictionary
|
public dictionary
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
public:
|
||||||
|
|
||||||
|
// Generated Methods
|
||||||
|
|
||||||
//- No copy construct
|
//- No copy construct
|
||||||
dictionaryEntry(const dictionaryEntry&) = delete;
|
dictionaryEntry(const dictionaryEntry&) = delete;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from the parent dictionary and Istream.
|
//- Construct from the parent dictionary and Istream.
|
||||||
@ -158,24 +161,17 @@ public:
|
|||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream& os) const;
|
virtual void write(Ostream& os) const;
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print token information to a stream
|
//- used to print token information to a stream
|
||||||
InfoProxy<dictionaryEntry> info() const
|
InfoProxy<dictionaryEntry> info() const noexcept { return *this; }
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream& os, const dictionaryEntry& e);
|
friend Ostream& operator<<(Ostream& os, const dictionaryEntry& e);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<dictionaryEntry>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -68,7 +68,11 @@ void Foam::dictionaryEntry::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Ostream operator * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Ostream operator * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const dictionaryEntry& e)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const dictionaryEntry& e
|
||||||
|
)
|
||||||
{
|
{
|
||||||
e.write(os);
|
e.write(os);
|
||||||
return os;
|
return os;
|
||||||
@ -79,10 +83,10 @@ template<>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<dictionaryEntry>& ip
|
const InfoProxy<dictionaryEntry>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const dictionaryEntry& e = ip.t_;
|
const auto& e = *iproxy;
|
||||||
|
|
||||||
os << " dictionaryEntry '" << e.keyword() << "'" << endl;
|
os << " dictionaryEntry '" << e.keyword() << "'" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -42,8 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef dictionaryListEntry_H
|
#ifndef Foam_dictionaryListEntry_H
|
||||||
#define dictionaryListEntry_H
|
#define Foam_dictionaryListEntry_H
|
||||||
|
|
||||||
#include "dictionaryEntry.H"
|
#include "dictionaryEntry.H"
|
||||||
|
|
||||||
@ -52,11 +52,14 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward Declarations
|
||||||
|
|
||||||
class dictionaryListEntry;
|
class dictionaryListEntry;
|
||||||
Ostream& operator<<(Ostream& os, const dictionaryListEntry& e);
|
Ostream& operator<<(Ostream& os, const dictionaryListEntry& e);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<dictionaryListEntry>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class dictionaryListEntry Declaration
|
Class dictionaryListEntry Declaration
|
||||||
@ -66,14 +69,14 @@ class dictionaryListEntry
|
|||||||
:
|
:
|
||||||
public dictionaryEntry
|
public dictionaryEntry
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
public:
|
||||||
|
|
||||||
|
// Generated Methods
|
||||||
|
|
||||||
//- No copy construct
|
//- No copy construct
|
||||||
dictionaryListEntry(const dictionaryListEntry&) = delete;
|
dictionaryListEntry(const dictionaryListEntry&) = delete;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from the parent dictionary and Istream
|
//- Construct from the parent dictionary and Istream
|
||||||
@ -92,29 +95,22 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member Functions
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream& os) const;
|
virtual void write(Ostream& os) const;
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print token information to a stream
|
//- used to print token information to a stream
|
||||||
InfoProxy<dictionaryListEntry> info() const
|
InfoProxy<dictionaryListEntry> info() const noexcept { return *this; }
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Ostream operator
|
// Ostream Operator
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream& os, const dictionaryListEntry& e);
|
friend Ostream& operator<<(Ostream& os, const dictionaryListEntry& e);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<dictionaryListEntry>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -132,7 +132,11 @@ void Foam::dictionaryListEntry::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Ostream operator * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Ostream operator * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const dictionaryListEntry& e)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const dictionaryListEntry& e
|
||||||
|
)
|
||||||
{
|
{
|
||||||
e.write(os);
|
e.write(os);
|
||||||
return os;
|
return os;
|
||||||
@ -143,10 +147,10 @@ template<>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<dictionaryListEntry>& ip
|
const InfoProxy<dictionaryListEntry>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const dictionaryListEntry& e = ip.t_;
|
const auto& e = *iproxy;
|
||||||
|
|
||||||
os << " dictionaryListEntry '" << e.keyword() << "'" << endl;
|
os << " dictionaryListEntry '" << e.keyword() << "'" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -42,8 +42,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef primitiveEntry_H
|
#ifndef Foam_primitiveEntry_H
|
||||||
#define primitiveEntry_H
|
#define Foam_primitiveEntry_H
|
||||||
|
|
||||||
#include "entry.H"
|
#include "entry.H"
|
||||||
#include "ITstream.H"
|
#include "ITstream.H"
|
||||||
@ -56,6 +56,11 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
class dictionary;
|
class dictionary;
|
||||||
|
class primitiveEntry;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<primitiveEntry>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class primitiveEntry Declaration
|
Class primitiveEntry Declaration
|
||||||
@ -193,19 +198,12 @@ public:
|
|||||||
//- Write, optionally with contents only (no keyword, etc)
|
//- Write, optionally with contents only (no keyword, etc)
|
||||||
void write(Ostream& os, const bool contentsOnly) const;
|
void write(Ostream& os, const bool contentsOnly) const;
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print token information to a stream
|
//- to print token information to a stream
|
||||||
InfoProxy<primitiveEntry> info() const
|
InfoProxy<primitiveEntry> info() const noexcept { return *this; }
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<primitiveEntry>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -313,14 +313,14 @@ template<>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<primitiveEntry>& ip
|
const InfoProxy<primitiveEntry>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const primitiveEntry& e = ip.t_;
|
const auto& e = *iproxy;
|
||||||
|
|
||||||
e.print(os);
|
e.print(os);
|
||||||
|
|
||||||
const label nPrintTokens = 10;
|
constexpr label nPrintTokens = 10;
|
||||||
|
|
||||||
os << " primitiveEntry '" << e.keyword() << "' comprises ";
|
os << " primitiveEntry '" << e.keyword() << "' comprises ";
|
||||||
|
|
||||||
|
|||||||
@ -611,10 +611,10 @@ bool Foam::dlLibraryTable::open
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<dlLibraryTable>& ip
|
const InfoProxy<dlLibraryTable>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const dlLibraryTable& tbl = ip.t_;
|
const auto& tbl = *iproxy;
|
||||||
|
|
||||||
os << token::BEGIN_LIST << nl;
|
os << token::BEGIN_LIST << nl;
|
||||||
|
|
||||||
|
|||||||
@ -40,8 +40,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef dlLibraryTable_H
|
#ifndef Foam_dlLibraryTable_H
|
||||||
#define dlLibraryTable_H
|
#define Foam_dlLibraryTable_H
|
||||||
|
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "fileName.H"
|
#include "fileName.H"
|
||||||
@ -55,7 +55,8 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
class dlLibraryTable;
|
class dlLibraryTable;
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<dlLibraryTable>& info);
|
Ostream& operator<<(Ostream&, const InfoProxy<dlLibraryTable>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class dlLibraryTable Declaration
|
Class dlLibraryTable Declaration
|
||||||
@ -308,12 +309,9 @@ public:
|
|||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print library table information to a stream
|
//- used to print library table information to a stream
|
||||||
InfoProxy<dlLibraryTable> info() const
|
InfoProxy<dlLibraryTable> info() const noexcept { return *this; }
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -407,9 +407,13 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const lduMatrix& ldum)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<lduMatrix>& ip)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const InfoProxy<lduMatrix>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const lduMatrix& ldum = ip.t_;
|
const auto& ldum = *iproxy;
|
||||||
|
|
||||||
Switch hasLow = ldum.hasLower();
|
Switch hasLow = ldum.hasLower();
|
||||||
Switch hasDiag = ldum.hasDiag();
|
Switch hasDiag = ldum.hasDiag();
|
||||||
|
|||||||
@ -788,17 +788,14 @@ public:
|
|||||||
tmp<Field<Type>> faceH(const tmp<Field<Type>>&) const;
|
tmp<Field<Type>> faceH(const tmp<Field<Type>>&) const;
|
||||||
|
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print matrix information to a stream
|
//- used to print matrix information to a stream
|
||||||
InfoProxy<lduMatrix> info() const
|
InfoProxy<lduMatrix> info() const noexcept { return *this; }
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member Operators
|
||||||
|
|
||||||
void operator=(const lduMatrix&);
|
void operator=(const lduMatrix&);
|
||||||
|
|
||||||
@ -811,7 +808,7 @@ public:
|
|||||||
void operator*=(scalar);
|
void operator*=(scalar);
|
||||||
|
|
||||||
|
|
||||||
// Ostream operator
|
// Ostream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream&, const lduMatrix&);
|
friend Ostream& operator<<(Ostream&, const lduMatrix&);
|
||||||
friend Ostream& operator<<(Ostream&, const InfoProxy<lduMatrix>&);
|
friend Ostream& operator<<(Ostream&, const InfoProxy<lduMatrix>&);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(lduMesh, 0);
|
defineTypeNameAndDebug(lduMesh, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -49,9 +49,13 @@ const Foam::objectRegistry& Foam::lduMesh::thisDb() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<lduMesh>& ip)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const InfoProxy<lduMesh>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const lduMesh& ldum = ip.t_;
|
const auto& ldum = *iproxy;
|
||||||
const lduAddressing& addr = ldum.lduAddr();
|
const lduAddressing& addr = ldum.lduAddr();
|
||||||
const lduInterfacePtrsList interfaces = ldum.interfaces();
|
const lduInterfacePtrsList interfaces = ldum.interfaces();
|
||||||
|
|
||||||
@ -62,6 +66,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<lduMesh>& ip)
|
|||||||
<< " interfaces:" << interfaces.size()
|
<< " interfaces:" << interfaces.size()
|
||||||
<< " comm:" << ldum.comm()
|
<< " comm:" << ldum.comm()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
label nCouples = 0;
|
label nCouples = 0;
|
||||||
forAll(interfaces, i)
|
forAll(interfaces, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -98,14 +98,11 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print mesh information to a stream
|
//- used to print mesh information to a stream
|
||||||
InfoProxy<lduMesh> info() const
|
InfoProxy<lduMesh> info() const noexcept { return *this; }
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|||||||
@ -46,8 +46,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef cellModel_H
|
#ifndef Foam_cellModel_H
|
||||||
#define cellModel_H
|
#define Foam_cellModel_H
|
||||||
|
|
||||||
#include "pointField.H"
|
#include "pointField.H"
|
||||||
#include "edgeList.H"
|
#include "edgeList.H"
|
||||||
@ -66,6 +66,10 @@ namespace Foam
|
|||||||
class cellModel;
|
class cellModel;
|
||||||
Ostream& operator<<(Ostream& os, const cellModel& cm);
|
Ostream& operator<<(Ostream& os, const cellModel& cm);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<cellModel>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class cellModel Declaration
|
Class cellModel Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -228,12 +232,10 @@ public:
|
|||||||
const UList<point>& points
|
const UList<point>& points
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return info proxy.
|
|
||||||
// Used to print information to a stream
|
//- Return info proxy,
|
||||||
InfoProxy<cellModel> info() const
|
//- used to print information to a stream
|
||||||
{
|
InfoProxy<cellModel> info() const noexcept { return *this; }
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- The writeData member function required by regIOobject
|
//- The writeData member function required by regIOobject
|
||||||
bool writeData(Ostream& os) const
|
bool writeData(Ostream& os) const
|
||||||
@ -249,12 +251,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operators
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<cellModel>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// Global Operators
|
// Global Operators
|
||||||
|
|
||||||
//- Equality: true when model pointers are identical
|
//- Equality: true when model pointers are identical
|
||||||
|
|||||||
@ -59,9 +59,13 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const cellModel& cm)
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<cellModel>& ip)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const InfoProxy<cellModel>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const cellModel& cm = ip.t_;
|
const auto& cm = *iproxy;
|
||||||
|
|
||||||
os << "name = " << cm.name() << ", "
|
os << "name = " << cm.name() << ", "
|
||||||
<< "index = " << cm.index() << ", "
|
<< "index = " << cm.index() << ", "
|
||||||
|
|||||||
@ -62,6 +62,9 @@ bool operator==(const cellShape& a, const cellShape& b);
|
|||||||
Istream& operator>>(Istream& is, cellShape& s);
|
Istream& operator>>(Istream& is, cellShape& s);
|
||||||
Ostream& operator<<(Ostream& os, const cellShape& s);
|
Ostream& operator<<(Ostream& os, const cellShape& s);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream& os, const InfoProxy<cellShape>& ip);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class cellShape Declaration
|
Class cellShape Declaration
|
||||||
@ -212,11 +215,9 @@ public:
|
|||||||
//- Collapse shape to correct one after removing duplicate vertices
|
//- Collapse shape to correct one after removing duplicate vertices
|
||||||
void collapse();
|
void collapse();
|
||||||
|
|
||||||
//- Return info proxy, to print information to a stream
|
//- Return info proxy,
|
||||||
Foam::InfoProxy<cellShape> info() const
|
//- used to print information to a stream
|
||||||
{
|
InfoProxy<cellShape> info() const noexcept { return *this; }
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Friend Operators
|
// Friend Operators
|
||||||
@ -224,17 +225,13 @@ public:
|
|||||||
friend bool operator==(const cellShape& a, const cellShape& b);
|
friend bool operator==(const cellShape& a, const cellShape& b);
|
||||||
|
|
||||||
|
|
||||||
// IOstream operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Istream& operator>>(Istream& is, cellShape& s);
|
friend Istream& operator>>(Istream& is, cellShape& s);
|
||||||
friend Ostream& operator<<(Ostream& os, const cellShape& s);
|
friend Ostream& operator<<(Ostream& os, const cellShape& s);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<cellShape>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -115,9 +115,13 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const cellShape& s)
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<cellShape>& ip)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const InfoProxy<cellShape>& iproxy
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const cellShape& cs = ip.t_;
|
const auto& cs = *iproxy;
|
||||||
|
|
||||||
if (isNull(cs.model()))
|
if (isNull(cs.model()))
|
||||||
{
|
{
|
||||||
@ -125,7 +129,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<cellShape>& ip)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << cs.model().info() << endl;
|
os << cs.model().info() << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
os << "\tGeom:\tpoint\tlabel\txyz\n";
|
os << "\tGeom:\tpoint\tlabel\txyz\n";
|
||||||
|
|||||||
@ -97,6 +97,9 @@ class mapDistributeBase;
|
|||||||
Istream& operator>>(Istream&, mapDistributeBase&);
|
Istream& operator>>(Istream&, mapDistributeBase&);
|
||||||
Ostream& operator<<(Ostream&, const mapDistributeBase&);
|
Ostream& operator<<(Ostream&, const mapDistributeBase&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<mapDistributeBase>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mapDistributeBase Declaration
|
Class mapDistributeBase Declaration
|
||||||
@ -1031,8 +1034,9 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
//- Info proxy to print summary information to a stream
|
//- Return info proxy,
|
||||||
InfoProxy<mapDistributeBase> info() const
|
//- used to print summary information to a stream
|
||||||
|
InfoProxy<mapDistributeBase> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -1079,12 +1083,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<mapDistributeBase>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -171,10 +171,10 @@ template<>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<mapDistributeBase>& ip
|
const InfoProxy<mapDistributeBase>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const auto& map = ip.t_;
|
const auto& map = *iproxy;
|
||||||
|
|
||||||
// Output as compact pseudo dictionary entries
|
// Output as compact pseudo dictionary entries
|
||||||
|
|
||||||
|
|||||||
@ -59,6 +59,9 @@ class mapDistributePolyMesh;
|
|||||||
Istream& operator>>(Istream&, mapDistributePolyMesh&);
|
Istream& operator>>(Istream&, mapDistributePolyMesh&);
|
||||||
Ostream& operator<<(Ostream&, const mapDistributePolyMesh&);
|
Ostream& operator<<(Ostream&, const mapDistributePolyMesh&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<mapDistributePolyMesh>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class mapDistributePolyMesh Declaration
|
Class mapDistributePolyMesh Declaration
|
||||||
@ -308,8 +311,9 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
//- Info proxy to print summary information to a stream
|
//- Return info proxy,
|
||||||
InfoProxy<mapDistributePolyMesh> info() const
|
//- used to print summary information to a stream
|
||||||
|
InfoProxy<mapDistributePolyMesh> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -351,12 +355,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<mapDistributePolyMesh>& ip);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -187,10 +187,10 @@ template<>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<mapDistributePolyMesh>& ip
|
const InfoProxy<mapDistributePolyMesh>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const auto& map = ip.t_;
|
const auto& map = *iproxy;
|
||||||
|
|
||||||
os.beginBlock("cellMap");
|
os.beginBlock("cellMap");
|
||||||
os.writeEntry("oldSize", map.nOldCells());
|
os.writeEntry("oldSize", map.nOldCells());
|
||||||
|
|||||||
@ -254,8 +254,9 @@ public:
|
|||||||
|
|
||||||
// Output
|
// Output
|
||||||
|
|
||||||
//- Return info proxy
|
//- Return info proxy,
|
||||||
InfoProxy<ensightCells> info() const { return *this; }
|
//- used to print information to a stream
|
||||||
|
InfoProxy<ensightCells> info() const noexcept { return *this; }
|
||||||
|
|
||||||
|
|
||||||
//- Globally unique mesh points. Required when writing point fields.
|
//- Globally unique mesh points. Required when writing point fields.
|
||||||
@ -281,6 +282,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//- Print information via proxy
|
||||||
template<>
|
template<>
|
||||||
Ostream& operator<<(Ostream&, const InfoProxy<ensightCells>&);
|
Ostream& operator<<(Ostream&, const InfoProxy<ensightCells>&);
|
||||||
|
|
||||||
|
|||||||
@ -336,10 +336,10 @@ template<>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<ensightCells>& ip
|
const InfoProxy<ensightCells>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const ensightCells& part = ip.t_;
|
const auto& part = *iproxy;
|
||||||
|
|
||||||
os << part.name().c_str();
|
os << part.name().c_str();
|
||||||
|
|
||||||
|
|||||||
@ -247,8 +247,9 @@ public:
|
|||||||
|
|
||||||
// Output
|
// Output
|
||||||
|
|
||||||
//- Return info proxy
|
//- Return info proxy,
|
||||||
InfoProxy<ensightFaces> info() const { return *this; }
|
//- used to print information to a stream
|
||||||
|
InfoProxy<ensightFaces> info() const noexcept { return *this; }
|
||||||
|
|
||||||
|
|
||||||
//- Globally unique mesh points.
|
//- Globally unique mesh points.
|
||||||
@ -274,6 +275,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//- Print information via proxy
|
||||||
template<>
|
template<>
|
||||||
Ostream& operator<<(Ostream&, const InfoProxy<ensightFaces>&);
|
Ostream& operator<<(Ostream&, const InfoProxy<ensightFaces>&);
|
||||||
|
|
||||||
|
|||||||
@ -141,10 +141,10 @@ template<>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<ensightFaces>& ip
|
const InfoProxy<ensightFaces>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const ensightFaces& part = ip.t_;
|
const auto& part = *iproxy;
|
||||||
|
|
||||||
os << part.name().c_str();
|
os << part.name().c_str();
|
||||||
|
|
||||||
|
|||||||
@ -508,10 +508,10 @@ Foam::Ostream& Foam::operator<<
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<wallBoundedParticle>& ip
|
const InfoProxy<wallBoundedParticle>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const wallBoundedParticle& p = ip.t_;
|
const auto& p = *iproxy;
|
||||||
|
|
||||||
tetPointRef tpr(p.currentTetIndices().tet(p.mesh()));
|
tetPointRef tpr(p.currentTetIndices().tet(p.mesh()));
|
||||||
|
|
||||||
|
|||||||
@ -260,25 +260,25 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
// Used to print particle information to a stream
|
//- used to print particle information to a stream
|
||||||
inline InfoProxy<wallBoundedParticle> info() const
|
InfoProxy<wallBoundedParticle> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
static void readFields(CloudType&);
|
static void readFields(CloudType&);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
static void writeFields(const CloudType&);
|
static void writeFields(const CloudType&);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|||||||
@ -496,7 +496,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
const InfoProxy<blockDescriptor>& iproxy
|
const InfoProxy<blockDescriptor>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const blockDescriptor& bd = iproxy.t_;
|
const auto& bd = *iproxy;
|
||||||
|
|
||||||
os << "Dimensions:" << bd.density()
|
os << "Dimensions:" << bd.density()
|
||||||
<< " nPoints:" << bd.nPoints()
|
<< " nPoints:" << bd.nPoints()
|
||||||
|
|||||||
@ -55,8 +55,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef blockDescriptor_H
|
#ifndef Foam_blockDescriptor_H
|
||||||
#define blockDescriptor_H
|
#define Foam_blockDescriptor_H
|
||||||
|
|
||||||
#include "ijkMesh.H"
|
#include "ijkMesh.H"
|
||||||
#include "cellShape.H"
|
#include "cellShape.H"
|
||||||
@ -72,6 +72,14 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
|
class blockDescriptor;
|
||||||
|
|
||||||
|
Ostream& operator<<(Ostream&, const blockDescriptor&);
|
||||||
|
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<blockDescriptor>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class blockDescriptor Declaration
|
Class blockDescriptor Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -261,21 +269,12 @@ public:
|
|||||||
//- Write block index with dictionary lookup
|
//- Write block index with dictionary lookup
|
||||||
static void write(Ostream&, const label blocki, const dictionary&);
|
static void write(Ostream&, const label blocki, const dictionary&);
|
||||||
|
|
||||||
//- Return info proxy
|
//- Return info proxy,
|
||||||
InfoProxy<blockDescriptor> info() const
|
//- used to print information to a stream
|
||||||
{
|
InfoProxy<blockDescriptor> info() const noexcept { return *this; }
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//- Output Operator
|
|
||||||
Ostream& operator<<(Ostream& os, const blockDescriptor& bd);
|
|
||||||
|
|
||||||
//- Info output
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<blockDescriptor>& info);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -461,10 +461,10 @@ bool Foam::coordSetWriter::merge() const
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<coordSetWriter>& ip
|
const InfoProxy<coordSetWriter>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const coordSetWriter& w = ip.t_;
|
const auto& w = *iproxy;
|
||||||
|
|
||||||
os << "coordSetWriter:"
|
os << "coordSetWriter:"
|
||||||
<< " upToDate: " << w.upToDate_
|
<< " upToDate: " << w.upToDate_
|
||||||
|
|||||||
@ -538,7 +538,8 @@ public:
|
|||||||
|
|
||||||
// Other
|
// Other
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
|
//- used to print information to a stream
|
||||||
virtual InfoProxy<coordSetWriter> info() const
|
virtual InfoProxy<coordSetWriter> info() const
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
@ -548,7 +549,7 @@ public:
|
|||||||
friend Ostream& operator<<
|
friend Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<coordSetWriter>& ip
|
const InfoProxy<coordSetWriter>& iproxy
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -111,10 +111,10 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const surfaceLocation& sl)
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<surfaceLocation>& ip
|
const InfoProxy<surfaceLocation>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const surfaceLocation& sl = ip.t_;
|
const auto& sl = *iproxy;
|
||||||
|
|
||||||
os << "coord:" << sl.point();
|
os << "coord:" << sl.point();
|
||||||
|
|
||||||
|
|||||||
@ -45,8 +45,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef surfaceLocation_H
|
#ifndef Foam_surfaceLocation_H
|
||||||
#define surfaceLocation_H
|
#define Foam_surfaceLocation_H
|
||||||
|
|
||||||
#include "pointIndexHit.H"
|
#include "pointIndexHit.H"
|
||||||
#include "triangle.H"
|
#include "triangle.H"
|
||||||
@ -63,8 +63,10 @@ class triSurface;
|
|||||||
|
|
||||||
Istream& operator>>(Istream&, surfaceLocation&);
|
Istream& operator>>(Istream&, surfaceLocation&);
|
||||||
Ostream& operator<<(Ostream&, const surfaceLocation&);
|
Ostream& operator<<(Ostream&, const surfaceLocation&);
|
||||||
|
|
||||||
Ostream& operator<<(Ostream&, const InfoProxy<surfaceLocation>&);
|
Ostream& operator<<(Ostream&, const InfoProxy<surfaceLocation>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class surfaceLocation Declaration
|
Class surfaceLocation Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -139,11 +141,9 @@ public:
|
|||||||
//- Normal. Approximate for points.
|
//- Normal. Approximate for points.
|
||||||
vector normal(const triSurface& s) const;
|
vector normal(const triSurface& s) const;
|
||||||
|
|
||||||
//- Return info proxy, to print information to a stream
|
//- Return info proxy,
|
||||||
InfoProxy<surfaceLocation> info() const
|
//- to print information to a stream
|
||||||
{
|
InfoProxy<surfaceLocation> info() const noexcept { return *this; }
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Write info about selected face index to a stream
|
//- Write info about selected face index to a stream
|
||||||
void write(Ostream& os, const triSurface& s) const;
|
void write(Ostream& os, const triSurface& s) const;
|
||||||
@ -154,12 +154,6 @@ public:
|
|||||||
friend Istream& operator>>(Istream& is, surfaceLocation& sl);
|
friend Istream& operator>>(Istream& is, surfaceLocation& sl);
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream& os, const surfaceLocation& sl);
|
friend Ostream& operator<<(Ostream& os, const surfaceLocation& sl);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const InfoProxy<surfaceLocation>& ip
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -741,16 +741,16 @@ void Foam::cellCellStencil::walkFront
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Ostream operator * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<cellCellStencil>& ic
|
const InfoProxy<cellCellStencil>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const cellCellStencil& e = ic.t_;
|
const auto& e = *iproxy;
|
||||||
|
|
||||||
const labelUList& cellTypes = e.cellTypes();
|
const labelUList& cellTypes = e.cellTypes();
|
||||||
const labelUList& interpolationCells = e.interpolationCells();
|
const labelUList& interpolationCells = e.interpolationCells();
|
||||||
@ -825,4 +825,5 @@ Foam::Ostream& Foam::operator<<
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -40,8 +40,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef cellCellStencil_H
|
#ifndef Foam_cellCellStencil_H
|
||||||
#define cellCellStencil_H
|
#define Foam_cellCellStencil_H
|
||||||
|
|
||||||
#include "scalarList.H"
|
#include "scalarList.H"
|
||||||
#include "mapDistribute.H"
|
#include "mapDistribute.H"
|
||||||
@ -53,8 +53,14 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
|
class cellCellStencil;
|
||||||
class mapDistribute;
|
class mapDistribute;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Ostream& operator<<(Ostream&, const InfoProxy<cellCellStencil>&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class cellCellStencil Declaration
|
Class cellCellStencil Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -265,13 +271,6 @@ public:
|
|||||||
template<class GeoField, class SuppressBC>
|
template<class GeoField, class SuppressBC>
|
||||||
static void correctBoundaryConditions(GeoField& psi);
|
static void correctBoundaryConditions(GeoField& psi);
|
||||||
|
|
||||||
//- Return info proxy.
|
|
||||||
//- Used to print stencil information to a stream
|
|
||||||
InfoProxy<cellCellStencil> info() const
|
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Surround holes with layer(s) of interpolated cells
|
//- Surround holes with layer(s) of interpolated cells
|
||||||
void walkFront
|
void walkFront
|
||||||
(
|
(
|
||||||
@ -310,10 +309,15 @@ public:
|
|||||||
bitSet& isFront,
|
bitSet& isFront,
|
||||||
scalarField& fraction
|
scalarField& fraction
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
// Write
|
||||||
|
|
||||||
|
//- Return info proxy,
|
||||||
|
//- used to print stencil information to a stream
|
||||||
|
InfoProxy<cellCellStencil> info() const noexcept { return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
|
||||||
Ostream& operator<<(Ostream& os, const InfoProxy<cellCellStencil>& ic);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -744,10 +744,10 @@ defineSurfaceFieldMethods(Foam::surfaceWriter, Foam::tensor)
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<surfaceWriter>& ip
|
const InfoProxy<surfaceWriter>& iproxy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const surfaceWriter& w = ip.t_;
|
const auto& w = *iproxy;
|
||||||
|
|
||||||
os << "surfaceWriter:"
|
os << "surfaceWriter:"
|
||||||
<< " upToDate: " << w.upToDate_
|
<< " upToDate: " << w.upToDate_
|
||||||
|
|||||||
@ -611,8 +611,9 @@ public:
|
|||||||
|
|
||||||
// Other IO
|
// Other IO
|
||||||
|
|
||||||
//- Return info proxy.
|
//- Return info proxy,
|
||||||
virtual InfoProxy<surfaceWriter> info() const
|
//- used to print information to a stream
|
||||||
|
virtual InfoProxy<surfaceWriter> info() const noexcept
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -621,7 +622,7 @@ public:
|
|||||||
friend Ostream& operator<<
|
friend Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const InfoProxy<surfaceWriter>& ip
|
const InfoProxy<surfaceWriter>& iproxy
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user