mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: label64: fixes #1297.
This commit is contained in:
@ -173,7 +173,7 @@ int main(int argc, char *argv[])
|
|||||||
DynamicList<label> globalIDs;
|
DynamicList<label> globalIDs;
|
||||||
for (label i = 0; i < 100; i++)
|
for (label i = 0; i < 100; i++)
|
||||||
{
|
{
|
||||||
globalIDs.append(rndGen.position(0, nTotalCells-1));
|
globalIDs.append(rndGen.position(label(0), nTotalCells-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the cell centres at those cell indices
|
// Get the cell centres at those cell indices
|
||||||
|
|||||||
Submodule modules/avalanche updated: 3e147ba27a...fdf0f40d7a
Submodule modules/catalyst updated: de0f98f42f...566968cae3
@ -226,12 +226,12 @@ public:
|
|||||||
|
|
||||||
//- Collect data in processor order on master (== procIDs[0]).
|
//- Collect data in processor order on master (== procIDs[0]).
|
||||||
// Needs offsets only on master.
|
// Needs offsets only on master.
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
static void gather
|
static void gather
|
||||||
(
|
(
|
||||||
const labelUList& offsets,
|
const labelUList& offsets,
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
const UList<Type>& fld,
|
const UList<Type>& fld,
|
||||||
List<Type>& allFld,
|
List<Type>& allFld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
@ -241,11 +241,11 @@ public:
|
|||||||
|
|
||||||
//- Collect data in processor order on master (== procIDs[0]).
|
//- Collect data in processor order on master (== procIDs[0]).
|
||||||
// Needs offsets only on master.
|
// Needs offsets only on master.
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
void gather
|
void gather
|
||||||
(
|
(
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
const UList<Type>& fld,
|
const UList<Type>& fld,
|
||||||
List<Type>& allFld,
|
List<Type>& allFld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
@ -283,12 +283,12 @@ public:
|
|||||||
|
|
||||||
//- Inplace collect in processor order on master (== procIDs[0]).
|
//- Inplace collect in processor order on master (== procIDs[0]).
|
||||||
//- Needs offsets only on master.
|
//- Needs offsets only on master.
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
static void gather
|
static void gather
|
||||||
(
|
(
|
||||||
const labelUList& offsets,
|
const labelUList& offsets,
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
List<Type>& fld,
|
List<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
@ -297,11 +297,11 @@ public:
|
|||||||
|
|
||||||
//- Inplace collect in processor order on master (== procIDs[0]).
|
//- Inplace collect in processor order on master (== procIDs[0]).
|
||||||
//- Needs offsets only on master.
|
//- Needs offsets only on master.
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
void gather
|
void gather
|
||||||
(
|
(
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
List<Type>& fld,
|
List<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
const Pstream::commsTypes commsType =
|
const Pstream::commsTypes commsType =
|
||||||
@ -337,12 +337,12 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Distribute data in processor order. Requires fld to be sized!
|
//- Distribute data in processor order. Requires fld to be sized!
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
static void scatter
|
static void scatter
|
||||||
(
|
(
|
||||||
const labelUList& offsets,
|
const labelUList& offsets,
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
const UList<Type>& allFld,
|
const UList<Type>& allFld,
|
||||||
UList<Type>& fld,
|
UList<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
@ -351,11 +351,11 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Distribute data in processor order. Requires fld to be sized!
|
//- Distribute data in processor order. Requires fld to be sized!
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
void scatter
|
void scatter
|
||||||
(
|
(
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
const UList<Type>& allFld,
|
const UList<Type>& allFld,
|
||||||
UList<Type>& fld,
|
UList<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
|
|||||||
@ -29,12 +29,12 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
void Foam::globalIndex::gather
|
void Foam::globalIndex::gather
|
||||||
(
|
(
|
||||||
const labelUList& off,
|
const labelUList& off,
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
const UList<Type>& fld,
|
const UList<Type>& fld,
|
||||||
List<Type>& allFld,
|
List<Type>& allFld,
|
||||||
const int tag,
|
const int tag,
|
||||||
@ -193,7 +193,7 @@ void Foam::globalIndex::gather
|
|||||||
gather
|
gather
|
||||||
(
|
(
|
||||||
UPstream::worldComm,
|
UPstream::worldComm,
|
||||||
identity(Pstream::nProcs(UPstream::worldComm)),
|
UPstream::procID(UPstream::worldComm),
|
||||||
fld,
|
fld,
|
||||||
allFld,
|
allFld,
|
||||||
tag,
|
tag,
|
||||||
@ -215,12 +215,12 @@ void Foam::globalIndex::gatherOp
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
void Foam::globalIndex::gather
|
void Foam::globalIndex::gather
|
||||||
(
|
(
|
||||||
const labelUList& off,
|
const labelUList& off,
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
List<Type>& fld,
|
List<Type>& fld,
|
||||||
const int tag,
|
const int tag,
|
||||||
const Pstream::commsTypes commsType
|
const Pstream::commsTypes commsType
|
||||||
@ -250,7 +250,7 @@ void Foam::globalIndex::gather
|
|||||||
gather
|
gather
|
||||||
(
|
(
|
||||||
UPstream::worldComm,
|
UPstream::worldComm,
|
||||||
identity(Pstream::master(UPstream::worldComm)),
|
UPstream::procID(UPstream::worldComm),
|
||||||
fld,
|
fld,
|
||||||
allFld,
|
allFld,
|
||||||
tag,
|
tag,
|
||||||
@ -280,12 +280,12 @@ void Foam::globalIndex::gatherOp
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Container, class Type>
|
||||||
void Foam::globalIndex::scatter
|
void Foam::globalIndex::scatter
|
||||||
(
|
(
|
||||||
const labelUList& off,
|
const labelUList& off,
|
||||||
const label comm,
|
const label comm,
|
||||||
const labelList& procIDs,
|
const Container& procIDs,
|
||||||
const UList<Type>& allFld,
|
const UList<Type>& allFld,
|
||||||
UList<Type>& fld,
|
UList<Type>& fld,
|
||||||
const int tag,
|
const int tag,
|
||||||
@ -452,7 +452,7 @@ void Foam::globalIndex::scatter
|
|||||||
(
|
(
|
||||||
offsets_,
|
offsets_,
|
||||||
UPstream::worldComm,
|
UPstream::worldComm,
|
||||||
identity(Pstream::nProcs(UPstream::worldComm)),
|
UPstream::procID(UPstream::worldComm),
|
||||||
allFld,
|
allFld,
|
||||||
fld,
|
fld,
|
||||||
tag,
|
tag,
|
||||||
|
|||||||
@ -34,8 +34,8 @@ License
|
|||||||
Foam::sliceRange::sliceRange(const FixedList<label,3>& coeffs)
|
Foam::sliceRange::sliceRange(const FixedList<label,3>& coeffs)
|
||||||
:
|
:
|
||||||
start_(coeffs[0]),
|
start_(coeffs[0]),
|
||||||
size_(std::max(0,coeffs[1])), // No negative size
|
size_(std::max(label(0),coeffs[1])), // No negative size
|
||||||
stride_(std::max(0,coeffs[2])) // No negative stride
|
stride_(std::max(label(0),coeffs[2])) // No negative stride
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,8 +43,8 @@ inline Foam::sliceRange::sliceRange
|
|||||||
) noexcept
|
) noexcept
|
||||||
:
|
:
|
||||||
start_(start),
|
start_(start),
|
||||||
size_(std::max(0,size)), // No negative size
|
size_(std::max(label(0),size)), // No negative size
|
||||||
stride_(std::max(0,stride)) // No negative stride
|
stride_(std::max(label(0),stride)) // No negative stride
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user