Commit Graph

874 Commits

Author SHA1 Message Date
Jeremy Meredith
8999567dd2 fixing 2d structured connectivity calc for logical point indices. 2015-08-28 16:48:24 -04:00
Jeremy Meredith
3eff4022c4 Merge branch 'shape-clip-merge' into 'master'
Update clip and external faces with shape changes

See merge request !151
2015-08-28 16:06:44 -04:00
Kenneth Moreland
89c72c9975 Update clip and external faces code to new cell shapes
The names of the cell shapes and header files changed superficially. The
check in missed the clip and external faces. Update that code.

There are also some less superficial changes that allow you to manage
cell shapes with tags. It might be worthwhile to update this code to use
that new infrastructure.
2015-08-28 12:48:00 -06:00
Kenneth Moreland
688eafe5f8 Tests catch STL exceptions and report on their names. 2015-08-28 12:19:46 -06:00
Sujin Philip
7f0ab06600 Merge topic 'add-custom-operator-exclusive-scan'
514ac54e Add custom operator and initial value support to ExclusiveScan

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !148
2015-08-28 14:15:39 -04:00
Kenneth Moreland
827b58a8f2 Merge branch 'shape-specific-functions' into 'master'
Shape specific functions

These changes support creating methods that are specific to cell shape in worklets (issue #27).

See merge request !149
2015-08-28 13:21:21 -04:00
Sujin Philip
514ac54e59 Add custom operator and initial value support to ExclusiveScan 2015-08-28 09:56:04 -04:00
Robert Maynard
af5c9fb334 Merge branch 'add-external-faces' into 'master'
Add external faces

A working implementation of the External Faces algorithm, along with a unit test to verify correctness on a simple mesh of tetrahedron cells.

See merge request !131
2015-08-28 09:13:36 -04:00
Kenneth Moreland
33edcc940d Make sure variables are initialized in error conditions
There are several switch statements in ParametricCoordinates.h that have
a default clause that is an error condition. The code was simply calling
the RaiseError method on the worklet before quiting. Although the
behavior is supposed to be similar to throwing an exception, flow
actually does still continue. These error default clauses kept going
without breaking from the switch or initializing the variables the
method is supposed to set. Although the values should not matter once
the error is raised, I was getting compiler warnings about it. It's also
bad practice as certain NaN values can cause the program to signal out,
so it is best to set the data to something.
2015-08-27 22:13:19 -06:00
Kenneth Moreland
9abaf0190f Fix gcc warnings
Fixed some gcc warnings about unused scoped typedefs and implicit
conversion issues.
2015-08-27 17:39:45 -06:00
Kenneth Moreland
47818553cb Forgot to add export macro to CellShapeTagGeneric
That caused an error when used in CUDA.
2015-08-27 17:34:28 -06:00
Kenneth Moreland
947178e7e4 Remove pixel and voxel cell types
These cell types are inherited from VTK, but they are basically the same
as quad and hexahedron, respectively. The only useful difference is that
pixel and voxel are supposed to be axis aligned, but you cannot
determine that by the cell shape alone (at least not just from the cell
set).

A big issue with these is that their indexing is different that of quad
and hex. The development team had a long discussion about the benefits
of the alternate indexing, but after consulting with Berk Geveci and
Will Schroder from the VTK team, that indexing is not really taken
advantage of at the cell level. Thus, it is really just a nuisance in
VTK-m.
2015-08-27 17:03:13 -06:00
Kenneth Moreland
ed6ff1e931 Return VecVariable when getting cell to point in structured
When getting cell indices in a cell to point structured connectivity, it
was previously returning a vtkm::Vec of the maximum size and setting
invalid indices to -1. This is changed to vtkm::VecVariable, which will
reflect the actual number of indices.

I thought I made this change a while ago, but I guess I missed it.
2015-08-27 16:49:24 -06:00
Kenneth Moreland
fe65124922 Change the way polygons are interpolated.
The original way was overconstrained with respect to the number of
parametric coordinates.

Also implemented WorldCoordinatesToParametricCoordinates for polygons.
2015-08-27 16:31:08 -06:00
Kenneth Moreland
5bcad152e0 WorldCoordinatesToParametricCoordinates functions
The general polygon version is not implemented yet because I need to
change the way it is interpolated.

To get wedge to work correctly, I had to change the interpolation
slightly there. Previously the interpolation had a singularity at
the tip.
2015-08-27 16:31:07 -06:00
Kenneth Moreland
936bbd33d0 Add Newton's Method function. 2015-08-27 16:31:07 -06:00
Kenneth Moreland
a7c33b5c07 Make cell code more consistent.
The functions for doing interpolations and derivatives were called
CellInterpolate and CellDerivative, but the file names were
Interpolate.h and Derivative. Now the files are CellInterpolate.h and
CellDerivative.h so they are more consistent and a bit easier to find.

The interpolate and derivative functions has the shape tag at end of the
function arguments (just before the "worklet" parameter, which is just
the error handling mechanism). However, the parametric coordinate
functions had the shape tag at the beginning. Moved the shape tag to the
end to be more consistent within these functions and also in other uses
throughtout VTK-m.
2015-08-27 16:31:07 -06:00
Kenneth Moreland
457720bd63 Add derivative functions. 2015-08-27 16:31:07 -06:00
Kenneth Moreland
5a896c6ce7 Add tests for interpolate functions.
Also tests the current parametric coordinates methods. The added test
lead to some minor corrections and additions.
2015-08-27 16:31:06 -06:00
Kenneth Moreland
29766bd3a2 Add queries for standard parametric coordinates.
Be able to get the parametric coordinates for the center and the nodes
of each cell shape.
2015-08-27 16:31:06 -06:00
Kenneth Moreland
9551824c8e Add methods to interpolate all cell types. 2015-08-27 16:31:06 -06:00
Kenneth Moreland
3e251de469 The CellShape fetch returns a tag rather than ID.
Previously, when you requested a CellShape in the ExecutionSignature,
you just got an ID stored in a vtkm::IdComponent. This change returns a
cell shape tag of the appropriate type (or generic if the type is not
known at compile time). This will allow functions called from the
worklet to specialize on the cell type better.
2015-08-27 16:31:06 -06: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
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
c4ede29b2c Removed uneeded typedef from ExternalFaces.h 2015-08-27 16:46:35 -04:00
Robert Maynard
22172a227b Update to handle the new WorkletMapTopologyPointToCell type. 2015-08-27 16:43:32 -04:00
Robert Maynard
55a11c4551 Merge branch 'master' into add-external-faces
Conflicts:
	vtkm/worklet/CMakeLists.txt
	vtkm/worklet/testing/CMakeLists.txt
2015-08-27 16:40:36 -04:00
Sujin Philip
68931a0d8a Merge topic 'fix-clip-constexpr-error'
310b80e0 Fix const expression error in VS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !147
2015-08-27 16:32:36 -04:00
Sujin Philip
310b80e09a Fix const expression error in VS 2015-08-27 16:09:37 -04:00
Sujin Philip
ca1add2bb6 Merge topic 'add-WorkletMapTopologyPointToCell'
cef966bc Add convenience class WorkletMapToplogyPointToCell

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !146
2015-08-27 16:08:42 -04:00
Sujin Philip
cef966bc5b Add convenience class WorkletMapToplogyPointToCell 2015-08-27 15:21:19 -04:00
Robert Maynard
81590709cb Merge topic 'print-summary-coordinates'
9cd8cb22 Make PrintSummary actually work for Field and CoordinateSystem.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !144
2015-08-27 13:18:47 -04:00
Sujin Philip
8530197ff1 Merge topic 'add-clip-implementation'
e3815220 Clip worklets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !130
2015-08-27 12:42:00 -04:00
Kenneth Moreland
9cd8cb22eb Make PrintSummary actually work for Field and CoordinateSystem.
The PrintSummary for CoordinateSystem went in an infinite loop. It was
supposed to call PrintSummary of its superclass (Field), but instead it
called itself.

The PrintSummary for Field only worked for fields of type vtkm::Float32.
To make it work for all array types, I added a PrintSummary method to
DynamicArrayHandle, and Field calls that without trying to cast to a
static type.
2015-08-27 10:20:30 -06:00
Robert Maynard
a9190e79e9 Merge branch 'suppress_glut_deprecation' into 'master'
Suppress deprecation warnings about glut as we investigate our options.

Starting in OSX 10.9, apple has deprecated the glut.h provided header
so we need to figure out how we want to do window management on OSX. I expect
the way forward is to require the developer to install openGLUT.

See merge request !142
2015-08-27 10:01:46 -04:00
Robert Maynard
78cef0c33d Suppress deprecation warnings about glut as we investigate our options.
Starting in OSX 10.9, apple has deprecated the glut.h provided header
so we need to figure out how we want to do window management on OSX. I expect
the way forward is to require the developer to install openGLUT.
2015-08-27 09:37:13 -04:00
Jeremy Meredith
22e6de6312 Merge branch 'newtopology' into 'master'
templating topology worklet to support mappings other than point-to-cell

This adds a FromTopology and ToTopology template type to the topology worklet, removing hard-coded types.

This is a precursor step necessary before we can add other mappings (like cell-to-point, etc.).

See merge request !140
2015-08-26 15:27:36 -04:00
Sujin Philip
e38152206a Clip worklets 2015-08-26 15:21:25 -04:00
Jeremy Meredith
e1f08d4eeb two small code fixes. 2015-08-26 14:51:20 -04:00
Robert Maynard
fe7a202813 Merge branch 'correct_line_endings' into 'master'
Update all of the opengl folder to use the correct line-endings.

Previously they had been comitted with Windows line endings.

See merge request !143
2015-08-26 14:09:24 -04:00
Robert Maynard
944cd6111f Update all of the opengl folder to use the correct line-endings.
Previously they had been comitted with Windows line endings.
2015-08-26 12:30:15 -04:00
Robert Maynard
619103b202 Update cuda ScanExclusive to handle dereferencing device only arrays. 2015-08-26 11:51:02 -04:00
Robert Maynard
38ed239ed0 Update ExternalFaces to the new CoordinateSystem design. 2015-08-26 08:49:17 -04:00
Robert Maynard
e583d0f7d8 Merge branch 'master' into add-external-faces 2015-08-26 08:23:26 -04:00
Kenneth Moreland
e30bff00da Merge branch 'coordinate-systems-separate' into 'master'
Coordinate systems separate from fields

Fields for coordinate systems have some common patterns that are not common for other fields. To allow us to specialize and optimize for point coordinate fields, store them in a separate field list.

See merge request !137
2015-08-25 18:04:04 -04:00
Robert Maynard
bc6ed6f6ad Merge branch 'opengl_interop_warnings' into 'master'
Correct unsigned to signed warning in TestingOpenGLInterop.

See merge request !141
2015-08-25 17:43:47 -04:00
Robert Maynard
611cc4d06b Correct unsigned to signed warnings in opengl interop code. 2015-08-25 17:36:31 -04:00
Kenneth Moreland
91db8ad06f Remove PointCoordinates classes
The idea of the PointCoordinate classes was to make it easier to define
new special types of point coordinate arrays. But ultimately you have to
create an array handle type, and the CoordinateSystem class pretty much
handles everything else for you. Thus, these classes where being used
nowhere.
2015-08-25 14:38:50 -06:00
Kenneth Moreland
a99f828ca3 CoordinateSystem handles uniform point coordinates.
The point of making CoordinateSystem a special type of Field object
was so that it could handle special array types like implicit regular
point coordinates. Overload the GetData and GetBounds methods to
properly handle this type of array.
2015-08-25 14:38:50 -06:00