Commit Graph

28 Commits

Author SHA1 Message Date
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
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Kenneth Moreland
68d5d26951 Fix warnings about conversion to int8
Now that UInt8 has become part of the list of default types compiled,
there have been numerous warnings that have popped up about converting
ints to unsigned char. The reason for these is when you do arithmetic
(+, -, *, or /) on a char or short, it is automatically upconverted to a
32-bit integer. When you then try to set that back to a smaller integer,
you get a conversion warning.

This change gets around this problem by explicitly telling the compiler
we expect this type with static_cast. We have also talked about
disabling conversion warnings, but this has not happened on all
dashboards, and it is not that hard to work around the warning.
2019-03-15 10:38:15 -06:00
Kenneth Moreland
2e426ad547 Run the update-control-signature-tags.sh script 2019-01-11 12:23:10 -07:00
Allison Vacanti
93506d25e2 Change function signatures to use 'using' aliases.
Also cleaned up some lingering type typedefs.
2018-05-25 17:18:41 -04:00
Robert Maynard
182f4707e7 vtkm prefers 'using' over typedef. 2018-02-23 10:47:20 -05:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Robert Maynard
f698a006fc Simplify the implementation of the average worklets. 2016-12-15 09:10:53 -05:00
Robert Maynard
839d8e8392 CellAverage first control parameter is now the cellset.
This was done so that it consistently matches other cell based worklets,
and the majority of examples inside the VTK-m Users Guide.
2016-12-14 14:04:57 -05:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Kenneth Moreland
4f81f04ff3 Fix warning about type conversion 2016-10-24 16:47:36 -04:00
Kenneth Moreland
622a44339d Add VTK_EXEC_EXPORT to new CellAverage methods
Frankly, I am surprised that the CellAverage worklet compiled on CUDA
when the parenthesis operator relied on methods that were not delcared
as __device__.
2016-10-23 11:51:09 -04:00
Kenneth Moreland
f820f0c76d Support arbitrary field types in CellAverage
Previously, the CellAverage worklet only operated on scalar fields.
However, there is no reason why you cannot average vectors. This change
allows passing input fields with arbitrary value types in the field
array.

We will use this functionality in the commit to test running filters on
coordinate systems (which, of course, are Vec 3 objects).
2016-10-23 11:51:09 -04:00
Robert Maynard
317a48d42f Prefer using PointCount instead of FromCount in cell based worklets.
The PointCount name is far more descriptive and helps readers understand
what the content of the variable is.
2016-05-31 10:42:39 -04:00
Robert Maynard
8dfe8cd385 Rename ControlSignature tag TopologyIn to CellSetIn. 2016-05-17 15:07:08 -04:00
Robert Maynard
39142d8347 Add convenience tags like FieldInPoint, FieldInCell, to WorkletMapPointToCell 2015-10-23 09:50:48 -04:00
Robert Maynard
f34119b62e Clarify the name of worklet for point to cell operations. 2015-10-22 18:46:00 -04:00
Sujin Philip
cef966bc5b Add convenience class WorkletMapToplogyPointToCell 2015-08-27 15:21:19 -04:00
Jeremy Meredith
e1f08d4eeb two small code fixes. 2015-08-26 14:51:20 -04:00
Jeremy Meredith
6df4c2e4f1 templating topology worklet to support mappings other than point-to-cell. 2015-08-25 15:37:53 -04:00
Kenneth Moreland
6598b296a6 Remove TopologyData class.
This class was used to store a group of from field data in a topology
map. However, the fetching has been changed to use a customized class
for each type of fetch that can be optimized for the fetch type and does
not require to know the number of items in the fetch at compile time.
Thus, this class is no longer needed, so it is being removed.
2015-08-14 09:17:34 -06:00
Kenneth Moreland
f7a6946d9a Use variable Vec-like objects for topology map fetching
This change removes the requirement to specify some maximum cell length
in each of the worklets, which is basically impossible. It also makes
some of the loading more lazy, which might help reduce the number of
registers required in a worklet.
2015-08-14 09:17:13 -06:00
Kenneth Moreland
63b45ad1e5 Consistently use from/to for topological links
In the CellSet and related classes, a connection was referred to by a
"from" topology element and a "to" topology element. However, in the
worklet control signature tags the elements were referred to by "src"
and "dest." To make things consistent, use "from" and "to" everywhere.
2015-08-03 10:48:50 -06:00
Kenneth Moreland
01757ea136 Change Node -> Point
Most of VTK-m follows the convention of calling the 0D topology elements
"points" (which follows the convention of VTK). However, there were
several places where they were referred to as "nodes." Make things
consistent by calling them points everywhere.

Also merged some redundant ExecutionSignature tags.
2015-08-03 10:06:59 -06:00
Robert Maynard
98d6e99275 Correct some warnings about 64bit to 32bit conversion. 2015-07-23 09:29:10 -04:00
Sujin Philip
0127e4d9d7 Add cell average worklet 2015-06-05 12:48:29 -04:00