reactingEulerFoam/phaseSystem: Create an ordered container for phaseModels

The previous method using a HashTable required a separate ordered list
of names which is hard to work with and maintain.
This commit is contained in:
Henry Weller
2015-08-28 18:40:22 +01:00
parent 0f3186fd21
commit 2d35c2638a
16 changed files with 214 additions and 84 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -146,6 +146,7 @@ public:
// and annul the argument.
void transfer(DictionaryBase<IDLListType, T>&);
// Member operators
void operator=(const DictionaryBase&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -73,6 +73,21 @@ public:
//- Construct from Istream
PtrDictionary(Istream&);
// Member operators
//- Find and return entry
const T& operator[](const word& key) const
{
return *DictionaryBase<DLPtrList<T>, T>::operator[](key);
}
//- Find and return entry
T& operator[](const word& key)
{
return *DictionaryBase<DLPtrList<T>, T>::operator[](key);
}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -203,6 +203,7 @@ public:
// and annul the argument list.
void transfer(LList<LListBase, T>&);
// Member operators
void operator=(const LList<LListBase, T>&);
@ -265,6 +266,16 @@ public:
}
};
inline iterator begin()
{
return LListBase::begin();
}
inline const iterator& end()
{
return static_cast<const iterator&>(LListBase::end());
}
// STL const_iterator
@ -313,6 +324,26 @@ public:
}
};
inline const_iterator cbegin() const
{
return LListBase::cbegin();
}
inline const const_iterator& cend() const
{
return static_cast<const const_iterator&>(LListBase::cend());
}
inline const_iterator begin() const
{
return LListBase::begin();
}
inline const const_iterator& end() const
{
return static_cast<const const_iterator&>(LListBase::end());
}
// IOstream operators

View File

@ -209,6 +209,16 @@ public:
}
};
inline iterator begin()
{
return LListBase::begin();
}
inline const iterator& end()
{
return static_cast<const iterator&>(LListBase::end());
}
// STL const_iterator
@ -256,6 +266,26 @@ public:
}
};
inline const_iterator cbegin() const
{
return LListBase::cbegin();
}
inline const const_iterator& cend() const
{
return static_cast<const const_iterator&>(LListBase::cend());
}
inline const_iterator begin() const
{
return LListBase::begin();
}
inline const const_iterator& end() const
{
return static_cast<const const_iterator&>(LListBase::end());
}
// STL const_reverse_iterator
@ -298,6 +328,29 @@ public:
}
};
inline const_reverse_iterator crbegin() const
{
return LListBase::crbegin();
}
inline const const_reverse_iterator& crend() const
{
return
static_cast<const const_reverse_iterator&>(LListBase::crend());
}
inline const_reverse_iterator rbegin() const
{
return LListBase::rbegin();
}
inline const const_reverse_iterator& rend() const
{
return
static_cast<const const_reverse_iterator&>(LListBase::rend());
}
// STL member operators

View File

@ -263,6 +263,7 @@ public:
inline const_iterator begin() const;
inline const const_iterator& end() const;
// STL const_reverse_iterator
//- An STL-conforming const_reverse_iterator
@ -300,6 +301,7 @@ public:
inline const_reverse_iterator rbegin() const;
inline const const_reverse_iterator& rend() const;
private:
//- Iterator returned by end()
@ -310,7 +312,6 @@ private:
//- const_reverse_iterator returned by end()
static const_reverse_iterator endConstRevIter_;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,12 +58,6 @@ public:
DLPtrList()
{}
//- Construct given initial T
DLPtrList(T a)
:
LPtrList<DLListBase, T>(a)
{}
//- Construct from Istream using given Istream constructor class
template<class INew>
DLPtrList(Istream& is, const INew& inewt)