Commit Graph

43 Commits

Author SHA1 Message Date
Kenneth Moreland
282aa82957 Add guide chapter on working with cells 2024-03-13 09:18:33 -04:00
Kenneth Moreland
3e1339f9a7 Remove deprecated features from VTK-m
With the major revision 2.0 of VTK-m, many items previously marked as
deprecated were removed. If updating to a new version of VTK-m, it is
recommended to first update to VTK-m 1.9, which will include the deprecated
features but provide warnings (with the right compiler) that will point to
the replacement code. Once the deprecations have been fixed, updating to
2.0 should be smoother.
2022-11-17 07:12:31 -06:00
Kenneth Moreland
0748725806 Make sure return value of cell operations is initialized
Even if an error condition occurs, the output parameter should be
initialized to something. This makes the behavior predicatable on error
conditions and prevents uninitialized variable warnings.
2020-03-14 00:24:13 -06:00
Kenneth Moreland
51e817adc1 Introduce vtkm::ErrorCode
This is a flag that functions in the execution environment can return to
report on the status of the operation. This way they can report an error
without forcing the entire invocation to shut down.
2020-03-13 18:58:33 -06:00
Kenneth Moreland
04edc3d202 Avoid raising errors when operating on cells
Cell operations like interpolate and finding parametric coordinates can
fail under certain conditions. Typically these call RaiseError on the
worklet. But that can make a worklet unstable, so provide paths where no
error is raised.
2020-03-12 07:50:01 -06:00
Sujin Philip
b0592ce4c8 Switch from VTK-c to LCL 2019-10-07 15:38:36 -04:00
Sujin Philip
e08d862f94 Use Light-Weight Cell Library 2019-09-24 21:22:10 -04:00
Kenneth Moreland
0be50c119d Update VTK-m code to use new Vec aliases
Should make the code easier to read.
2019-07-31 12:55:40 -06:00
Dave Pugmire
d310ec3aa6 return type is void. Call vertex/line methods, then just return. 2019-05-29 08:18:31 -04:00
Dave Pugmire
d6e2e9588e Remove debugging print statements. 2019-05-22 14:37:06 -04:00
Dave Pugmire
d7e793861b Fix compiler warnings. Comment out std::cout usage for testing with cuda. 2019-05-22 12:40:45 -04:00
Dave Pugmire
83cf50d549 Fixes for polyline parameterization. 2019-05-22 11:42:49 -04:00
Dave Pugmire
489995782f Support for polylines. 2019-05-17 13:35:35 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
David Thompson
00c7905afb Rename vtkm::dot() to vtkm::Dot().
This keeps the old name around but prepares it for removal
in the next release.
2018-05-17 08:51:01 -04:00
Sujin Philip
fdfd62d43a Improve WorldCoordinatesToParametricCoordinates
1. Add a 'FastVec' class that copies input vector types to an efficient
   Vec type on the stack. Specializations avoid copies of already efficient
   types.
2. Update 'WorldCoordinatesToParametricCoordinates' functions to utilize the
   'FastVec' class. This should improve performance when the passed in
    vectors are of slow types like 'vtkm::VecFromPortalPermute'.
3. Since most input Vec types will convert to the same 'FastVec' type this
   also reduces the code generations. Some code refactoring was required for
   this.
2018-02-05 15:52:16 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Sujin Philip
9e0650adf2 Update Newton's Method to return solution status 2017-10-10 14:01:41 -04:00
Robert Maynard
311618a15f Enable highest level of warnings(W4) under MSVC
This will make VTK-m warning level match the one used by VTK. This commit
also resolves the first round of warnings that W4 exposes.
2017-09-22 13:04:28 -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
f68635941e Convert VTK-m over to use 'using' instead of 'typedef' 2017-08-17 10:47:25 -04:00
David C. Lonie
fb2d36be1e Refactor VecRectilinearPointCoordinates.
See #163.
2017-07-07 13:49:35 -04: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
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
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
7c07afffba Reduce the compilation size of the gradient computations. 2016-11-11 14:36:51 -05:00
Robert Maynard
e5d3095102 Solve the ParametricCoordinates issue by using VTKM_ASSUME. 2016-04-28 11:15:43 -04:00
Robert Maynard
1596f403ef Silence maybe-uninitialized warnings from ParametricCoordinates.h 2016-04-27 13:11:21 -04:00
Kenneth Moreland
b87cac7492 Fix warnings about unused parameters. 2016-04-21 09:32:02 -06:00
Kenneth Moreland
cc497e6a1b Remove cont/Assert.h and exec/Assert.h
These asserts are consolidated into the unified Assert.h. Also made some
minor edits to add asserts where appropriate and a little bit of
reconfiguring as found.
2016-04-20 15:41:14 -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
e0f496ceec Fix warnings about unreachable break statement in ParametricCoordinates. 2016-04-01 15:50:52 -04:00
Chuck Atkins
f74c0d3c88 Remove type conversion related warnings for GCC 2016-03-17 13:05:38 -04:00
Kenneth Moreland
493656e419 Special implementation of parametric coordinates for rectilinear cells 2015-09-02 13:50:31 -07: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
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
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
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
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