skip to main content
research-article
Public Access

MultiZ: A Library for Computation of High-order Derivatives Using Multicomplex or Multidual Numbers

Published: 13 July 2020 Publication History

Abstract

Multicomplex and multidual numbers are two generalizations of complex numbers with multiple imaginary axes, useful for numerical computation of derivatives with machine precision. The similarities between multicomplex and multidual algebras allowed us to create a unified library to use either one for sensitivity analysis. This library can be used to compute arbitrary order derivates of functions of a single variable or multiple variables. The storage of matrix representations of multicomplex and multidual numbers is avoided using a combination of one-dimensional resizable arrays and an indexation method based on binary bitwise operations. To provide high computational efficiency and low memory usage, the multiplication of hypercomplex numbers up to sixth order is carried out using a hard-coded algorithm. For higher hypercomplex orders, the library uses by default a multiplication method based on binary bitwise operations. The computation of algebraic and transcendental functions is achieved using a Taylor series approximation. Fortran and Python versions were developed, and extensions to other languages are self-evident.

References

[1]
A. H. Al-Mohy and N. J. Higham. 2010. A new scaling and squaring algorithm for the matrix exponential. SIAM J. Matrix Anal. Appl. 31, 3 (2010), 970--989.
[2]
A. H. Al-Mohy and N. J. Higham. 2012. Improved inverse scaling and squaring algorithms for the matrix logarithm. SIAM J. Sci. Comput. 34, 4 (2012), C153–C169.
[3]
W. K. Anderson, J. C. Newman, D. L. Whitfield, and E. J. Nielsen. 2001. Sensitivity analysis for Navier-Stokes equations on unstructured meshes using complex variables. AIAA J. 39, 1 (2001), 56--63.
[4]
A. Cohen and M. Shoham. 2015. Application of hyper-dual numbers to multibody kinematics. J. Mechan. Robot. 8, 1 (08 2015), 011015–011015–4.
[5]
E. Deadman, N. J. Higham, and R. Ralha. 2013. Blocked Schur algorithms for computing the matrix square root. In Applied Parallel and Scientific Computing, Pekka Manninen and Per Öster (Eds.). Springer Berlin, 171--182.
[6]
E. D. Denman and A. N. Beavers. 1976. The matrix sign function and computations in systems. Appl. Math. Comput. 2, 1 (1976), 63--94.
[7]
J. A. Fike and J. J. Alonso. 2011. The development of hyper-dual numbers for exact second-derivative calculations. In Proceedings of the 49th AIAA Aerospace Sciences Meeting Including the New Horizons Forum and Aerospace Exposition (Aerospace Sciences Meetings), Vol. 886. Orlando, FL.
[8]
J. Garza. 2014. Multicomplex Variable Differentiation in Probabilistic Analysis and Finite Element Models of Structural Dynamic Systems (Accession no. 3670563). Doctoral Dissertation, The University of Texas at San Antonio. ProQuest Dissertations Publishing.
[9]
J. Garza and H. Millwater. 2015. Multicomplex Newmark-beta time integration method for sensitivity analysis in structural dynamics. AIAA J. 53, 5 (2015), 1188--1198.
[10]
J. Garza and H. Millwater. 2016. Higher-order probabilistic sensitivity calculations using the multicomplex score function method. Probab. Eng. Mech. 45 (2016), 1--12.
[11]
N. J. Higham. 2008. Functions of Matrices: Theory and Computation. Society for Industrial and Applied Mathematics.
[12]
P. Virtanen, R. Gommers, T. E. Oliphant, et al. 2020. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nature Methods 17 (2020), 261–272. https://doi.org/10.1038/s41592-019-0686-2.
[13]
I. L. Kantor and A. S. Solodovnikov. 1989. Hypercomplex Numbers: An Elementary Introduction to Algebras. Springer-Verlag.
[14]
G. Lantoine, R. P. Russell, and T. Dargent. 2012. Using multicomplex variables for automatic computation of high-order derivatives. ACM Trans. Math. Softw. 38, 3, Article 16 (Apr. 2012), 21 pages.
[15]
J. N. Lyness and C. B. Moler. 1967. Numerical differentiation of analytic functions. SIAM J. Numer. Anal. 4, 2 (1967), 202--210.
[16]
J. R. R. A. Martins, P. Sturdza, and J. J. Alonso. 2003. The complex-step derivative approximation. ACM Trans. Math. Softw. 29, 3 (Sept. 2003), 245--262.
[17]
M. Metcalf, J. Reid, and M. Cohen. 2011. Modern Fortran Explained. OUP Oxford.
[18]
H. Millwater, D. Wagner, A. Baines, and A. Montoya. 2016. A virtual crack extension method to compute energy release rates using a complex variable finite element method. Eng. Fract. Mech. 162 (2016), 95--111.
[19]
G. B. Price. 1990. An Introduction to Multicomplex Spaces and Functions. Taylor 8 Francis.
[20]
W. Squire and G. Trapp. 1998. Using complex variables to estimate derivatives of real functions. SIAM Rev. 40, 1 (1998), 110--112.
[21]
M. Tanaka, D. Balzani, and J. Schröder. 2016. Implementation of incremental variational formulations based on the numerical calculation of derivatives using hyper dual numbers. Comput. Meth. Appl. Mech. Eng. 301 (2016), 216--241.
[22]
The MathWorks Inc. 2017. MATLAB version 9.3.0 (R2017b). Natick, Massachusetts.
[23]
D. A. Tortorelli and P. Michaleris. 1994. Design sensitivity analysis: Overview and review. Inverse Prob. Eng. 1, 1 (1994), 71--105.
[24]
A. Voorhees, H. Millwater, and R. Bagley. 2011. Complex variable methods for shape sensitivity of finite element models. Finite Elem. Anal. Des. 47, 10 (2011), 1146--1156.
[25]
B. P. Wang and A. P. Apte. 2006. Complex variable method for eigensolution sensitivity analysis. AIAA J. 44, 12 (2006), 2958--2961.

Cited By

View all

Index Terms

  1. MultiZ: A Library for Computation of High-order Derivatives Using Multicomplex or Multidual Numbers

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Transactions on Mathematical Software
      ACM Transactions on Mathematical Software  Volume 46, Issue 3
      September 2020
      267 pages
      ISSN:0098-3500
      EISSN:1557-7295
      DOI:10.1145/3410509
      Issue’s Table of Contents
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 13 July 2020
      Online AM: 07 May 2020
      Accepted: 01 January 2020
      Revised: 01 December 2019
      Received: 01 October 2018
      Published in TOMS Volume 46, Issue 3

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Commutative hypercomplex
      2. high order derivatives
      3. hyperdual
      4. multicomplex
      5. multidual

      Qualifiers

      • Research-article
      • Research
      • Refereed

      Funding Sources

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)351
      • Downloads (Last 6 weeks)36
      Reflects downloads up to 20 Jan 2025

      Other Metrics

      Citations

      Cited By

      View all

      View Options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format.

      HTML Format

      Login options

      Full Access

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media