Commit cd58a79a authored by Henry Weller's avatar Henry Weller
Browse files

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

Resolves bug-report http://bugs.openfoam.org/view.php?id=2140
parent 4d5d61bb
......@@ -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
);
......
......@@ -81,7 +81,7 @@ void writeWeights
globalFaces().gather
(
UPstream::worldComm,
UPstream::procID(UPstream::worldComm),
labelList(UPstream::procID(UPstream::worldComm)),
wghtSum,
mergedWeights
);
......
......@@ -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)
{
......
......@@ -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>>&);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment