Commit Graph

28 Commits

Author SHA1 Message Date
Kenneth Moreland
3e1339f9a7 Remove deprecated features from VTK-m
With the major revision 2.0 of VTK-m, many items previously marked as
deprecated were removed. If updating to a new version of VTK-m, it is
recommended to first update to VTK-m 1.9, which will include the deprecated
features but provide warnings (with the right compiler) that will point to
the replacement code. Once the deprecations have been fixed, updating to
2.0 should be smoother.
2022-11-17 07:12:31 -06:00
Kenneth Moreland
5d78780f6e Define LastCell type in cell locator structure
Rather than try to collect all `LastCell` types inside of a single
header and make an uber type, have each cell locator define its own cell
locator type and use that.
2022-08-05 12:43:50 -06:00
Dave Pugmire
70855167e5 Use last find cell to accelerate finds. 2022-08-04 11:41:17 -04:00
Kenneth Moreland
1822792b85 Support deprecated behavior of point locator pointers
`PointLocator`s have changed from being virtual objects to being trivial
objects. Part of this change means that when a worklet gets the
execution object for a point locator, it gets the actual object (or a
reference to it) instead of a pointer to an object. This means that the
new code uses the `.` operator to access the locator's features instead
of the `->` operator.

To support code still using the deprecated functionality, added a
specific `->` operator to the locator execution object to make it behave
as if it were a pointer. However, this operator is marked deprecated to
warn the user that they should modify their code to use the `.` instead.
2021-02-18 13:11:54 -07:00
Kenneth Moreland
0a5f5d55c9 Remove virtual methods from cell locators
Deprecated the `CellLocator` class and made all methods of the
other `CellLocator` classes non-virtual. General locators can
still use the `CellLocatorGeneral` class, but this class now
only works with a predefined set of locators. (The functionality
to provide a function to select a locator has been removed.)
2021-02-15 12:39:11 -07:00
Kenneth Moreland
c62e38bab6 Make locator exec objects not depend on device type
With recent changes to `ArrayHandle`, the type for the associated array
portal is now the same across all devices. This means that almost all
exec objects no longer need to be specialized on the device types. Thus,
clean up the locator exec objects to no longer need to be templated on
device.
2021-02-09 17:20:57 -07:00
Kenneth Moreland
be7f06bbe7 CoordinateSystem data is VariantArrayHandle
`CoordinateSystem` differed from `Field` in that its `GetData`
method returned an `ArrayHandleVirtualCoordinates` instead of
a `VariantArrayHandle`. This is probably confusing since
`CoordianteSystem` inherits `Field` and has a pretty dramatic
difference in this behavior.

In preparation to deprecate `ArrayHandleVirtualCoordinates`, this
changes `CoordiantSystem` to be much more like `Field`. (In the
future, we may change the `CoordinateSystem` to point to a `Field`
rather than be a special `Field`.)

A method named `GetDataAsMultiplexer` has been added to
`CoordinateSystem`. This method allows you to get data from
`CoordinateSystem` as a single array type without worrying
about creating functors to handle different types and without
needing virtual methods.
2020-07-14 08:50:39 -06:00
Kenneth Moreland
51e817adc1 Introduce vtkm::ErrorCode
This is a flag that functions in the execution environment can return to
report on the status of the operation. This way they can report an error
without forcing the entire invocation to shut down.
2020-03-13 18:58:33 -06:00
Kenneth Moreland
04edc3d202 Avoid raising errors when operating on cells
Cell operations like interpolate and finding parametric coordinates can
fail under certain conditions. Typically these call RaiseError on the
worklet. But that can make a worklet unstable, so provide paths where no
error is raised.
2020-03-12 07:50:01 -06:00
Kenneth Moreland
ad0a53af71 Convert execution preparation to use tokens
Marked the old versions of PrepareFor* that do not use tokens as
deprecated and moved all of the code to use the new versions that
require a token. This makes the scope of the execution object more
explicit so that it will be kept while in use and can potentially be
reclaimed afterward.
2020-02-25 09:39:19 -07:00
Robert Maynard
123f8b01aa Mark virtual destructors as override where applicable 2020-01-13 15:54:33 -05:00
Abhishek Yenpure
2798c737a2 Fixing issues raised by Ken on Gitlab 2019-08-08 09:15:28 -07:00
Abhishek Yenpure
aefc5faca6 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into particle_status_merge 2019-08-07 13:06:34 -07:00
Abhishek Yenpure
06d05196b5 Adding fast path to Uniform Grid Locator 2019-08-07 12:32:37 -07:00
Abhishek Yenpure
4e7b59c65e Adding changes for 2D uniform cell locator 2019-08-06 10:52:10 -06:00
Allison Vacanti
5db762ee71 Refactor topology mappings to clarify meaning.
The `From` and `To` nomenclature for topology mapping has been confusing for
both users and developers, especially at lower levels where the intention of
mapping attributes from one element to another is easily conflated with the
concept of mapping indices (which maps in the exact opposite direction).

