checkGeometry, moveDynamicMesh: Convert processor IDs to 'List<label>'

Resolves bug-report http://bugs.openfoam.org/view.php?id=2140
This commit is contained in:
Henry Weller
2016-07-09 20:47:06 +01:00
parent 4d5d61bbeb
commit cd58a79a44
4 changed files with 26 additions and 3 deletions

View File

@ -986,7 +986,7 @@ Foam::label Foam::checkGeometry
globalFaces().gather
(
UPstream::worldComm,
UPstream::procID(UPstream::worldComm),
labelList(UPstream::procID(UPstream::worldComm)),
ami.srcWeightsSum(),
mergedWeights
);
@ -1033,7 +1033,7 @@ Foam::label Foam::checkGeometry
globalFaces().gather
(
UPstream::worldComm,
UPstream::procID(UPstream::worldComm),
labelList(UPstream::procID(UPstream::worldComm)),
ami.tgtWeightsSum(),
mergedWeights
);

View File

@ -81,7 +81,7 @@ void writeWeights
globalFaces().gather
(
UPstream::worldComm,
UPstream::procID(UPstream::worldComm),
labelList(UPstream::procID(UPstream::worldComm)),
wghtSum,
mergedWeights
);

View File

@ -129,6 +129,25 @@ Foam::List<T>::List(const List<T>& a)
}
template<class T>
template<class T2>
Foam::List<T>::List(const List<T2>& a)
:
UList<T>(NULL, a.size())
{
if (this->size_)
{
this->v_ = new T[this->size_];
List_ACCESS(T, (*this), vp);
List_CONST_ACCESS(T2, a, ap);
List_FOR_ALL((*this), i)
List_ELEM((*this), vp, i) = T(List_ELEM(a, ap, i));
List_END_FOR_ALL
}
}
template<class T>
Foam::List<T>::List(const Xfer<List<T>>& lst)
{

View File

@ -114,6 +114,10 @@ public:
//- Copy constructor
List(const List<T>&);
//- Copy constructor from list of another type
template<class T2>
explicit List(const List<T2>&);
//- Construct by transferring the parameter contents
List(const Xfer<List<T>>&);