Commit Graph

251 Commits

Author SHA1 Message Date
Kenneth Moreland
b1e6c1e34b Add method for getting a cononical edge id
The cononical edge id is stored in a vtkm::Id2.
2017-08-17 16:07:41 -06:00
Kenneth Moreland
8e72dc738a Add method for getting a cononical face id
The cononical face id is stored in a vtkm::Id3 (independent of the
actual number of points in the face).
2017-08-17 15:48:47 -06:00
Robert Maynard
08d4b3cf36 Merge topic 'clang_tidy'
b85cdd90 Convert VTK-m over to use 'using' instead of 'typedef'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !836
2017-08-08 16:26:10 -04:00
Robert Maynard
b85cdd9080 Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-07 14:05:43 -04:00
Sujin Philip
6ce8218d09 Implement CellToPoint for CellSetPermutation 2017-08-02 15:19:06 -04:00
Kenneth Moreland
897ec9ff5e Test and fix issues with WholeCellSetIn with structured grids 2017-07-28 15:02:05 -06:00
Kenneth Moreland
03b6f62d05 Add a test for the WholeCellSetIn argument
All types of cell sets should have a consistent interface. This is
tested (and fixed) for explicit and permutation cell sets. However, an
unfixed bug that has been identified is that permutation cell sets only
work for point to cell topologies. All others are not supported
correctly.
2017-07-28 13:46:37 -06:00
David C. Lonie
fb2d36be1e Refactor VecRectilinearPointCoordinates.
See #163.
2017-07-07 13:49:35 -04:00
Kenneth Moreland
731bb64a0b Make .in files match new formatting
More corrections for the autoformatter and .in files.
2017-05-31 09:37:29 -06:00
Kenneth Moreland
071c792148 Merge topic 'indent-generated'
b03a61da Make .in files match new formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !784
2017-05-28 10:28:54 -04:00
Kenneth Moreland
b03a61da5d Make .in files match new formatting
The automatic formatter formatted the result of the .in files, but not
the .in files themselves. This caused the .in file check to fail.
2017-05-27 09:46:32 -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
Robert Maynard
60a405ef65 Add TaskTiling1D/3D which use faux virtuals to reduce binary size.
Redesigns the TBB and Serial backends and the vtkm::exec::Task concept so that
we can re-use the same launching logic for all Worklets, instead of generating
per worlet code. To keep the performance the same the TilingTask now is past
a range of indices to work on, rather than a single index.

Binary size reduction:
WorkletTests_SERIAL old - 19MB
WorkletTests_SERIAL new - 18MB

WorkletTests_TBB old - 39MB
WorkletTests_TBB new - 18MB

libvtkAcceleratorsVTKm old - 48MB
libvtkAcceleratorsVTKm new - 19MB
2017-05-25 11:00:01 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Robert Maynard
6ed4bc786f Permuted structured cellsets produce VecRectilinearPointCoordinates
Previously when you permuted a structured cellset you would get a permuted
point coordinates. This would cause the Cell operations to take non
optimal paths.
2017-05-23 10:49:19 -04:00
Robert Maynard
6da48cf3c1 Remove unneeded methods from the Connectivity classes. 2017-05-23 10:49:19 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Robert Maynard
57ab48fe8e Replace occurrences of NULL with nullptr. 2017-05-04 10:50:57 -04:00
Robert Maynard
022c36fa4f Add vtkm::exec::TaskBase, and rename WorkletInvokeFunctor to TaskSingular
Previously WorkletInvokeFunctor inherited from vtkm::exec::FunctorBase,
which is also the base class for all users Worklets and for all functors
based to DeviceAdapter::Schedule.

This is done for a few reasons. The first is that we reduce the
minimum size of user worklets. Previously the users worklet would hold
a reference to the error message, and so would the wrapper class added
when calling DeviceAdapter::Schedule. Now we only have the users worklet
holding a reference.

