Merge topic 'lagrangian_bugfix'
10dc96cb8 Remove extra count variable 536249f63 Merge remote-tracking branch 'upstream/master' into lagrangian_bugfix 519844782 Fix order of initialized seeds to match output format Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Matt Larsen <larsen30@llnl.gov> Merge-request: !2084
This commit is contained in:
commit
1cc38e5e8d
@ -183,23 +183,22 @@ inline void Lagrangian::InitializeSeedPositions(const vtkm::cont::DataSet& input
|
||||
auto portal1 = BasisParticles.WritePortal();
|
||||
auto portal2 = BasisParticlesValidity.WritePortal();
|
||||
|
||||
vtkm::Id count = 0, id = 0;
|
||||
for (int x = 0; x < this->SeedRes[0]; x++)
|
||||
{
|
||||
vtkm::FloatDefault xi = static_cast<vtkm::FloatDefault>(x * x_spacing);
|
||||
for (int y = 0; y < this->SeedRes[1]; y++)
|
||||
{
|
||||
vtkm::FloatDefault yi = static_cast<vtkm::FloatDefault>(y * y_spacing);
|
||||
vtkm::Id id = 0;
|
||||
for (int z = 0; z < this->SeedRes[2]; z++)
|
||||
{
|
||||
vtkm::FloatDefault zi = static_cast<vtkm::FloatDefault>(z * z_spacing);
|
||||
portal1.Set(count,
|
||||
for (int y = 0; y < this->SeedRes[1]; y++)
|
||||
{
|
||||
vtkm::FloatDefault yi = static_cast<vtkm::FloatDefault>(y * y_spacing);
|
||||
for (int x = 0; x < this->SeedRes[0]; x++)
|
||||
{
|
||||
vtkm::FloatDefault xi = static_cast<vtkm::FloatDefault>(x * x_spacing);
|
||||
portal1.Set(id,
|
||||
vtkm::Particle(Vec3f(static_cast<vtkm::FloatDefault>(bounds.X.Min) + xi,
|
||||
static_cast<vtkm::FloatDefault>(bounds.Y.Min) + yi,
|
||||
static_cast<vtkm::FloatDefault>(bounds.Z.Min) + zi),
|
||||
id));
|
||||
portal2.Set(count, 1);
|
||||
count++;
|
||||
portal2.Set(id, 1);
|
||||
id++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user