Commit Graph

46 Commits

Author SHA1 Message Date
Matt Larsen
ef0b78b9ff Fixing explicit cell set bug 2015-12-11 13:38:37 -05:00
Patricia Kroll Fasel - 090207
498fc682ca Cell to point compiler errors 2015-11-02 11:05:12 -07:00
Patricia Kroll Fasel - 090207
ed0ecf284d Parallel CellToPoint initial code. 2015-10-30 13:59:36 -06:00
Kenneth Moreland
c7e9c1b67c Add default constructors/destructors/assignment to CellSet classes
The CellSet classes all exclusively work in the control environment.
However, CUDA likes to add __device__ to constructors, destructors, and
assignment operators it automatically adds. This in turn causes warnings
about the __device__ function using host-only classes (like
boost::shared_ptr). Solve this problem by adding explicit methods for
all of these.
2015-10-21 16:28:18 -06:00
Robert Maynard
9a8809f933 Add CellSetPermutation which allows custom iteration over a cell set.
When you create a CellSetPermutation you provide an array of the cell ids that
you want to iterate. This allows the user to do custom blanking of a data set,
or to do multi iteration over a set of cells.
2015-10-01 09:23:10 -04:00
Robert Maynard
fa81d1de7f CellSetExplicit always calls methods using "this->" 2015-09-30 11:20:33 -04:00
Robert Maynard
3e3078798c Mark CellSetExplicit::Fill as host side only. 2015-09-30 11:18:49 -04:00
Robert Maynard
c58f8ef193 CellSetExplicit Getters now properly deduce the correct handle type.
Previously the CellSetExplicit presumed that the CellToPoint and PointToCell
Storage tags matched, which they don't when using custom storage tags.
2015-09-25 13:41:41 -04:00
Robert Maynard
5a3e7c779e CellSetExplicit CreateConnectivity works even when NumberOfPoints is zero.
Previously if you created a cell set explicit and didn't set the number of
points you would get a runtime error when you over-ran an array's bounds.
Now we account for this use case and properly generate the Cell To Point
Connectivity.
2015-09-25 13:41:41 -04:00
Robert Maynard
dbed882709 Correct issues found in code review. 2015-09-25 12:32:06 -04:00
Robert Maynard
82b977da0e CellSetExplicit::CreateConnectivity now works with implicit NumIndices. 2015-09-24 12:38:34 -04:00
Robert Maynard
f04ea6d72e CellSetExplicit has userdefined offset storage. 2015-09-24 11:24:50 -04:00
Robert Maynard
19cebccf11 Correct issues that buildbot brought up in the code. 2015-09-24 10:15:44 -04:00
Robert Maynard
c6dbc0f20e GetNumberOfPointsInCell consistently returns a vtkm::IdComponent 2015-09-23 15:47:41 -04:00
Robert Maynard
25ff1e9403 CellSetExplicit storage tags are now easier to override. 2015-09-23 15:47:41 -04:00
Robert Maynard
935b3fd6b9 CellSetExplicit uses UInt8 for shape, and IdComponent for numIndices. 2015-09-23 11:17:04 -04:00
Sujin Philip
f004d344e1 Fix some typos in CellSetExplicit.h 2015-09-11 15:03:18 -04:00
Jeremy Meredith
8544fb8ca4 adding topology types to explicit cell set connectivity array accessors. 2015-09-02 12:26:37 -04:00
Jeremy Meredith
f027d0335a fixing cell-to-point conn generation to not use intermediate storage. 2015-09-01 18:56:32 -04:00
Jeremy Meredith
11708c6ef7 automatically build connectivity as needed. 2015-09-01 18:37:17 -04:00
Jeremy Meredith
e28402aed1 yet more warning fixes 2015-09-01 14:22:13 -04:00
Jeremy Meredith
94b8b9f5b0 more warning fixes 2015-09-01 14:11:47 -04:00
Jeremy Meredith
52458e853f fixing some warnings 2015-09-01 14:03:12 -04:00
Jeremy Meredith
48736f20cf changing to use new shape names 2015-08-28 16:08:34 -04:00
Jeremy Meredith
2987142fa6 adding support and tests for cell-to-point topology worklet. 2015-08-28 14:03:13 -04:00
Kenneth Moreland
c81bc3d501 Add CellShapeTag classes
Each cell shape id has an associated cell shape tag. There is also a
macro to write functions that are conditional on the cell shape.
2015-08-27 16:30:58 -06:00
Kenneth Moreland
5b47354058 Rename CellType to CellShape.
We have been using the term "shape" in the cell set and connectivity
classes. To be consistent, use the term "shape" for the geometric
identify of the cell everywhere.
2015-08-27 16:25:59 -06:00
Robert Maynard
219ecc37a5 Make all the Get methods return by const ref. 2015-08-19 10:58:40 -04:00
Kenneth Moreland
1862970a0b Reintroduce explicit connectivity class for cont environment
(Re-) Add a helper structure that holds the connectivity information for
a particular topology connection (e.g. from points to cells) to make it
easier to manage connections in multiple different directions in
CellSetExplicit.

Unlike the previous version of connectivity, this structure is
considered "internal" and not exposed through the API so that
CellSetExplicit can better manage the data. Also, many of the helper
methods remain in CellSetExplicit since they were specific for point-to-