Second, by refactoring to have two base classes we can better improve
the documentation on what responsibilities FunctorBase.h has, compared
to TaskBase.
2017-05-02 16:38:43 -04:00
Sujin Philip
e9898cc5cf Merge topic 'virtual-methods'
4049b5b2 Add ClipWithImplicitFunction Filter
82d02e46 Modify ImplicitFunctions to use Virtual Methods
968960c1 Add Virtual Methods Framework

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !750
2017-05-02 16:12:04 -04:00
Sujin Philip
82d02e46ef Modify ImplicitFunctions to use Virtual Methods 2017-05-01 16:55:59 -04:00
Robert Maynard
93a5662a7b Merge topic 'correct_missing_cuda_exec_include'
cc08589d Make sure ExecutionPolicy.h includes all headers it uses

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !756
2017-04-27 13:00:44 -04:00
Robert Maynard
cc08589df6 Make sure ExecutionPolicy.h includes all headers it uses 2017-04-24 13:34:39 -04:00
Robert Maynard
355eea887c Get the vtkm cont cuda object to compile properly. 2017-04-05 15:45:10 -07:00
Robert Maynard
5566afdd8d Allow MarchingCubes to handle multiple iso-contour values. 2017-03-16 11:49:20 -04:00
Sujin Philip
b455636bcd Move BaseComponentOf to vtkm::BaseComponent 2017-03-07 14:46:55 -05:00
Kenneth Moreland
297c1b0709 Add InputDomainTag to Invocation 2017-03-03 20:20:35 -07:00
Kenneth Moreland
dcbbb72784 Merge branch 'master' into external-face-more-generic
Update exception methods to new names.
2017-02-08 17:10:17 -07:00
Robert Maynard
9148bea396 Corrects ignorable warnings with msvc and cuda enabled.
These constant value warnings are ignorable as we are trying
to throw an assert.
2017-02-02 10:09:34 -05:00
Kenneth Moreland
629271bceb Make sure all ArrayPortals have a Set method.
The current design for ArrayPortalVirtual makes it a requirement for all
array portals (that it wraps) to have Set defined. Thus, make sure Set is
defined for all ArrayPortal. Where Set is invalid, an assert is thrown if
something calls it at runtime.
2017-01-31 15:46:39 -05:00
Kenneth Moreland
53679dfc9c Update ExternalFaces to support mixed face types
Previously, ExternalFaces really only supported tetrahedral meshes that
have only triangular faces. These changes support all mixes of cells and
their faces.
2017-01-26 13:35:46 -07:00
Andrew Bauer
7b165842cd Fixing documentation typo 2017-01-25 10:41:09 -05:00
Kenneth Moreland
ffa3b167b5 Add ValueCount tag to WorkletReduceByKey 2017-01-17 15:53:10 -07:00
Kenneth Moreland
58eb8f168d Add WorkletReduceByKey and dispatcher
And the basic type for a reduce by key worklet and its associated
adapter. Right now the worklet only supports passing in keys. Values
come next.
2017-01-17 15:53:06 -07:00
Robert Maynard
1052a71523 ConnectivityPermuted explicitly suppress cuda host/device warnings
The class can emit false positive warnings when being compiled with
cuda but SMP backends.
2017-01-02 11:38:05 -05:00
Kenneth Moreland
55c159d6f0 Check error codes from CUDA functions
Most functions in the CUDA runtime API return an error code that must be
checked to determine whether the operation completed successfully. Most
operations in VTK-m just called the function and assumed it completed
correctly, which could lead to further errors. This change wraps most
CUDA calls in a VTKM_CUDA_CALL macro that checks the error code and
throws an exception if the call fails.
2016-12-14 10:43:44 -07:00
Robert Maynard
d1336c7f84 CellDerivativeFor2DCell now creates Space2D of the correct type.
Previously vtkm::Vec<> fields would construct Space2D types incorrectly
2016-12-12 13:26:16 -05:00
Robert Maynard
134f24496b Add a point gradient worklet. 2016-12-12 13:26:16 -05:00
Robert Maynard
06af2fbcbf Make it easier to construct ThreadIndices by hand.
In some cases it is necessary to construct ThreadIndices to manually
use vtkm::exec::Fetch. This now makes it possible.
2016-12-12 13:26:16 -05:00
Robert Maynard
60843cbab8 Allow people to get the portal from ExecutionWholeArray.
This is required when doing some optimizations to PointGradient.
2016-12-12 13:26:16 -05:00
Robert Maynard
e462d34c60 ExecutionWholeArray now has consistent ValueType defines. 2016-12-12 13:26:16 -05:00
Robert Maynard
9f2b680594 WholeCellSetIn now uses the proper fetch tag. 2016-12-12 13:26:16 -05:00
Kenneth Moreland
50e0d05c3e Merge topic 'cell-face-edge'
eb7ea792 Add VTKM_EXEC_CONT to make_VecC
16970b57 Update ExternalFaces to use common face tables
91f98835 Add CellEdge functions
5ab43f8d Add CellFace functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !631
2016-12-10 10:12:01 -05:00
Kenneth Moreland
2e05c1dd03 Support derivatives of vectors
The cell derivative/gradient functions were all designed with scalars in
mind. Although the field type is templated and you could pass in a
vector type for the field, many of these classes would perform the
computation incorrectly. These changes specifically support derivatives
of vector types.
2016-12-05 23:04:35 -07:00
Kenneth Moreland
91f9883599 Add CellEdge functions
These provide the general ability to get the edges for each cell type.
2016-12-05 22:48:44 -07:00
Kenneth Moreland
5ab43f8d9e Add CellFace functions
These provide the general ability to get the faces for each cell type.
2016-12-05 22:48:44 -07:00
Kenneth Moreland
3f9a1edb7b Change CellShapeTag*:Id type to vtkm::UInt8
The shape array in CellSetExplicit was changed a while ago to be of type
vtkm::UInt8. However, the shape types remained at vtkm::IdComponent. I
can think of no reason why they should not be the same type.
2016-11-22 17:12:54 -07:00
Kenneth Moreland
b3d0e1f99b Move VecFromPortal classes to vtkm package
These Vec-like objects can be generally usable in both the control and
execution environments.
2016-11-22 17:04:55 -07: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
Robert Maynard
8861beda4b Merge topic 'add_vector_cell_gradient'
8dadf560 Add in support for vector fields to Gradient worklet.
d53f43fb CellDerivaties now support computing the derivatives of vtkm::Vec fields.
b4378c85 Allow vtkm::Matrix to support T values which are vtkm::Vec.
9caabf97 vtkm::Vec now supports +=, -=, *=, and /=.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !608
2016-11-15 23:39:10 -05:00