Commit Graph

25 Commits

Author SHA1 Message Date
Kenneth Moreland
e9ba5bf8c7 Add math section to users guide 2024-02-20 11:03:04 +09:00
Kenneth Moreland
e4ae3cee1b Avoid floating point exception in Orthonormalize 2021-07-12 10:29:46 -06:00
Nick Thompson
8d54138d3e Kahan's difference of products algorithm 2021-04-05 15:20:56 -04:00
Kenneth Moreland
9bbf4a5a61 Corrections and expanded testing of implicit functions
There were some errors in the ImplicitFunction classes. Fix the errors
found and expand TestingImplicitFunction.h to cover more cases.
2019-08-15 17:25:41 -06:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
David Thompson
880d8a989e Add vtkm/Geometry.h and test it.
This commit adds several geometric constructs to vtk-m
in the `vtkm/Geometry.h` header. They may be used from
both the execution and control environments.

We also add methods to perform projection and Gram-Schmidt
orthonormalization to `vtkm/VectorAnalysis.h`.

See `docs/changelog/geometry.md` included in this commit
for more information.
2018-06-20 11:58:14 -04: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
Robert Maynard
83b360f1ea vtkm::Lerp now casts integer types to an appropriate scalar type.
Previously types such as vtkm::Id or vtkm::U/Int32 would be cast to whatever
the weight type was. This is problematic as they should actually be casted to
a double type as the weight type could be a float and therefore the results
2018-04-04 11:00:12 -04:00
Robert Maynard
601a839d5d VTK-m uses static const/constexpr when supported ( so not on cuda 7.5 )
These changes now allow VTK-m to compile on CUDA 7.5 by using const arrays,
when compiling with CUDA 8+ support we upgrade to static const arrays, and
lastly when CUDA is disabled we fully elevate to static constexpr.
2018-02-26 16:41:29 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Robert Maynard
a9e64c4ba8 FloatPointReturnType is float if 'T' is < 32bytes instead of being double.
Previously FloatPointReturnType would always be double for types that
are not float, which caused Int8/Int16 types to promote to double instead
of float.
2018-01-04 13:22:31 -05: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
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
Thomas J. Otahal
70e145fd83 Attempt to fix Visual Studio 2013/2015 warning message 2017-02-07 07:41:38 -07:00
Thomas J. Otahal
f1300c6143 Changed vtkm::Abs() to return input type 2017-02-06 15:50:13 -07:00
Thomas J. Otahal
7d6601d794 Modified Math.h.in and VectorAnalysis.h to support integral types.
Unary operations on scalars and vectors will return vtkm::Float64 for
integral input types and vtkm::Float64 input types. Unary operations will
return vtkm::Float32 for vtkm::Float32 input vectors and scalars.
2017-01-26 13:30:28 -07:00
Thomas J. Otahal
556b922733 Created a filter for the vector magnitude worklet.
Modified the vector magnitude worklet to accept VecAll instead
of Vec3 and return Scalar. Modified the Magnitude() and Sqrt() functions
to return FloatDefault for all inputs except for Float64.

Perhaps we should modify other functions in Math.h and VectorAnalysis.h to
return float types for intergral arguments instead of integral types?
2017-01-19 13:27:42 -07: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
Chuck Atkins
af7bba062a Refactor liner interpolation to use (1-w)*v0+w*v1
Using v0+w*(v1-v0) can be numerically unstaqble due to floating point
arithmatic errors.  Additionaly, the newer form also resolves type
conversion warnings.
2016-03-18 10:54:56 -04:00
Christopher Meyer Sewell - 188584
30100e2ae8 Adding examples directory with isosurface rendering example 2015-09-01 17:09:36 -06:00
Robert Maynard
7db2df8ed9 Make sure the vtkm::Magnitude can be used from worklets. 2015-08-31 22:49:53 -04: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
3350c0da38 Add basic vector analysis methods. 2015-07-07 14:25:58 -06:00