Commit Graph

114 Commits

Author SHA1 Message Date
Sujin Philip
334262db16 Fix Field constructors
1. Add option to copy user supplied array in make_ArrayHandle.
2. Replace Field constructors that take user supplied arrays with make_Field.
3. Replace CoordinateSystem constructors that take user supplied arrays with
   make_CoordinateSystem.
2017-12-21 12:48:15 -05:00
Matthew Letter
fac43bd812 Merge branch 'master' into cmake_refactor 2017-11-28 13:36:02 -07:00
Matthew Letter
fa333d3b48 adding check for enable benchmarks #3
forgot to add in the check for VTKm_ENABLE_BENCHMARKS when building benchmarks
2017-11-16 16:21:58 -07:00
Sujin Philip
8c242cef91 Switch from faux to true virtuals 2017-11-06 15:25:29 -05:00
Matthew Letter
79ef8f4b47 added benchmarking into cmake list 2017-10-31 17:01:45 -06:00
Robert Maynard
3ded554831 Extend the CMake rewrite to include vtkm_rendering 2017-10-27 15:29:58 -04:00
Robert Maynard
56c7362258 A thought on what CMake 3.9 would mean to VTK-m. 2017-10-27 15:29:51 -04:00
Allison Vacanti
75f88b4c46 Add versioning to VTKM installed include/share dirs. 2017-10-02 11:39:10 -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
Robert Maynard
5ec6d8fd13 Merge topic 'for-vtk'
2f2909f7 Add support for containing project to override default install locations
0dbf776b Use VTKm_BINARY_DIR relative path to find headers to install
a481671c Configure files to VTKm_BINARY_DIR-based paths
16720937 Avoid redefining CMake default variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !889
2017-08-31 11:52:05 -04:00
Shawn Waldon
0dbf776b76 Use VTKm_BINARY_DIR relative path to find headers to install 2017-08-28 11:38:31 -04:00
Shawn Waldon
a481671c5b Configure files to VTKm_BINARY_DIR-based paths 2017-08-28 11:38:31 -04:00
Kenneth Moreland
fc7b90aca6 Add hash function
Based on the FNV-1a algorithm. Creates 32-bit hashes.
2017-08-24 10:02:18 -06:00
David C. Lonie
fb2d36be1e Refactor VecRectilinearPointCoordinates.
See #163.
2017-07-07 13:49:35 -04:00
Sujin Philip
d618728356 Add vtkm::RangeId and vtkm::RangeId3 2017-05-30 16:32:52 -04:00
Sujin Philip
82d02e46ef Modify ImplicitFunctions to use Virtual Methods 2017-05-01 16:55:59 -04:00
Sujin Philip
b455636bcd Move BaseComponentOf to vtkm::BaseComponent 2017-03-07 14:46:55 -05:00
Kenneth Moreland
a671963834 Add Version.h header file
This allows source files to use the VTK-m version.

Note that Configure.h does not include the version. This is intentional.
First, I don't want the entirety of VTK-m to recompile every time the
version is updated (which is every time a commit happens in git).
Second, it is important that external project source files be able to
get the VTK-m version without actually loading any VTK-m code.
2017-01-26 10:33:42 -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
039efd6b7e Fix some issues with OpenGL configuration
Change the OpenGL configuration to require GLEW as most of the OpenGL
code actually requires GLEW (or will as soon as the VBO branch gets
merged in).

Also removed some stray find_package commands and rearranged the
configuration to use the vtkm_configure_component_* commands instead.
2016-10-03 17:34:15 -06:00
Kenneth Moreland
c1de0e0746 Change VTKm_BUILD_RENDERING to VTKm_ENABLE_RENDERING
This makes the name more consistent with the names of the other VTK-m
CMake options.

Also changed the default to be ON. I do not see a big downside to
compiling the rendering library most of the time.
2016-09-21 14:38:00 -06:00
Kenneth Moreland
866c617cbf Fix config issues with headers and libraries
There were a couple of places where the configure scripts did not add
either includes to VTKm_INCLUDE_DIRS or libraries to VTKm_LIBRARIES.

The biggest offender was when the examples used find_package to load the
VTK-m configuration it needed. find_package cleared out the includes and
libraries, but it did not clear out the VTKm_<COMPONENT>_FOUND
variables. Normally, these variables would not be set before
find_package is called, but in this case the examples were called after
some partial configuration. I got around this issue by clearing out all
the *_FOUND variables in VTKmConfig.cmake.
2016-08-23 14:07:38 -06:00
Kenneth Moreland
cdeeda67bb Make a shared header of 3D transformations
Affine transformations of homogeneous coordinates using 4x4 matrices are
quite common in visualization. Create a new math header file in the base
vtkm namespace that has common functions for such coordinates.

Much of this implementation was taken from the rendering matrix helpers.
2016-06-09 13:34:29 -06:00
Kenneth Moreland
d75857d0bc Add Bounds struct
This is a simple struct that defines min and max values over X, Y, and Z
to define an axis-aligned bounding box.
2016-05-29 18:49:36 -06:00
Kenneth Moreland
b358fcb19f Add Range struct
This is a simple struct that has a min and max scalar value to represent
a range of scalar values. It also comes with several helper methods.
2016-05-29 18:49:36 -06:00
Kenneth Moreland
2ddad8bcc5 Add POSIX assert wrapper
Add in the vtkm namespace an assert macro (technically VTKM_ASSERT) that
basically replicates the functionality of the POSIX assert macro. This
form of assert is set to replace the separate control/exection asserts.

It has been decided that an assert that throws an exception instead of
terminating the program is not all that great of a feature and it causes
some limitations on how it is used. The next commit will remove the
other forms of VTK-m assert.
2016-04-20 14:19:22 -06:00
Kenneth Moreland
c503e0ce8a Move NewtonsMethod to the vtkm package
All the other math functions are in the vtkm package. This one was in
vtkm::exec because it uses a callback method. This can be problematic on
CUDA the the declaration of NewtonsMethod does not match the callback
method. However, we now have a VTKM_SUPPRESS_EXEC_WARNINGS macro that
allows a VTKM_EXEC_CONT_EXPORT function (like NewtonsMethod) to call
either a VTKM_EXEC_EXPORT or VTKM_CONT_EXPORT without a warning.
2016-04-14 14:36:02 -06:00
Robert Maynard
1ec3bc0e7a Rename the opengl folder / namespace to interop.
To clarify what functionality the classes inside provide.
2016-04-13 15:52:15 -04:00
Dave Pugmire
294b73e00e Make the rendering part of the build optional.
Add the mesa libs to the link line.
2016-03-28 08:51:36 -04:00
mclarsen
03a95c44b1 adding rendering from other branch 2016-03-28 08:50:04 -04:00
Kenneth Moreland
316ccc04a9 Remove the Extent class and related functions.
We have decided that we do not need the concept of an Extent in our data
model. Instead, we simply use dimensions, which can be represented in a
vtkm::Id3.
2016-03-22 15:41:42 -06:00
Robert Maynard
bcee827097 First draft of vtkm::filter design. 2016-03-14 08:39:17 -04:00
Jeremy Meredith
a78e735b3c adding VTK file exporter and test cases. 2015-10-22 17:18:33 -04:00
Sujin Philip
5ea70b6ddd Add implicit functions 2015-10-08 09:32:14 -04: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
429f9c0cb7 Add VecRectilinearPointCoordinates class
This class implicitly stores the point coordinates for a rectilinear
cell (such as a voxel) with just the location of the lower left point
and the spacing in each dimension. In addition to saving space, this
class should allow cell-specific functions to specialize for faster
processing.
2015-09-02 13:50:31 -07:00
Kenneth Moreland
f5f5523c25 Add CellTraits class
Currently it is pretty empty. It might make sense to roll this into the
CellShapeTag, but we may add more information later.
2015-08-27 16:31:05 -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
hschroot
d943348060 CMake configuration definitions to enable OpenGL Interop
Copy all OpenGL interop related configurations from the DAX CMake files
2015-08-21 11:17:10 -07:00
Kenneth Moreland
da2e601b6a Add VecVariable
This class holds a Vec and exposes some number of components. The class
is used when you need a Vec of a size that is not known at compile time
but that a maximum length of reasonable size is known.
2015-08-14 09:15:46 -06:00
Kenneth Moreland
c5c1dee4fc Merge branch 'clean-up-cell-set' into 'master'
Clean up CellSet

Underneath the CellSet implementation is a set of supporting classes that manage the actual structure in both the control and execution environments. However, the implementation of these classes was a bit confusing and inconsistent. The following changes are made:

* Most significantly, there is no longer any Connectivity classes in the control environment. This functionality has been wrapped up into the CellSet classes, which is more consistent and easier to understand. (There was a definite distinction between CellSet and Connectivity, but it was subtle and difficult to understand.) This also means that edits to CellSets happen to CellSets directly.

* The set of classes for structured and explicit cell sets match. There is different functionality within, but the class naming and meaning are consistent.

* Make the class names more consistent with the rest of VTK-m class names. Specifically classes like ExplicitConnectivity become ConnectivityExplicit. Also, the words regular and structured were being used interchangeably. Now, always use structured except when dealing specifically with grids of regular spacing.