Also, CellSetExplicit has a mechanism to take an arbitrary pair of
TopologyElementTags and get the appropriate connectivity. This should
simplify adding connections in the future.
2015-08-11 12:42:34 -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
Kenneth Moreland
7212469d04 Roll connectivity information into CellSet in control environment
Previously there was a Connectivity* structure for both the control
environment and the execution environment. This was necessary before
because the connectivity is explicit to the from and to topology
elements, so you would get this structure from the appropriate call to
CellSet*. However, the symantics are changed so that the type of
connectivity is selected in the worklet's dispatcher. Thus, it is now
much cleaner to manage the CellSet structure in the CellSet class itself
and just have a single set of Connectivity* classes in the execution
environment.
2015-08-02 15:59:44 -06:00
Kenneth Moreland
926f04e1d4 Move ExplicitConnectivity to ConnectivityExplicit
This is more consistent with VTK-m's naming convention.

Also made some minor changes and corrections.
2015-07-31 14:18:13 -06:00
Kenneth Moreland
d6b8c8f510 Change TopologyType identifiers from enumeration to tags.
Previously, the items used to identify parts of topology like points,
cells, faces, etc. were in an enumeration. However, they are only really
used in template specialization, and it is easier to use tags in this
case. So, change the enumeration to a set of tag structures. Also made
the following changes:

* Renamed TopologyType to TopologyElement, which is more indicative of
what we are referring to.
* Moved the structures from the vtkm::cont namespace to the vtkm
namespace. There is no reason not to be able to use them from either the
control or execution environments.
* Added a VTKM_IS_TOPOLOGY_ELEMENT_TAG macro to do type checks on
template arguments that are supposed to be topology element tags.
2015-07-31 13:59:37 -06:00
Kenneth Moreland
4ccb9bc374 Use std::string() instead of "" to initialize strings.
As per Robert Maynard's request.
2015-07-30 12:55:24 -06:00
Kenneth Moreland
b8febd1c01 DataSet now holds DynamicCellSet instead of smart_ptr<CellSet>
The Invoke of the topology dispatcher is also changed to expect a
concrete cell set (which the DynamicCellSet is automatically cast to)
rather than a connectivity structure. The dispatcher calls the
GetNodeToCellConnectivity method for you. (That is currently the only
one supported.)
2015-07-28 17:33:52 -06:00
Kenneth Moreland
6b68666d0c Created DynamicCellSet
The DynamicCellSet will be used in place of the pointer to a CellSet
in a DataSet. This will prevent us from having to cast it all the time
and also remove reliance on boost smart_ptr.
2015-07-27 16:58:29 -06:00
Kenneth Moreland
19db32f084 Conform DataSet classes to coding practices better
The most common changes were making class members uppercase and spelled
out, adding "this->" whenever a class member is used, and declare
functions and members with export macros. Also fixed some uses of int
(instead of vtkm::Id or something similar) and a bit of indentation. I
also sprinkled some const goodness over the code.

It should be noted that I had about a week delay between first making
these changes and checking them in. In the mean time Sujin also made
some similar changes, so there might be some repetative changes.
2015-07-27 12:49:42 -06:00
Will Usher
50fa6f78d3 Fix support for enabling 64bit vtkm::Id and double precision
The CMake flag and define differ in their capitalization of the 'm' in
VTKm so I've made CMake variables that match those used in Configure.h.in,
thereby keeping the original naming of VTKm in CMake code, and VTKM in the
C++ code.

This fix also revealed some areas in CellSet and CellSetExplicit where ints
where used instead of vtkm::Ids which caused errors with child classes who
override the methods and returned a vtkm::Id instead of an int.

Also fixed issues that appeared in TestOutOfMemory which got out of date due
to not being compiled since the `VTKM_USE_64BIT_IDS` flag would never be set.
The test now runs and passes when 64bit ids are enabled.
2015-07-23 09:01:39 -04:00
Robert Maynard
0a433303e6 Correct headers to have the new copyright. 2015-06-03 15:06:43 -04:00
Robert Maynard
81450f2317 CellSetExplicit can now use different storage backends.
CellSetExplicit can now use different storage backends to allow
for cheaper representations of the data. For example a pool of triangles
can now implicit handles for shape and num indices.

This does raise the question if runtime polymorphism is the best approach
for CellSet, or if we should do some from of CRTP.
2015-06-01 09:55:53 -04:00
Robert Maynard
ecec6945bf ExplicitConnectivity can now use different storage backends.
ExplicitConnectivity can now use different storage backends to allow
for cheaper representations of the data. For example a pool of triangles
can now implicit handles for shape and num indices.
2015-06-01 09:42:10 -04:00
Dave Pugmire
e1bbda8cae Add PrintSummary() for DataSet. 2015-05-20 15:26:10 -04:00
Jeremy Meredith
6816ec4293 updating reg struct usage in cell set 2015-05-15 13:15:11 -04:00
Jeremy Meredith
9ff5832909 adding wrapper for exec connectivity. 2015-05-12 09:39:00 -04:00
Jeremy Meredith
5e2c22d9fa switching to using cell sets instead of connectivity objects in data set. 2015-04-15 13:01:00 -04:00
Jeremy Meredith
1629045986 adding initial cell set structures 2015-04-15 12:43:12 -04:00