These identifiers have been renamed to `VisitTopology` and `IncidentTopology`
to clarify the direction of the mapping. The order in which these template
parameters are specified for `WorkletMapTopology` have also been reversed,
since eventually there may be more than one `IncidentTopology`, and having
`IncidentTopology` at the end will allow us to replace it with a variadic
template parameter pack in the future.

Other implementation details supporting these worklets, include `Fetch` tags,
`Connectivity` classes, and methods on the various `CellSet` classes (such as
`PrepareForInput` have also reversed their template arguments. These will need
to be cautiously updated.

The convenience implementations of `WorkletMapTopology` have been renamed for
clarity as follows:

```
WorkletMapPointToCell --> WorkletVisitCellsWithPoints
WorkletMapCellToPoint --> WorkletVisitPointsWithCells
```

The `ControlSignature` tags have been renamed as follows:

```
FieldInTo --> FieldInVisit
FieldInFrom --> FieldInMap
FromCount --> IncidentElementCount
FromIndices --> IncidentElementIndices
```
2019-08-06 11:27:26 -04:00
Kenneth Moreland
0be50c119d Update VTK-m code to use new Vec aliases
Should make the code easier to read.
2019-07-31 12:55:40 -06:00
Robert Maynard
512d0431ec Cell and Point locators have correct export visibility
UBSAN found that these execution object had mixed visibility
causing undefined behavior when casting across DSO's.
2019-06-19 08:36:19 -04:00
Robert Maynard
61e8003793 Make sure all execution side CellLocator objects have explicit destructors 2019-04-26 10:10:21 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Dave Pugmire
5a63b19c2b Fixes for uniform cell locator for points right on the boundary. Also added some tests for boundary points. 2019-02-01 08:43:54 -05:00
Dave Pugmire
529b7c2178 Fix issue with points on the boundary. 2019-01-31 11:08:02 -05:00
Dave Pugmire
9974cb064a Fix source file inclusion and copyright test failures. 2019-01-31 08:57:00 -05:00
ayenpure
62ee1a2c8a Updates to the Cell Locators
- Adding updates to uniform grid cell locator
  - adding OpenMP test, updating copyrights
- Adding rectilinear grid cell locator
  - adding unit tests for serial, tbb, OpenMP, and cuda
- Updating CMakeLists to honor the alphabetical ordering
2019-01-06 17:18:23 -08:00
ayenpure
22ca8bce15 Fixing unit test 2018-08-30 10:19:00 -07:00
ayenpure
08421eb638 Fixes for CellLocatorUniformGrid
- Fixing compiler warnings
- Making code concise
2018-08-30 09:01:04 -07:00
ayenpure
42e2bb7f9a Updating files with copyrights 2018-08-29 19:46:49 -07:00
ayenpure
594d1934d4 Adding CellLocatorUniformGrid
- Adding a cell locator to locate points in a uniform grid
- Adding unit tests for the new cell locator
2018-08-29 19:30:07 -07:00