diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index f11686be5..1d8dd74e7 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -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 ); diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C index 1e6a7e72c..413524933 100644 --- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C +++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C @@ -81,7 +81,7 @@ void writeWeights globalFaces().gather ( UPstream::worldComm, - UPstream::procID(UPstream::worldComm), + labelList(UPstream::procID(UPstream::worldComm)), wghtSum, mergedWeights ); diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index 62f988b9d..2f3b07667 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -129,6 +129,25 @@ Foam::List::List(const List& a) } +template +template +Foam::List::List(const List& a) +: + UList(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 Foam::List::List(const Xfer>& lst) { diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index 61f5074fe..be09d5c81 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -114,6 +114,10 @@ public: //- Copy constructor List(const List&); + //- Copy constructor from list of another type + template + explicit List(const List&); + //- Construct by transferring the parameter contents List(const Xfer>&);