mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-07-08 03:07:03 +00:00
develop branch update for changes in MPI branch for data transfer stage
mortong indexing is added (messaging is not complete)
This commit is contained in:
@ -52,9 +52,29 @@ bool pFlow::internalField<T, MemorySpace>::insert(const anyList& varList)
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
template<class T, class MemorySpace>
|
||||
bool pFlow::internalField<T, MemorySpace>::rearrange(const anyList& varList)
|
||||
{
|
||||
const word eventName = message::eventName(message::ITEM_REARRANGE);
|
||||
|
||||
const auto& indices = varList.getObject<uint32IndexContainer>(
|
||||
eventName);
|
||||
|
||||
field_.reserve( internalPoints_.capacity());
|
||||
field_.resize(internalPoints_.size());
|
||||
if(!field_.reorderItems(indices))
|
||||
{
|
||||
fatalErrorInFunction<<
|
||||
"cannot reorder items in field "<< name()<<endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class T, class MemorySpace>
|
||||
pFlow::internalField<T, MemorySpace>::internalField
|
||||
(
|
||||
@ -166,15 +186,15 @@ bool pFlow::internalField<T, MemorySpace>:: hearChanges
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
if(msg.equivalentTo(message::ITEM_REARRANGE))
|
||||
{
|
||||
notImplementedFunction;
|
||||
return false;
|
||||
}
|
||||
if(msg.equivalentTo(message::ITEM_INSERT))
|
||||
{
|
||||
return insert(varList);
|
||||
}
|
||||
if(msg.equivalentTo(message::ITEM_REARRANGE))
|
||||
{
|
||||
return rearrange(varList);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,8 @@ protected:
|
||||
|
||||
bool insert(const anyList& varList);
|
||||
|
||||
bool rearrange(const anyList& varList);
|
||||
|
||||
public:
|
||||
|
||||
internalField(
|
||||
|
Reference in New Issue
Block a user