-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
MCAuto<DataArrayIdType> _cell_global;
MCAuto<DataArrayIdType> _node_global;
private:
+ MCAuto<DataArrayIdType> getCellIdsLyingOnNodesFalse(const DataArrayIdType *globalNodeIds) const;
+ MCAuto<DataArrayIdType> getCellIdsLyingOnNodesTrue(const DataArrayIdType *globalNodeIds) const;
template<class T>
typename Traits<T>::ArrayType *redistributeCellFieldT(const DataArrayIdType *globalCellIds, const typename Traits<T>::ArrayType *fieldValueToRed) const
{
using DataArrayT = typename Traits<T>::ArrayType;
MPI_Comm comm(MPI_COMM_WORLD);
CommInterface ci;
+ if( _cell_global->getNumberOfTuples() != fieldValueToRed->getNumberOfTuples() )
+ throw INTERP_KERNEL::Exception("PAraUMesh::redistributeCellFieldT : invalid input length of array !");
std::unique_ptr<mcIdType[]> allGlobalCellIds,allGlobalCellIdsIndex;
int size(ci.allGatherArrays(comm,globalCellIds,allGlobalCellIds,allGlobalCellIdsIndex));
// Prepare ParaUMesh parts to be sent : compute for each proc the contribution of current rank.
using DataArrayT = typename Traits<T>::ArrayType;
MPI_Comm comm(MPI_COMM_WORLD);
CommInterface ci;
+ if( _node_global->getNumberOfTuples() != fieldValueToRed->getNumberOfTuples() )
+ throw INTERP_KERNEL::Exception("PAraUMesh::redistributeNodeFieldT : invalid input length of array !");
std::unique_ptr<mcIdType[]> allGlobalCellIds,allGlobalCellIdsIndex;
int size(ci.allGatherArrays(comm,globalCellIds,allGlobalCellIds,allGlobalCellIdsIndex));
// Prepare ParaUMesh parts to be sent : compute for each proc the contribution of current rank.