* The connectivity classes were using the nomenclature "From" and "To" to specify topological elements of links. The same concept in worklet classes were using the nomenclature "Src" and "Dest."  For consistency, all references are changed to "From" and "To".

* Unlike explicit cell sets, structured cell sets have functionality shared between control and execution environments. Rather than duplicate it or create unique exposed classes, have a shared internal implementation in vtkm::internal.

See merge request !117
2015-08-11 19:44:10 -04:00
Robert Maynard
8839e8a019 Add vtkm/BinaryOperators header.
Currently includes the following predicates:
  - Sum
  - Product
  - Maximum
  - Minimum
  - BitwiseAnd
  - BitwiseOr
  - BitwiseXor
2015-08-04 16:55:53 -04:00
Robert Maynard
f20b1ea99a Add vtkm/BinaryPredicates header.
Currently includes the following predicates:
  - Equal
  - NotEqual
  - SortLess
  - SortGreater
  - LogicalAnd
  - LogicalOr
2015-08-04 16:55:53 -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
b392dc509e Move RegularStructure to ConnectivityStructuredInternals
Also moved from vtkm namespace to vtkm::internal namespace. This change
is to then move the structured connectivity classes to the cont and exec
namespaces.
2015-07-31 15:48:06 -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
Robert Maynard
d3fd571ef2 Add vtkm/UnaryPredicates header.
Currently includes the following predicates:
  - IsDefaultConstructor
  - NotDefaultConstructor
  - LogicalNot
2015-07-30 13:12:59 -04:00
Will Usher
238d4fa759 Adding micro benchmark suite 2015-07-09 13:56:06 -06:00
Kenneth Moreland
3350c0da38 Add basic vector analysis methods. 2015-07-07 14:25:58 -06:00
Kenneth Moreland
abcc6da52f Add Matrix class.
The matrix class is for thread-local matrix computations. It is intended
to store things like tensors or geometric transforms.
2015-07-02 11:20:21 -06:00
Kenneth Moreland
b4a4534dbe Introductory pyexpander macros for Math functions 2015-06-22 14:19:10 -06:00
Robert Maynard
7f2ee8d050 Merge branch 'master' into datamodel-design 2015-06-03 14:36:53 -04:00
Robert Maynard
7552509e4b Include all the new DataSet header in CMakeLists.
This will make sure that we properly install these headers.
2015-05-29 12:07:46 -04:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Dave Pugmire
5ddc1230bd Make regular conn/struct cont and export. Update other files to reflect the changes. 2015-05-15 15:29:55 -04:00
Kenneth Moreland
b78688f4f4 Add ability to zip function interface objects.
The zip capability allows you to parameter-wise combine two
FunctionInterface objects. The result is another FunctionInterface with
each parameter a Pair containing the respective values of the two
inputs.

Being able to zip allows you to do transforms and invokes on data that
is divided among multiple function interface objects.
2014-10-16 16:31:55 -06:00
Kenneth Moreland
01d6619774 Add basic worklet superclasses and signature tags 2014-10-15 15:47:39 -06:00
Kenneth Moreland
c3fbe073e8 Change VectorTraits to VecTraits.
Matches the previous move from Tuple to Vec. We can unify on this name.
2014-10-08 10:09:43 -06:00
Kenneth Moreland
b692cb3d89 Add CMake configuration for execution environment code 2014-06-10 11:14:11 -06:00
Kenneth Moreland
ff31afca3e Merge branch 'composite-vector-array' into dynamic-point-coordinates 2014-05-14 14:26:23 -06:00
Kenneth Moreland
5cb4934279 Add Extent classes. 2014-04-30 17:07:57 -06:00
Kenneth Moreland
c2d926fa49 Add tag-based type list templates
Provies a list of types in a template like boost::mpl::vector and a
method to call a functor on each type. However, rather than explicitly
list each type, uses tags to identify the list. This provides the
following main advantages:

1. Can use these type lists without creating horrendously long class
names based on them, making compiler errors easier to read. For example,
you would have a typename like MyClass<TypeListTagVectors> instead of
MyClass<TypeList<Id3,Vector2,Vector3,Vector4> > (or worse if variadic
templates are not supported). This is the main motivation for this
implementation.

2. Do not require variadic templates and usually few constructions. That
should speed compile times.

There is one main disadvantage to this approach: It is difficult to get
a printed list of items in a list during an error. If necessary, it
probably would not be too hard to make a template to convert a tag to a
boost mpl vector.
2014-03-31 17:45:52 -06:00
Robert Maynard
a94abd7a71 Add in the minimum part of the control env to have a testable array handle. 2014-02-10 15:00:17 -05:00
Robert Maynard
24f561f0fe Add testing support to vtkm, and add tests for primitive types. 2014-02-10 15:00:17 -05:00