mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Revert "Add fields to particles."
This reverts commit d6aff6bdb92a60a8406b590ff7237775911818d2.
This commit is contained in:
parent
f53d90d6b6
commit
f9e9ea9c73
@ -114,10 +114,6 @@ public:
|
||||
, NumSteps(p.NumSteps)
|
||||
, Status(p.Status)
|
||||
, Time(p.Time)
|
||||
, NumIntegrations(p.NumIntegrations)
|
||||
, NumRounds(p.NumRounds)
|
||||
, NumCommunications(p.NumCommunications)
|
||||
, LifeTime(p.LifeTime)
|
||||
{
|
||||
}
|
||||
|
||||
@ -165,25 +161,17 @@ public:
|
||||
inline VTKM_CONT friend std::ostream& operator<<(std::ostream& out, const vtkm::Particle& p)
|
||||
{
|
||||
out << "v(" << p.Time << ") = " << p.Position << ", ID: " << p.ID
|
||||
<< ", NumSteps: " << p.NumSteps << ", Status: " << p.Status
|
||||
<< ", NumInt: " << p.NumIntegrations << ", NumRounds: " << p.NumRounds
|
||||
<< ", NumComm: " << p.NumCommunications << " LifeTime: " << p.LifeTime;
|
||||
<< ", NumSteps: " << p.NumSteps << ", Status: " << p.Status;
|
||||
return out;
|
||||
}
|
||||
|
||||
//private:
|
||||
public:
|
||||
private:
|
||||
vtkm::Vec3f Position;
|
||||
vtkm::Id ID = -1;
|
||||
vtkm::Id NumSteps = 0;
|
||||
vtkm::ParticleStatus Status;
|
||||
vtkm::FloatDefault Time = 0;
|
||||
|
||||
vtkm::Id NumIntegrations = 0;
|
||||
vtkm::Id NumRounds = 0;
|
||||
vtkm::Id NumCommunications = 0;
|
||||
vtkm::FloatDefault LifeTime = 0;
|
||||
|
||||
public:
|
||||
static size_t Sizeof()
|
||||
{
|
||||
@ -191,9 +179,8 @@ public:
|
||||
+ sizeof(vtkm::Id) // ID
|
||||
+ sizeof(vtkm::Id) // NumSteps
|
||||
+ sizeof(vtkm::UInt8) // Status
|
||||
+ sizeof(vtkm::FloatDefault) // Time
|
||||
+ sizeof(vtkm::Id) * 3 //NumIntegrations, NumRounds, NumCommunications.
|
||||
+ sizeof(vtkm::FloatDefault); //LifeTime
|
||||
+ sizeof(vtkm::FloatDefault); // Time
|
||||
|
||||
return sz;
|
||||
}
|
||||
};
|
||||
@ -306,8 +293,7 @@ public:
|
||||
return out;
|
||||
}
|
||||
|
||||
//private:
|
||||
public:
|
||||
private:
|
||||
vtkm::Vec3f Position;
|
||||
vtkm::Id ID = -1;
|
||||
vtkm::Id NumSteps = 0;
|
||||
@ -320,11 +306,6 @@ public:
|
||||
constexpr static vtkm::FloatDefault SPEED_OF_LIGHT =
|
||||
static_cast<vtkm::FloatDefault>(2.99792458e8);
|
||||
|
||||
vtkm::Id NumIntegrations = 0;
|
||||
vtkm::Id NumRounds = 0;
|
||||
vtkm::Id NumCommunications = 0;
|
||||
vtkm::FloatDefault LifeTime = 0;
|
||||
|
||||
friend struct mangled_diy_namespace::Serialization<vtkm::ChargedParticle>;
|
||||
|
||||
public:
|
||||
@ -360,11 +341,6 @@ public:
|
||||
vtkmdiy::save(bb, p.GetNumberOfSteps());
|
||||
vtkmdiy::save(bb, p.GetStatus());
|
||||
vtkmdiy::save(bb, p.GetTime());
|
||||
|
||||
vtkmdiy::save(bb, p.NumIntegrations);
|
||||
vtkmdiy::save(bb, p.NumRounds);
|
||||
vtkmdiy::save(bb, p.NumCommunications);
|
||||
vtkmdiy::save(bb, p.LifeTime);
|
||||
}
|
||||
|
||||
static VTKM_CONT void load(BinaryBuffer& bb, vtkm::Particle& p)
|
||||
@ -388,11 +364,6 @@ public:
|
||||
vtkm::FloatDefault time;
|
||||
vtkmdiy::load(bb, time);
|
||||
p.SetTime(time);
|
||||
|
||||
vtkmdiy::load(bb, p.NumIntegrations);
|
||||
vtkmdiy::load(bb, p.NumRounds);
|
||||
vtkmdiy::load(bb, p.NumCommunications);
|
||||
vtkmdiy::load(bb, p.LifeTime);
|
||||
}
|
||||
};
|
||||
|
||||
@ -411,11 +382,6 @@ public:
|
||||
vtkmdiy::save(bb, e.Charge);
|
||||
vtkmdiy::save(bb, e.Weighting);
|
||||
vtkmdiy::save(bb, e.Momentum);
|
||||
|
||||
vtkmdiy::save(bb, e.NumIntegrations);
|
||||
vtkmdiy::save(bb, e.NumRounds);
|
||||
vtkmdiy::save(bb, e.NumCommunications);
|
||||
vtkmdiy::save(bb, e.LifeTime);
|
||||
}
|
||||
|
||||
static VTKM_CONT void load(BinaryBuffer& bb, vtkm::ChargedParticle& e)
|
||||
@ -429,11 +395,6 @@ public:
|
||||
vtkmdiy::load(bb, e.Charge);
|
||||
vtkmdiy::load(bb, e.Weighting);
|
||||
vtkmdiy::load(bb, e.Momentum);
|
||||
|
||||
vtkmdiy::load(bb, e.NumIntegrations);
|
||||
vtkmdiy::load(bb, e.NumRounds);
|
||||
vtkmdiy::load(bb, e.NumCommunications);
|
||||
vtkmdiy::load(bb, e.LifeTime);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -57,18 +57,6 @@ VTKM_ALWAYS_EXPORT inline void ParticleArrayCopy(
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outSteps,
|
||||
vtkm::cont::ArrayHandle<vtkm::ParticleStatus, vtkm::cont::StorageTagBasic>& outStatus,
|
||||
vtkm::cont::ArrayHandle<vtkm::FloatDefault, vtkm::cont::StorageTagBasic>& outTime);
|
||||
|
||||
template <typename ParticleType>
|
||||
VTKM_ALWAYS_EXPORT inline void ParticleArrayCopy(
|
||||
const std::vector<vtkm::cont::ArrayHandle<ParticleType, vtkm::cont::StorageTagBasic>>& inputs,
|
||||
vtkm::cont::ArrayHandle<vtkm::Vec3f, vtkm::cont::StorageTagBasic>& outPos,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outIDs,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outSteps,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outNumInt,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outNumRounds,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outNumComm,
|
||||
vtkm::cont::ArrayHandle<vtkm::FloatDefault, vtkm::cont::StorageTagBasic>& outLifeTime);
|
||||
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
|
@ -39,48 +39,6 @@ struct ExtractTerminatedFunctor
|
||||
bool operator()(const ParticleType& p) const { return p.GetStatus().CheckTerminate(); }
|
||||
};
|
||||
|
||||
template <typename ParticleType>
|
||||
struct ExtractIDFunctor
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id operator()(const ParticleType& p) const { return p.GetID(); }
|
||||
};
|
||||
|
||||
template <typename ParticleType>
|
||||
struct ExtractStepsFunctor
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id operator()(const ParticleType& p) const { return p.GetNumberOfSteps(); }
|
||||
};
|
||||
|
||||
template <typename ParticleType>
|
||||
struct ExtractNumIntFunctor
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id operator()(const ParticleType& p) const { return p.NumIntegrations; }
|
||||
};
|
||||
|
||||
template <typename ParticleType>
|
||||
struct ExtractNumRoundsFunctor
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id operator()(const ParticleType& p) const { return p.NumRounds; }
|
||||
};
|
||||
|
||||
template <typename ParticleType>
|
||||
struct ExtractNumCommFunctor
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id operator()(const ParticleType& p) const { return p.NumCommunications; }
|
||||
};
|
||||
|
||||
template <typename ParticleType>
|
||||
struct ExtractLifeTimeFunctor
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::FloatDefault operator()(const ParticleType& p) const { return p.LifeTime; }
|
||||
};
|
||||
|
||||
template <typename ParticleType>
|
||||
struct CopyParticleAllWorklet : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
@ -172,61 +130,6 @@ VTKM_ALWAYS_EXPORT inline void ParticleArrayCopy(
|
||||
|
||||
invoke(worklet, inP, outPos, outID, outSteps, outStatus, outTime);
|
||||
}
|
||||
|
||||
template <typename ParticleType>
|
||||
VTKM_ALWAYS_EXPORT inline void ParticleArrayCopy(
|
||||
const std::vector<vtkm::cont::ArrayHandle<ParticleType, vtkm::cont::StorageTagBasic>>& inputs,
|
||||
vtkm::cont::ArrayHandle<vtkm::Vec3f, vtkm::cont::StorageTagBasic>& outPos,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outIDs,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outSteps,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outNumInt,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outNumRounds,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outNumComm,
|
||||
vtkm::cont::ArrayHandle<vtkm::FloatDefault, vtkm::cont::StorageTagBasic>& outLifeTime)
|
||||
{
|
||||
vtkm::Id numParticles = 0;
|
||||
for (const auto& v : inputs)
|
||||
numParticles += v.GetNumberOfValues();
|
||||
|
||||
outPos.Allocate(numParticles);
|
||||
outIDs.Allocate(numParticles);
|
||||
outSteps.Allocate(numParticles);
|
||||
outNumInt.Allocate(numParticles);
|
||||
outNumRounds.Allocate(numParticles);
|
||||
outNumComm.Allocate(numParticles);
|
||||
outLifeTime.Allocate(numParticles);
|
||||
|
||||
vtkm::Id idx = 0;
|
||||
for (const auto& v : inputs)
|
||||
{
|
||||
auto posTrn =
|
||||
vtkm::cont::make_ArrayHandleTransform(v, detail::ExtractPositionFunctor<ParticleType>());
|
||||
auto idsTrn =
|
||||
vtkm::cont::make_ArrayHandleTransform(v, detail::ExtractIDFunctor<ParticleType>());
|
||||
auto stepsTrn =
|
||||
vtkm::cont::make_ArrayHandleTransform(v, detail::ExtractStepsFunctor<ParticleType>());
|
||||
auto numIntTrn =
|
||||
vtkm::cont::make_ArrayHandleTransform(v, detail::ExtractNumIntFunctor<ParticleType>());
|
||||
auto numRoundsTrn =
|
||||
vtkm::cont::make_ArrayHandleTransform(v, detail::ExtractNumRoundsFunctor<ParticleType>());
|
||||
auto numCommTrn =
|
||||
vtkm::cont::make_ArrayHandleTransform(v, detail::ExtractNumCommFunctor<ParticleType>());
|
||||
auto numLifeTimeTrn =
|
||||
vtkm::cont::make_ArrayHandleTransform(v, detail::ExtractLifeTimeFunctor<ParticleType>());
|
||||
|
||||
vtkm::Id n = posTrn.GetNumberOfValues();
|
||||
vtkm::cont::Algorithm::CopySubRange(posTrn, 0, n, outPos, idx);
|
||||
vtkm::cont::Algorithm::CopySubRange(stepsTrn, 0, n, outSteps, idx);
|
||||
vtkm::cont::Algorithm::CopySubRange(idsTrn, 0, n, outIDs, idx);
|
||||
vtkm::cont::Algorithm::CopySubRange(numIntTrn, 0, n, outNumInt, idx);
|
||||
vtkm::cont::Algorithm::CopySubRange(numCommTrn, 0, n, outNumComm, idx);
|
||||
vtkm::cont::Algorithm::CopySubRange(numRoundsTrn, 0, n, outNumRounds, idx);
|
||||
vtkm::cont::Algorithm::CopySubRange(numLifeTimeTrn, 0, n, outLifeTime, idx);
|
||||
idx += n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
|
@ -96,15 +96,6 @@ public:
|
||||
vtkm::Id nLocal = static_cast<vtkm::Id>(this->Active.size() + this->Inactive.size());
|
||||
this->ComputeTotalNumParticles(nLocal);
|
||||
|
||||
//DRP: Set global time;
|
||||
#ifdef VTKM_ENABLE_MPI
|
||||
MPI_Comm mpiComm = vtkmdiy::mpi::mpi_cast(this->Comm.handle());
|
||||
MPI_Barrier(mpiComm);
|
||||
this->StartTime = MPI_Wtime();
|
||||
for (auto& block : this->Blocks)
|
||||
block.StartTime = this->StartTime;
|
||||
#endif
|
||||
|
||||
messenger.Log << "Begin" << std::endl;
|
||||
while (this->TotalNumTerminatedParticles < this->TotalNumParticles)
|
||||
{
|
||||
@ -113,9 +104,6 @@ public:
|
||||
vtkm::Id numTerm = 0, blockId = -1;
|
||||
if (this->GetActiveParticles(v, blockId))
|
||||
{
|
||||
for (auto& p : v)
|
||||
p.NumIntegrations++;
|
||||
|
||||
messenger.Log << " Advect " << v.size() << " in block " << blockId << std::endl;
|
||||
//make this a pointer to avoid the copy?
|
||||
auto& block = this->GetDataSet(blockId);
|
||||
@ -134,24 +122,6 @@ public:
|
||||
throw vtkm::cont::ErrorFilterExecution("Particle count error");
|
||||
}
|
||||
messenger.Log << "Done" << std::endl;
|
||||
|
||||
//DRP
|
||||
//Print out particle fluxes
|
||||
if (this->Rank == 0)
|
||||
{
|
||||
std::cout << "==================================" << std::endl;
|
||||
std::cout << "Rank: " << this->Rank << std::endl;
|
||||
std::cout << "ParticleFlux: " << this->Rank << std::endl;
|
||||
for (const auto& block : this->Blocks)
|
||||
{
|
||||
std::cout << " Block_ID: " << block.GetID() << std::endl;
|
||||
for (const auto& it : block.ParticleFlux)
|
||||
{
|
||||
std::cout << " " << it.first << " :: " << it.second << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
MPI_Barrier(mpiComm);
|
||||
}
|
||||
|
||||
|
||||
@ -233,8 +203,6 @@ public:
|
||||
|
||||
messenger.Log << " Communicate: AI= " << this->Active.size() << " " << this->Inactive.size()
|
||||
<< " localTerm= " << numLocalTerminations << " Block= " << block << std::endl;
|
||||
for (auto& p : this->Inactive)
|
||||
p.NumCommunications++;
|
||||
messenger.Exchange(this->Inactive,
|
||||
this->ParticleBlockIDsMap,
|
||||
numLocalTerminations,
|
||||
@ -327,9 +295,6 @@ public:
|
||||
vtkm::FloatDefault StepSize;
|
||||
vtkm::Id TotalNumParticles = 0;
|
||||
vtkm::Id TotalNumTerminatedParticles = 0;
|
||||
|
||||
//DRP
|
||||
vtkm::FloatDefault StartTime = 0.0;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -106,6 +106,7 @@ public:
|
||||
template <typename ParticleType>
|
||||
VTKM_CONT bool GetOutput(vtkm::cont::DataSet& ds) const;
|
||||
|
||||
|
||||
protected:
|
||||
template <typename ParticleType, template <typename> class ResultType>
|
||||
VTKM_CONT void UpdateResult(const ResultType<ParticleType>& result,
|
||||
@ -123,7 +124,7 @@ protected:
|
||||
|
||||
template <typename ParticleType>
|
||||
VTKM_CONT inline void ClassifyParticles(const vtkm::cont::ArrayHandle<ParticleType>& particles,
|
||||
DSIHelperInfo<ParticleType>& dsiInfo); //DRPconst;
|
||||
DSIHelperInfo<ParticleType>& dsiInfo) const;
|
||||
|
||||
//Data members.
|
||||
vtkm::cont::Variant<VelocityFieldNameType, ElectroMagneticFieldNameType> FieldName;
|
||||
@ -138,19 +139,13 @@ protected:
|
||||
vtkm::Id Rank;
|
||||
bool CopySeedArray = false;
|
||||
std::vector<RType> Results;
|
||||
|
||||
//DRP
|
||||
public:
|
||||
vtkm::FloatDefault StartTime = 0.0;
|
||||
// key=blockId, value = number of particles
|
||||
std::map<vtkm::Id, vtkm::Id> ParticleFlux;
|
||||
};
|
||||
|
||||
template <typename Derived>
|
||||
template <typename ParticleType>
|
||||
VTKM_CONT inline void DataSetIntegrator<Derived>::ClassifyParticles(
|
||||
const vtkm::cont::ArrayHandle<ParticleType>& particles,
|
||||
DSIHelperInfo<ParticleType>& dsiInfo) //DRP const
|
||||
DSIHelperInfo<ParticleType>& dsiInfo) const
|
||||
{
|
||||
dsiInfo.A.clear();
|
||||
dsiInfo.I.clear();
|
||||
@ -166,13 +161,10 @@ VTKM_CONT inline void DataSetIntegrator<Derived>::ClassifyParticles(
|
||||
{
|
||||
auto p = portal.Get(i);
|
||||
|
||||
bool particleTerminates = false;
|
||||
if (p.GetStatus().CheckTerminate())
|
||||
{
|
||||
dsiInfo.TermIdx.emplace_back(i);
|
||||
dsiInfo.TermID.emplace_back(p.GetID());
|
||||
//DRP
|
||||
particleTerminates = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -195,8 +187,6 @@ VTKM_CONT inline void DataSetIntegrator<Derived>::ClassifyParticles(
|
||||
p.GetStatus().SetTerminate();
|
||||
dsiInfo.TermIdx.emplace_back(i);
|
||||
dsiInfo.TermID.emplace_back(p.GetID());
|
||||
//DRP
|
||||
particleTerminates = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -216,15 +206,6 @@ VTKM_CONT inline void DataSetIntegrator<Derived>::ClassifyParticles(
|
||||
}
|
||||
}
|
||||
|
||||
//Record particle flux
|
||||
#ifdef VTKM_ENABLE_MPI
|
||||
// if (this->ParticleFlux.find(newIDs[0]) == this->ParticleFlux.end())
|
||||
// this->ParticleFlux[newIDs[0]] = 0;
|
||||
//auto it = this->ParticleFlux.find(newIDs[0]);
|
||||
this->ParticleFlux[newIDs[0]]++;
|
||||
//it->second++;
|
||||
#endif
|
||||
|
||||
int dstRank = dsiInfo.BoundsMap.FindRank(newIDs[0]);
|
||||
if (dstRank == this->Rank)
|
||||
{
|
||||
@ -237,12 +218,6 @@ VTKM_CONT inline void DataSetIntegrator<Derived>::ClassifyParticles(
|
||||
dsiInfo.IdMapI[p.GetID()] = newIDs;
|
||||
}
|
||||
}
|
||||
#ifdef VTKM_ENABLE_MPI
|
||||
//DRP
|
||||
if (particleTerminates)
|
||||
p.LifeTime = MPI_Wtime() - this->StartTime;
|
||||
#endif
|
||||
|
||||
portal.Set(i, p);
|
||||
}
|
||||
}
|
||||
@ -297,18 +272,8 @@ VTKM_CONT inline bool DataSetIntegrator<Derived>::GetOutput(vtkm::cont::DataSet&
|
||||
for (const auto& vres : this->Results)
|
||||
allParticles.emplace_back(vres.template Get<ResType>().Particles);
|
||||
|
||||
std::cout << "GetOutput() " << std::endl;
|
||||
std::cout << " " << allParticles[0].ReadPortal().Get(0) << std::endl;
|
||||
|
||||
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> ids, steps, numInt, numRounds, numComm;
|
||||
vtkm::cont::ArrayHandle<vtkm::FloatDefault> lifeTime;
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Vec3f> pts;
|
||||
//vtkm::cont::ParticleArrayCopy(allParticles, pts);
|
||||
vtkm::cont::ParticleArrayCopy(
|
||||
allParticles, pts, ids, steps, numInt, numRounds, numComm, lifeTime);
|
||||
vtkm::cont::ParticleArrayCopy(allParticles, pts);
|
||||
|
||||
vtkm::Id numPoints = pts.GetNumberOfValues();
|
||||
if (numPoints > 0)
|
||||
@ -323,13 +288,6 @@ VTKM_CONT inline bool DataSetIntegrator<Derived>::GetOutput(vtkm::cont::DataSet&
|
||||
vtkm::cont::ArrayCopy(conn, connectivity);
|
||||
cells.Fill(numPoints, vtkm::CELL_SHAPE_VERTEX, 1, connectivity);
|
||||
ds.SetCellSet(cells);
|
||||
|
||||
ds.AddCellField("IDs", ids);
|
||||
ds.AddCellField("NumSteps", steps);
|
||||
ds.AddCellField("NumIntegrations", numInt);
|
||||
ds.AddCellField("NumRounds", numRounds);
|
||||
ds.AddCellField("NumComm", numComm);
|
||||
ds.AddCellField("lifeTime", lifeTime);
|
||||
}
|
||||
}
|
||||
else if (this->IsStreamlineResult())
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <vtkm/filter/flow/internal/BoundsMap.h>
|
||||
#include <vtkm/filter/flow/internal/Messenger.h>
|
||||
#include <vtkm/filter/flow/vtkm_filter_flow_export.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
@ -31,17 +30,6 @@ namespace flow
|
||||
namespace internal
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename ParticleType>
|
||||
struct UpdatePreCommunicationWorklet : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
using ControlSignature = void(FieldInOut inParticle);
|
||||
|
||||
VTKM_EXEC void operator()(ParticleType& particle) const { particle.NumCommunications++; }
|
||||
};
|
||||
}
|
||||
|
||||
template <typename ParticleType>
|
||||
class VTKM_FILTER_FLOW_EXPORT ParticleMessenger : public vtkm::filter::flow::internal::Messenger
|
||||
{
|
||||
@ -213,10 +201,6 @@ void ParticleMessenger<ParticleType>::Exchange(
|
||||
outData, outBlockIDsMap, numLocalTerm, inData, inDataBlockIDsMap, blockAndWait);
|
||||
|
||||
#ifdef VTKM_ENABLE_MPI
|
||||
auto outArrayHandle = vtkm::cont::make_ArrayHandle(outData, vtkm::CopyFlag::Off);
|
||||
vtkm::cont::Invoker invoke;
|
||||
//detail::UpdatePreCommunicationWorklet<ParticleType> worklet;
|
||||
invoke(detail::UpdatePreCommunicationWorklet<ParticleType>{}, outArrayHandle);
|
||||
|
||||
//dstRank, vector of (particles,blockIDs)
|
||||
std::unordered_map<int, std::vector<ParticleCommType>> sendData;
|
||||
|
@ -415,9 +415,6 @@ void TestPartitionedDataSet(vtkm::Id nPerRank, bool useGhost, FilterType fType,
|
||||
{
|
||||
VTKM_TEST_ASSERT(out.GetNumberOfPartitions() == 1, "Wrong number of partitions in output");
|
||||
ValidateOutput(out.GetPartition(0), numSeeds, xMaxRanges[xMaxRanges.size() - 1], fType);
|
||||
|
||||
vtkm::Id n = out.GetNumberOfPartitions();
|
||||
out.GetPartition(n - 1).PrintSummary(std::cout);
|
||||
}
|
||||
else
|
||||
VTKM_TEST_ASSERT(out.GetNumberOfPartitions() == 0, "Wrong number of partitions in output");
|
||||
@ -448,8 +445,7 @@ void TestStreamlineFiltersMPI()
|
||||
//filterTypes = {filterTypes[1]};
|
||||
//flags = {false};
|
||||
|
||||
TestPartitionedDataSet(1, false, PARTICLE_ADVECTION, false);
|
||||
return;
|
||||
//TestPartitionedDataSet(1, false, PARTICLE_ADVECTION, true);
|
||||
|
||||
auto comm = vtkm::cont::EnvironmentTracker::GetCommunicator();
|
||||
for (int n = 1; n < 3; n++)
|
||||
|
Loading…
Reference in New Issue
Block a user