Fixing WarpXStreamlines compile problems
This commit is contained in:
parent
e6545f0ca4
commit
9d840a88bd
@ -221,6 +221,29 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ChargedParticle(const vtkm::ChargedParticle& other)
|
||||
: Position(other.Position)
|
||||
, ID(other.ID)
|
||||
, NumSteps(other.NumSteps)
|
||||
, Status(other.Status)
|
||||
, Time(other.Time)
|
||||
, Mass(other.Mass)
|
||||
, Charge(other.Charge)
|
||||
, Weighting(other.Weighting)
|
||||
, Momentum(other.Momentum)
|
||||
{
|
||||
}
|
||||
|
||||
vtkm::ChargedParticle& operator=(const vtkm::ChargedParticle&) = default;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
~ChargedParticle() noexcept
|
||||
{
|
||||
// This must not be defaulted, since defaulted virtual destructors are
|
||||
// troublesome with CUDA __host__ __device__ markup.
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT const vtkm::Vec3f& GetPosition() const { return this->Position; }
|
||||
VTKM_EXEC_CONT void SetPosition(const vtkm::Vec3f& position) { this->Position = position; }
|
||||
|
||||
@ -238,7 +261,7 @@ public:
|
||||
VTKM_EXEC_CONT void SetTime(vtkm::FloatDefault time) { this->Time = time; }
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Float64 Gamma(vtkm::Vec3f momentum, bool reciprocal = false) const
|
||||
vtkm::Float64 Gamma(const vtkm::Vec3f& momentum, bool reciprocal = false) const
|
||||
{
|
||||
constexpr vtkm::FloatDefault c2 = SPEED_OF_LIGHT * SPEED_OF_LIGHT;
|
||||
const vtkm::Float64 fMom2 = vtkm::MagnitudeSquared(momentum);
|
||||
@ -273,8 +296,6 @@ public:
|
||||
const vtkm::Vec3f mom_plus = mom_minus + vtkm::Cross(mom_prime, s);
|
||||
|
||||
const vtkm::Vec3f mom_new = mom_plus + 0.5 * this->Charge * eField * length;
|
||||
//TODO : Sould this be a const method?
|
||||
// If yes, need a better way to update momentum
|
||||
this->Momentum = mom_new;
|
||||
|
||||
// momentum = velocity * mass * gamma;
|
||||
@ -335,7 +356,6 @@ public:
|
||||
|
||||
} //namespace vtkm
|
||||
|
||||
|
||||
namespace mangled_diy_namespace
|
||||
{
|
||||
template <>
|
||||
@ -374,30 +394,7 @@ public:
|
||||
p.SetTime(time);
|
||||
}
|
||||
};
|
||||
/*
|
||||
template <>
|
||||
struct Serialization<vtkm::XGCParticle>
|
||||
{
|
||||
public:
|
||||
static VTKM_CONT void save(BinaryBuffer& bb, const vtkm::XGCParticle& p)
|
||||
{
|
||||
vtkmdiy::save(bb, p.Pos);
|
||||
vtkmdiy::save(bb, p.ID);
|
||||
vtkmdiy::save(bb, p.NumSteps);
|
||||
vtkmdiy::save(bb, p.Status);
|
||||
vtkmdiy::save(bb, p.Time);
|
||||
}
|
||||
|
||||
static VTKM_CONT void load(BinaryBuffer& bb, vtkm::XGCParticle& p)
|
||||
{
|
||||
vtkmdiy::load(bb, p.Pos);
|
||||
vtkmdiy::load(bb, p.ID);
|
||||
vtkmdiy::load(bb, p.NumSteps);
|
||||
vtkmdiy::load(bb, p.Status);
|
||||
vtkmdiy::load(bb, p.Time);
|
||||
}
|
||||
};
|
||||
*/
|
||||
template <>
|
||||
struct Serialization<vtkm::ChargedParticle>
|
||||
{
|
||||
|
@ -92,8 +92,8 @@ public:
|
||||
this->TermID.emplace_back(pID);
|
||||
}
|
||||
|
||||
const vtkm::filter::flow::internal::BoundsMap BoundsMap;
|
||||
const std::unordered_map<vtkm::Id, std::vector<vtkm::Id>> ParticleBlockIDsMap;
|
||||
vtkm::filter::flow::internal::BoundsMap BoundsMap;
|
||||
std::unordered_map<vtkm::Id, std::vector<vtkm::Id>> ParticleBlockIDsMap;
|
||||
|
||||
ParticleBlockIds InBounds;
|
||||
ParticleBlockIds OutOfBounds;
|
||||
|
Loading…
Reference in New Issue
Block a user