diff --git a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H index 1b6f667e614ec58a3e4a3eefbc3ecf88c138c994..1b09aae337b6e708f8e579e43599e3df6288474f 100644 --- a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H +++ b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H @@ -67,7 +67,7 @@ public: ( const UList<T>& posList, const UList<T>& negList, - const List<label>& + const UList<label>& ); diff --git a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H index 91046dc2a1583533610281958f037658a89c0530..1b041331af80531aa8915db741692bed5c06a654 100644 --- a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H +++ b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H @@ -31,7 +31,7 @@ inline Foam::BiIndirectList<T>::BiIndirectList ( const UList<T>& posList, const UList<T>& negList, - const List<label>& addr + const UList<label>& addr ) : posList_(const_cast<UList<T>&>(posList)), diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H index 6e5df0a7676ffdd27f54a60f225940b62832bfae..513ebbe40d76018d9fa8a11bde59f5ccd747b447 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H @@ -88,11 +88,11 @@ public: inline Hash(); //- Rotating Hash. From http://burtleburtle.net/bob/hash/doobs.html. - label operator()(const FixedList<T, Size>& fl) const; + label operator()(const FixedList<T, Size>&) const; label operator() ( - const FixedList<T, Size>& fl, + const FixedList<T, Size>&, const label tableSize ) const; }; @@ -160,6 +160,9 @@ public: // needed to make FixedList consistent with List inline void setSize(const label); + //- Copy (not transfer) the argument contents + // needed to make FixedList consistent with List + void transfer(const FixedList<T, Size>&); //- Write the FixedList as a dictionary entry void writeEntry(Ostream& os) const; diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H index fff58d66ed2ac196ebfd53f12ea168eb2793dff5..55abe1c6a4b98f93b15c6e2acf1d3863c4a22080 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H @@ -33,6 +33,7 @@ template<class T, Foam::label Size> inline Foam::FixedList<T, Size>::FixedList() {} + template<class T, Foam::label Size> inline Foam::FixedList<T, Size>::FixedList(const T v[Size]) { @@ -42,6 +43,7 @@ inline Foam::FixedList<T, Size>::FixedList(const T v[Size]) } } + template<class T, Foam::label Size> inline Foam::FixedList<T, Size>::FixedList(const T& t) { @@ -51,27 +53,29 @@ inline Foam::FixedList<T, Size>::FixedList(const T& t) } } + template<class T, Foam::label Size> -inline Foam::FixedList<T, Size>::FixedList(const UList<T>& ul) +inline Foam::FixedList<T, Size>::FixedList(const UList<T>& lst) { - checkSize(ul.size()); + checkSize(lst.size()); for (register label i=0; i<Size; i++) { - v_[i] = ul[i]; + v_[i] = lst[i]; } } + template<class T, Foam::label Size> -inline Foam::FixedList<T, Size>::FixedList(const SLList<T>& sll) +inline Foam::FixedList<T, Size>::FixedList(const SLList<T>& lst) { - checkSize(sll.size()); + checkSize(lst.size()); register label i = 0; for ( - typename SLList<T>::const_iterator iter = sll.begin(); - iter != sll.end(); + typename SLList<T>::const_iterator iter = lst.begin(); + iter != lst.end(); ++iter ) { @@ -79,15 +83,17 @@ inline Foam::FixedList<T, Size>::FixedList(const SLList<T>& sll) } } + template<class T, Foam::label Size> -inline Foam::FixedList<T, Size>::FixedList(const FixedList<T, Size>& fl) +inline Foam::FixedList<T, Size>::FixedList(const FixedList<T, Size>& lst) { for (register label i=0; i<Size; i++) { - v_[i] = fl[i]; + v_[i] = lst[i]; } } + template<class T, Foam::label Size> inline Foam::autoPtr<Foam::FixedList<T, Size> > Foam::FixedList<T, Size>::clone() const @@ -101,14 +107,14 @@ Foam::FixedList<T, Size>::clone() const template<class T, Foam::label Size> inline Foam::label Foam::FixedList<T, Size>::fcIndex(const label i) const { - return (i == Size-1 ? 0 : i+1); + return (i == Size-1 ? 0 : i+1); } template<class T, Foam::label Size> inline Foam::label Foam::FixedList<T, Size>::rcIndex(const label i) const { - return (i == 0 ? Size-1 : i-1); + return (i == 0 ? Size-1 : i-1); } @@ -165,6 +171,14 @@ inline void Foam::FixedList<T, Size>::setSize(const label s) # endif } +template<class T, Foam::label Size> +inline void Foam::FixedList<T, Size>::transfer(const FixedList<T, Size>& lst) +{ + for (register label i=0; i<Size; i++) + { + v_[i] = lst[i]; + } +} // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // @@ -191,35 +205,35 @@ inline const T& Foam::FixedList<T, Size>::operator[](const label i) const template<class T, Foam::label Size> -inline void Foam::FixedList<T, Size>::operator=(const T v[Size]) +inline void Foam::FixedList<T, Size>::operator=(const T lst[Size]) { for (register label i=0; i<Size; i++) { - v_[i] = v[i]; + v_[i] = lst[i]; } } template<class T, Foam::label Size> -inline void Foam::FixedList<T, Size>::operator=(const UList<T>& ul) +inline void Foam::FixedList<T, Size>::operator=(const UList<T>& lst) { - checkSize(ul.size()); + checkSize(lst.size()); for (register label i=0; i<Size; i++) { - v_[i] = ul[i]; + v_[i] = lst[i]; } } template<class T, Foam::label Size> -inline void Foam::FixedList<T, Size>::operator=(const SLList<T>& sll) +inline void Foam::FixedList<T, Size>::operator=(const SLList<T>& lst) { - checkSize(sll.size()); + checkSize(lst.size()); register label i = 0; for ( - typename SLList<T>::const_iterator iter = sll.begin(); - iter != sll.end(); + typename SLList<T>::const_iterator iter = lst.begin(); + iter != lst.end(); ++iter ) { @@ -329,12 +343,12 @@ template<class HashT> inline Foam::FixedList<T, Size>::Hash<HashT>::Hash() {} -//- Rotating Hash. From http://burtleburtle.net/bob/hash/doobs.html. +//- Rotating Hash. From http://burtleburtle.net/bob/hash/doobs.html template<class T, Foam::label Size> template<class HashT> inline Foam::label Foam::FixedList<T, Size>::Hash<HashT>::operator() ( - const FixedList<T, Size>& fl + const FixedList<T, Size>& lst ) const { static const label farbit(8*sizeof(label)-4); @@ -343,7 +357,7 @@ inline Foam::label Foam::FixedList<T, Size>::Hash<HashT>::operator() for (register int i=0; i<Size; i++) { - val = (val<<4)^(val>>farbit)^HashT()(fl[i]); + val = (val<<4)^(val>>farbit)^HashT()(lst[i]); } return val; @@ -353,11 +367,11 @@ template<class T, Foam::label Size> template<class HashT> inline Foam::label Foam::FixedList<T, Size>::Hash<HashT>::operator() ( - const FixedList<T, Size>& fl, + const FixedList<T, Size>& lst, const label tableSize ) const { - return mag(operator()(fl)) % tableSize; + return mag(operator()(lst)) % tableSize; } #endif diff --git a/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H b/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H index a10b976e4ac1e21483a22f4d8ec34d3f283cae46..0598814e4b7416812d00e30bceec96a0b3346295 100644 --- a/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H +++ b/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H @@ -61,7 +61,7 @@ public: // Constructors //- Construct given the complete list and the addressing array - inline IndirectList(const UList<T>&, const List<label>&); + inline IndirectList(const UList<T>&, const UList<label>&); // Member Functions @@ -75,7 +75,7 @@ public: // Edit //- Reset addressing - void resetAddressing(const List<label>& addr); + void resetAddressing(const UList<label>&); // Member Operators diff --git a/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H b/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H index 385ef489fb073fcc32223cbbe2ab99538872a6d8..615ac184793e67d3a234fd4a072e32f4fa6dda98 100644 --- a/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H +++ b/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H @@ -30,7 +30,7 @@ template<class T> inline Foam::IndirectList<T>::IndirectList ( const UList<T>& completeList, - const List<label>& addr + const UList<label>& addr ) : completeList_(const_cast<UList<T>&>(completeList)), @@ -64,7 +64,7 @@ inline const Foam::List<Foam::label>& Foam::IndirectList<T>::addressing() const template<class T> inline void Foam::IndirectList<T>::resetAddressing ( - const List<label>& addr + const UList<label>& addr ) { addressing_ = addr; diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index d9a929f1a96dfec6cac518722fdf84e1bbbf9224..5d6c1608f726ea54a9c00c4998d8b612c3194d8b 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -206,7 +206,7 @@ Foam::List<T>::List(InputIterator first, InputIterator last) // Construct as copy of FixedList<T, Size> template<class T> template<Foam::label Size> -Foam::List<T>::List(const FixedList<T, Size>& fl) +Foam::List<T>::List(const FixedList<T, Size>& lst) : UList<T>(NULL, Size) { @@ -216,7 +216,7 @@ Foam::List<T>::List(const FixedList<T, Size>& fl) forAll(*this, i) { - this->operator[](i) = fl[i]; + this->operator[](i) = lst[i]; } } else @@ -228,9 +228,9 @@ Foam::List<T>::List(const FixedList<T, Size>& fl) // Construct as copy of PtrList<T> template<class T> -Foam::List<T>::List(const PtrList<T>& sptrl) +Foam::List<T>::List(const PtrList<T>& lst) : - UList<T>(NULL, sptrl.size()) + UList<T>(NULL, lst.size()) { if (this->size_) { @@ -238,7 +238,7 @@ Foam::List<T>::List(const PtrList<T>& sptrl) forAll(*this, i) { - this->operator[](i) = sptrl[i]; + this->operator[](i) = lst[i]; } } else @@ -250,9 +250,9 @@ Foam::List<T>::List(const PtrList<T>& sptrl) // Construct as copy of SLList<T> template<class T> -Foam::List<T>::List(const SLList<T>& sll) +Foam::List<T>::List(const SLList<T>& lst) : - UList<T>(NULL, sll.size()) + UList<T>(NULL, lst.size()) { if (this->size_) { @@ -261,8 +261,8 @@ Foam::List<T>::List(const SLList<T>& sll) label i = 0; for ( - typename SLList<T>::const_iterator iter = sll.begin(); - iter != sll.end(); + typename SLList<T>::const_iterator iter = lst.begin(); + iter != lst.end(); ++iter ) { @@ -278,9 +278,9 @@ Foam::List<T>::List(const SLList<T>& sll) // Construct as copy of IndirectList<T> template<class T> -Foam::List<T>::List(const IndirectList<T>& idl) +Foam::List<T>::List(const IndirectList<T>& lst) : - UList<T>(NULL, idl.size()) + UList<T>(NULL, lst.size()) { if (this->size_) { @@ -288,7 +288,7 @@ Foam::List<T>::List(const IndirectList<T>& idl) forAll(*this, i) { - this->operator[](i) = idl[i]; + this->operator[](i) = lst[i]; } } else @@ -300,9 +300,9 @@ Foam::List<T>::List(const IndirectList<T>& idl) // Construct as copy of BiIndirectList<T> template<class T> -Foam::List<T>::List(const BiIndirectList<T>& idl) +Foam::List<T>::List(const BiIndirectList<T>& lst) : - UList<T>(NULL, idl.size()) + UList<T>(NULL, lst.size()) { if (this->size_) { @@ -310,7 +310,7 @@ Foam::List<T>::List(const BiIndirectList<T>& idl) forAll(*this, i) { - this->operator[](i) = idl[i]; + this->operator[](i) = lst[i]; } } else @@ -522,13 +522,13 @@ void Foam::List<T>::operator=(const List<T>& a) // Assignment operator. Takes linear time. template<class T> -void Foam::List<T>::operator=(const SLList<T>& sll) +void Foam::List<T>::operator=(const SLList<T>& lst) { - if (sll.size() != this->size_) + if (lst.size() != this->size_) { if (this->v_) delete[] this->v_; this->v_ = 0; - this->size_ = sll.size(); + this->size_ = lst.size(); if (this->size_) this->v_ = new T[this->size_]; } @@ -537,8 +537,8 @@ void Foam::List<T>::operator=(const SLList<T>& sll) label i = 0; for ( - typename SLList<T>::const_iterator iter = sll.begin(); - iter != sll.end(); + typename SLList<T>::const_iterator iter = lst.begin(); + iter != lst.end(); ++iter ) { @@ -550,13 +550,13 @@ void Foam::List<T>::operator=(const SLList<T>& sll) // Assignment operator. Takes linear time. template<class T> -void Foam::List<T>::operator=(const IndirectList<T>& idl) +void Foam::List<T>::operator=(const IndirectList<T>& lst) { - if (idl.size() != this->size_) + if (lst.size() != this->size_) { if (this->v_) delete[] this->v_; this->v_ = 0; - this->size_ = idl.size(); + this->size_ = lst.size(); if (this->size_) this->v_ = new T[this->size_]; } @@ -564,7 +564,7 @@ void Foam::List<T>::operator=(const IndirectList<T>& idl) { forAll(*this, i) { - this->operator[](i) = idl[i]; + this->operator[](i) = lst[i]; } } } @@ -572,13 +572,13 @@ void Foam::List<T>::operator=(const IndirectList<T>& idl) // Assignment operator. Takes linear time. template<class T> -void Foam::List<T>::operator=(const BiIndirectList<T>& idl) +void Foam::List<T>::operator=(const BiIndirectList<T>& lst) { - if (idl.size() != this->size_) + if (lst.size() != this->size_) { if (this->v_) delete[] this->v_; this->v_ = 0; - this->size_ = idl.size(); + this->size_ = lst.size(); if (this->size_) this->v_ = new T[this->size_]; } @@ -586,7 +586,7 @@ void Foam::List<T>::operator=(const BiIndirectList<T>& idl) { forAll(*this, i) { - this->operator[](i) = idl[i]; + this->operator[](i) = lst[i]; } } } diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C index 08001fbfecdb7505c169ef260bde35c386fad58e..082958b3f5cf8a403e729ccdb340808068641b31 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C @@ -125,7 +125,7 @@ void Foam::ParSortableList<Type>::checkAndSend // Construct from List, sorting the elements template <class Type> -Foam::ParSortableList<Type>::ParSortableList(const List<Type>& values) +Foam::ParSortableList<Type>::ParSortableList(const UList<Type>& values) : List<Type>(values), indices_(0), diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H index e783e094df819ad45e17ebc98d7c0f699259437e..5ef63764199428b9c4e10cac1f15642566f18e13 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H @@ -173,7 +173,7 @@ public: // Constructors //- Construct from List, sorting the elements. - ParSortableList(const List<Type>&); + ParSortableList(const UList<Type>&); //- Construct given size. Sort later on. ParSortableList(const label size); @@ -181,10 +181,9 @@ public: // Member Functions - //- Sort the list (if changed after construction time) + //- (stable) sort the list (if changed after construction time) void sort(); - //- Return the list of sorted point indices const labelList& indices() const { diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H index 305da6e32eed03ef9194d42a1247925e992b203f..b2ac5eefcbff0407929b1a2978617d9100d68ac8 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H @@ -118,7 +118,6 @@ public: //- (stable) sort the list (if changed after construction time) void sort(); - // Member Operators void operator=(const SortableList<Type>&); diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.C b/src/OpenFOAM/meshes/boundBox/boundBox.C index a4b82f9dc46ddcb06c156b1d7e29598e0e5ea7cc..ef85d72f629a1487b910d946da7e9df2bd444841 100644 --- a/src/OpenFOAM/meshes/boundBox/boundBox.C +++ b/src/OpenFOAM/meshes/boundBox/boundBox.C @@ -27,14 +27,9 @@ License #include "boundBox.H" #include "PstreamReduceOps.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -boundBox::boundBox(const pointField& points, const bool doReduce) +Foam::boundBox::boundBox(const pointField& points, const bool doReduce) : min_(vector::zero), max_(vector::zero) @@ -78,7 +73,7 @@ boundBox::boundBox(const pointField& points, const bool doReduce) } -boundBox::boundBox(Istream& is) +Foam::boundBox::boundBox(Istream& is) { operator>>(is, *this); } @@ -86,7 +81,7 @@ boundBox::boundBox(Istream& is) // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // -Ostream& operator<<(Ostream& os, const boundBox& bb) +Foam::Ostream& Foam::operator<<(Ostream& os, const boundBox& bb) { if (os.format() == IOstream::ASCII) { @@ -108,7 +103,7 @@ Ostream& operator<<(Ostream& os, const boundBox& bb) } -Istream& operator>>(Istream& is, boundBox& bb) +Foam::Istream& Foam::operator>>(Istream& is, boundBox& bb) { if (is.format() == IOstream::ASCII) { @@ -129,9 +124,4 @@ Istream& operator>>(Istream& is, boundBox& bb) return is; } - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.H b/src/OpenFOAM/meshes/meshShapes/cell/cell.H index a7f42b8cf1eab4feed389f04a859618581438211..9eb4b5b391c443b6648000d5845d453456fe8418 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.H @@ -75,8 +75,8 @@ public: //- Construct given size explicit inline cell(label); - //- Construct from components - explicit inline cell(const labelList&); + //- Construct from list of labels + explicit inline cell(const UList<label>&); //- Construct by transferring the parameter contents explicit inline cell(const xfer<labelList>&); diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cellI.H b/src/OpenFOAM/meshes/meshShapes/cell/cellI.H index 5dc2832f48d3428d2b357eec4d472d0f26a9de79..191aea8d2e0d5c94a6cc8591172e9f25b8bde778 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cellI.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cellI.H @@ -41,7 +41,7 @@ inline Foam::cell::cell(label s) // Construct from components -inline Foam::cell::cell(const labelList& lst) +inline Foam::cell::cell(const UList<label>& lst) : labelList(lst) {} diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H index 5088ece8b59066a180a414e858465b3e7a9a993d..6925d175096600548d89028356288f0cc27799e5 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H @@ -89,21 +89,21 @@ public: // Access - //- Return ith face - inline triFace face(const label facei) const; + //- Return i-th face + inline triFace face(const label faceI) const; - //- Return fisrt face adjacent to the given edge - inline label edgeFace(const label edgei) const; + //- Return first face adjacent to the given edge + inline label edgeFace(const label edgeI) const; //- Return face adjacent to the given face sharing the same edge inline label edgeAdjacentFace ( - const label edgei, - const label facei + const label edgeI, + const label faceI ) const; - //- Return ith edge - inline edge tetEdge(const label edgei) const; + //- Return i-th edge + inline edge tetEdge(const label edgeI) const; // Operations diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H index d935bd7402b08f2a024cf0c76a3ada21505bbcea..e7b6cb6f00d587afa2e3383e8a44a84254f9b7da 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H @@ -28,20 +28,13 @@ Description #include "IOstreams.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -//- Construct null -inline tetCell::tetCell() +inline Foam::tetCell::tetCell() {} -//- Construct from components -inline tetCell::tetCell +inline Foam::tetCell::tetCell ( const label a, const label b, @@ -56,13 +49,13 @@ inline tetCell::tetCell } -inline tetCell::tetCell(const FixedList<label, 4>& lst) +inline Foam::tetCell::tetCell(const FixedList<label, 4>& lst) : FixedList<label, 4>(lst) {} -inline tetCell::tetCell(Istream& is) +inline Foam::tetCell::tetCell(Istream& is) : FixedList<label, 4>(is) {} @@ -70,7 +63,7 @@ inline tetCell::tetCell(Istream& is) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline triFace tetCell::face(const label facei) const +inline Foam::triFace Foam::tetCell::face(const label faceI) const { // Warning. Ordering of faces needs to be the same for a tetrahedron // class, a tetrahedron cell shape model and a tetCell @@ -79,24 +72,24 @@ inline triFace tetCell::face(const label facei) const static const label c[] = {3, 2, 3, 1}; # ifdef FULLDEBUG - if (facei >= 4) + if (faceI >= 4) { - FatalErrorIn("tetCell::tetEdge(const label facei) const") - << "index out of range 0 -> 3. facei = " << facei + FatalErrorIn("tetCell::tetEdge(const label faceI) const") + << "index out of range 0 -> 3. faceI = " << faceI << abort(FatalError); } # endif return triFace ( - operator[](a[facei]), - operator[](b[facei]), - operator[](c[facei]) + operator[](a[faceI]), + operator[](b[faceI]), + operator[](c[faceI]) ); } -inline label tetCell::edgeFace(const label edgei) const +inline Foam::label Foam::tetCell::edgeFace(const label edgeI) const { // Warning. Ordering of faces needs to be the same for a tetrahedron // class, a tetrahedron cell shape model and a tetCell @@ -104,25 +97,25 @@ inline label tetCell::edgeFace(const label edgei) const static const label edgeFaces[6] = {2, 3, 1, 0, 0, 1}; # ifdef FULLDEBUG - if (edgei >= 6) + if (edgeI >= 6) { FatalErrorIn ( - "tetCell::edgeFace(const label edgei, const label facei)" + "tetCell::edgeFace(const label edgeI)" "const" - ) << "edge index out of range 0 -> 5. edgei = " << edgei + ) << "edge index out of range 0 -> 5. edgeI = " << edgeI << abort(FatalError); } # endif - return edgeFaces[edgei]; + return edgeFaces[edgeI]; } -inline label tetCell::edgeAdjacentFace +inline Foam::label Foam::tetCell::edgeAdjacentFace ( - const label edgei, - const label facei + const label edgeI, + const label faceI ) const { // Warning. Ordering of faces needs to be the same for a tetrahedron @@ -138,32 +131,32 @@ inline label tetCell::edgeAdjacentFace }; # ifdef FULLDEBUG - if (facei >= 4) + if (faceI >= 4) { FatalErrorIn ( - "tetCell::edgeAdjacentFace(const label edgei, const label facei)" + "tetCell::edgeAdjacentFace(const label edgeI, const label faceI)" "const" - ) << "face index out of range 0 -> 3. facei = " << facei + ) << "face index out of range 0 -> 3. faceI = " << faceI << abort(FatalError); } - if (edgei >= 6) + if (edgeI >= 6) { FatalErrorIn ( - "tetCell::edgeAdjacentFace(const label edgei, const label facei)" + "tetCell::edgeAdjacentFace(const label edgeI, const label faceI)" "const" - ) << "edge index out of range 0 -> 5. edgei = " << edgei + ) << "edge index out of range 0 -> 5. edgeI = " << edgeI << abort(FatalError); } # endif - return adjacentFace[edgei][facei]; + return adjacentFace[edgeI][faceI]; } -inline edge tetCell::tetEdge(const label edgei) const +inline Foam::edge Foam::tetCell::tetEdge(const label edgeI) const { // Warning. Ordering of edges needs to be the same for a tetrahedron // class, a tetrahedron cell shape model and a tetCell @@ -172,19 +165,19 @@ inline edge tetCell::tetEdge(const label edgei) const static const label end[] = {1, 2, 3, 1, 2, 2}; # ifdef FULLDEBUG - if (edgei >= 6) + if (edgeI >= 6) { - FatalErrorIn("tetCell::tetEdge(const label edgei) const") - << "index out of range 0 -> 5. edgei = " << edgei + FatalErrorIn("tetCell::tetEdge(const label edgeI) const") + << "index out of range 0 -> 5. edgeI = " << edgeI << abort(FatalError); } # endif - return edge(operator[](start[edgei]), operator[](end[edgei])); + return edge(operator[](start[edgeI]), operator[](end[edgeI])); } -inline tetPointRef tetCell::tet(const pointField& points) const +inline Foam::tetPointRef Foam::tetCell::tet(const pointField& points) const { return tetPointRef ( @@ -196,8 +189,4 @@ inline tetPointRef tetCell::tet(const pointField& points) const } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index 48b79eebe462b3d20d7e9e96e87448b1011ffc96..0ce572361677b37589c0cba69f06cbb1ead10bd5 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -58,7 +58,7 @@ inline bool operator!=(const triFace&, const triFace&); /*---------------------------------------------------------------------------*\ - class triFace Declaration + class triFace Declaration \*---------------------------------------------------------------------------*/ class triFace