Skip to content

Commit

Permalink
Fix topology bug with uniform grid filter (#1319)
Browse files Browse the repository at this point in the history
We know the field name so we will grab the topology that way.
  • Loading branch information
nicolemarsaglia authored Jun 27, 2024
1 parent 756ba13 commit d9a1e69
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3361,26 +3361,25 @@ VTKHUniformGrid::execute()
}
std::shared_ptr<VTKHCollection> collection = data_object->as_vtkh_collection();

bool throw_error = false;
std::string topo_name = detail::resolve_topology(params(),
this->name(),
collection,
throw_error);
if(topo_name == "")
std::string field = params()["field"].as_string();
if(!collection->has_field(field))
{
bool throw_error = false;
detail::field_error(field, this->name(), collection, throw_error);
// this creates a data object with an invalid soource
set_output<DataObject>(new DataObject());
return;
}


std::string topo_name = collection->field_topology(field);
vtkh::DataSet &data = collection->dataset_by_topology(topo_name);

vtkm::Bounds d_bounds = data.GetGlobalBounds();
vtkm::Float64 x_extents = d_bounds.X.Length() + 1; //add one b/c we are
vtkm::Float64 y_extents = d_bounds.Y.Length() + 1; //setting num points
vtkm::Float64 z_extents = d_bounds.Z.Length() + 1; //(not cells) in each dim

std::string field = params()["field"].as_string();
vtkm::Float64 invalid_value = 0.0;

using Vec3f = vtkm::Vec<vtkm::Float64,3>;
Expand Down

0 comments on commit d9a1e69

Please sign in to comment.