Commit Graph

39 Commits

Author SHA1 Message Date
Kenneth Moreland
5b8c282e9f Continue transfer of Users' Guide text
These changes complete the using part of the guide.
2023-11-21 10:33:45 -07:00
Kenneth Moreland
0a89a5fff5 Store UnknownCellSet instead of DynamicCellSet in DataSet
`UnknownCellSet` is an updated replacement for `DynamicCellSet`. The
next step in the replacement is to change `DataSet` to use the new
class.

Also replaced `DynamicCellSet` with `UnknownCellSet` in a few
places where `DynamicCellSet.h` was not directly included (and
therefore now no longer included at all). This change would have
to be made at some point anyway.
2022-01-03 13:52:30 -07:00
Kenneth Moreland
dc112b5169 Enable changing policy used for library compiles
Previously, the PolicyDefault used to compile all the filters was hard-
coded. The problem was that if any external project that depends on VTK-
m needs a different policy, it had to recompile everything in its own
translation units with a custom policy.

This change allows an external project provide a simple header file that
changes the type lists used in the default policy. That allows VTK-m to
compile the filters exactly as specified by the external project.
2020-03-19 15:07:07 -06:00
Robert Maynard
f4153fe2f9 Correct warnings found with CUDA 10.2 + gcc 4.8.5
Found during building on Centos7 based Power9 machines
2020-02-26 15:16:35 -05:00
Robert Maynard
27739660b9 Add missing constructors/assignment operators
Having a custom assignment operator means that the compiler
isn't required to generate the implicit copy constructor.
This makes sure they are constructed.
2020-01-14 11:18:22 -05:00
Robert Maynard
3b89bc0db2 CellSet classes don't require a name 2019-09-02 10:39:58 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
8f545662d7 CellSet uses NewInstance to be consistent with the rest of VTK-m 2019-04-03 18:10:31 -04:00
Sujin Philip
8868fb989b Improve CellSet API
Add useful virtual functions to the vtkm::cont::CellSet base class.
2019-03-19 16:12:48 -04:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
ef83adf3bd Field, CoordinateSystem, VirtualCoordinates all use the new virtual code 2018-12-27 14:35:56 -05:00
Robert Maynard
64958b014b VTK-m now supports passing pointers when invoking worklets.
The original design of invoke and the transport infrastructure
relied on the implementation behavior of vtkm::cont types
such as ArrayHandle that used an internal shared_ptr to managed
state. This allowed passing by value instead of passing by
non-const ref when needing to transfer information to the device.

As VTK-m adds support for classes that use virtuals the ability
to pass by base pointer type allows for us to invoke worklets
using a base type without the risk of type slicing.

Additional by moving over to a non-const ref Invocation we
can update all transports that have 'output' to now be
by ref and therefore support types that can't be copied while
being 'more' correct.
2018-07-06 14:27:36 -04:00
Haocheng LIU
86f22bf47f Add a release resources API to CellSet and its derived classes 2018-06-12 11:44:18 -04: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
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Robert Maynard
3c07c77fa7 Introduce vtkm_cont library to reduce weak vtable creation.
This reduces the number of weak vtables vtkm generates, resulting in
a reduction of binary sizes for projects that include vtkm classes in
multiple translation units.
2017-01-16 09:17:38 -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
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Jeremy Meredith
0c18278028 removing cell set dimensionality and splitting tetrahedralizer. 2016-05-13 14:26:59 -04:00
Robert Maynard
3f2c68a4d6 Finish writing the comment explaining what GetDimensionality values mean. 2016-02-03 13:35:10 -05:00
Robert Maynard
1d28a6dd04 Add a small amount of documentation to CellSet Dimensionality. 2016-01-25 09:23:08 -05:00
Kenneth Moreland
5fd5353194 Add GetNumberOfPoints to CellSet.
This is a pure virtual method that all CellSet subclasses must
implement. I needed to add an implementation to CellSetPermutation.
2015-12-21 17:27:54 -07: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
Kenneth Moreland
b15940c1e3 Declare new VTKM_STATIC_ASSERT
This is to be used in place of BOOST_STATIC_ASSERT so that we can
control its implementation.

The implementation is designed to fix the issue where the latest XCode
clang compiler gives a warning about a unused typedefs when the boost
static assert is used within a function. (This warning also happens when
using the C++11 static_assert keyword.) You can suppress this warning
with _Pragma commands, but _Pragma commands inside a block is not
supported in GCC. The implementation of VTKM_STATIC_ASSERT handles all
current cases.
2015-09-17 14:40:39 -06:00
Kenneth Moreland
2ff6576c65 Add third party wrappers around boost macros.
The boost assert macros seem to have an issue where they define an
unused typedef. This is causing the XCode 7 compiler to issue a warning.
Since the offending code is in a macro, the warning is identified with
the VTK-m header even though the code is in boost. To get around this,
wrap all uses of the boost assert that is causing the warning in the
third party pre/post macros to disable the warning.
2015-09-16 23:34:49 -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
Kenneth Moreland
e301ba0a98 Replace BOOST_MPL_ASSERT with BOOST_STATIC_ASSERT
BOOST_MPL_ASSERT is causing warnings in the PGI compiler. Apparently,
when BOOST_MPL_ASSERT succeeds it declares a static object with a unqiue
name scoped to the file. The problem is that the PGI compiler is pretty
picky about things being declared without being used, so it was emitting
useless warnings about successful BOOST_MPL_ASSERTs. However,
BOOST_STATIC_ASSERT does not seem to have this problem, so for the benefit
of PGI change the compile-time assert method.
2015-08-14 21:16:12 +00:00
Robert Maynard
ab59e34a2f Rename pragma header guard so it makes sense for tbb and thrust.
Boost is not the only thirdparty that we are supressing warnings for, so
make the name more generic.
2015-08-13 09:04:23 -04: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
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
21b3b318ba Always disable conversion warnings when including boost header files
On one of my compile platforms, GCC was giving conversion warnings from
any boost include that was not wrapped in pragmas to disable conversion
warnings. To make things easier and more robust, I created a pair of
macros, VTKM_BOOST_PRE_INCLUDE and VTKM_BOOST_POST_INCLUDE, that should
be wrapped around any #include of a boost header file.
2015-07-30 17:40:40 -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
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
e4423944a2 CellSet's now hold logical structure by value, instead of by pointer. 2015-05-29 09:07:40 -04:00
Dave Pugmire
e1bbda8cae Add PrintSummary() for DataSet. 2015-05-20 15:26:10 -04:00
Jeremy Meredith
8a382f138a fleshing out cell set and data set more. 2015-05-11 16:54:16 -04:00
Jeremy Meredith
1629045986 adding initial cell set structures 2015-04-15 12:43:12 -04:00