OpenCMISS-Iron Internal API Documentation
maths.f90 File Reference

This module contains all mathematics support routines. More...

Go to the source code of this file.

## Data Types

interface  maths::cross_product
Calculates the vector cross product of two vectors. More...

interface  maths::crossproduct
Calculates the vector cross product of two vectors. More...

interface  maths::d_cross_product
Calculates the the vector cross product of A*B in C and the N derivatives, D_C, of the vector cross product given the derivatives D_A and D_B of A and B. More...

interface  maths::dcrossproduct
Calculates the the vector cross product of a x b in c and the n derivatives, dc, of the vector cross product given the derivatives da and db of a and b. More...

interface  maths::determinant
Returns the determinant of a matrix. More...

interface  maths::edp
Calculates the elliptic integral of the second kind - E(m). More...

interface  maths::eigenvalue
Returns the eigenvalues of a matrix. More...

interface  maths::eigenvector
Returns the eigenvectors of a matrix. More...

interface  maths::i0
Calculates the modified Bessel function of the first kind of order 0 using the approximation of Abromowitz and Stegun. More...

interface  maths::i1
Calculates the modified Bessel function of the first kind of order 1 using the approximation of Abromowitz and Stegun. More...

interface  maths::invert
Returns the inverse of a matrix. More...

interface  maths::k0
Calculates the modified Bessel function of the second kind of order 0 using the approximation of Abromowitz and Stegun. More...

interface  maths::k1
Calculates the modified Bessel function of the second kind of order 1 using the approximation of Abromowitz and Stegun. More...

interface  maths::kdp
Calculates the elliptic integral of the first kind - K(m). More...

interface  maths::identitymatrix
Returns the identity matrix. More...

interface  maths::l2norm
Returns the L2 norm of a vector. More...

interface  maths::matrix_product
Calculates and returns the matrix-product A*B in the matrix C. More...

interface  maths::matrixproduct
Calculates and returns the matrix-product A*B in the matrix C. More...

interface  maths::matrixtransposeproduct
Calculates and returns the matrix-transpose product A^T*B in the matrix C. More...

interface  maths::matrixproducttranspose
Calculates and returns the matrix-product-transpose A*B^T in the matrix C. More...

interface  maths::matrix_transpose
Returns the transpose of a matrix A in A^T. More...

interface  maths::matrixtranspose
Returns the transpose of a matrix A in A^T. More...

interface  maths::matrix_vector_product
Calculates and returns the matrix-vector-product A*b in the vector c. More...

interface  maths::matrixvectorproduct
Calculates and returns the matrix-vector-product A*b in the vector c. More...

interface  maths::matrixtransposevectorproduct
Calculates and returns the matrix-transpose vector-product A^T*b in the vector c. More...

interface  maths::normalise
Normalises a vector. More...

interface  maths::norm_cross_product
Calculates the normalised vector cross product of two vectors. More...

interface  maths::normcrossproduct
Calculates the normalised vector cross product of two vectors. More...

interface  maths::solve_small_linear_system
Solves a small linear system Ax=b. More...

interface  maths::solvesmalllinearsystem
Solves a small linear system Ax=b. More...

interface  maths::coth
Returns hyperbolic cotangent of argument. More...

## Modules

module  maths
This module contains all mathematics support routines.

## Functions/Subroutines

subroutine maths::crossproductintg (a, b, c, err, error,)
Calculates and returns the vector cross-product of the integer vectors a x b in c. More...

subroutine maths::crossproductsp (a, b, c, err, error,)
Calculates and returns the vector cross-product of the single precision vectors a x b in c. More...

subroutine maths::crossproductdp (a, b, c, err, error,)
Calculates and returns the vector cross-product of the double precision vectors a x b in c. More...

subroutine maths::dcrossproductintg (n, a, b, c, da, db, dc, err, error,)
Calculates the the vector cross product of a x b in c and the n derivatives, dc, of the vector cross product given the derivatives da and db of a and b for integer vectors. More...

subroutine maths::dcrossproductsp (n, a, b, c, da, db, dc, err, error,)
Calculates the the vector cross product of a x b in c and the n derivatives, dc, of the vector cross product given the derivatives da and db of a and b for single precision vectors. More...

subroutine maths::dcrossproductdp (n, a, b, c, da, db, dc, err, error,)
Calculates the the vector cross product of a x b in c and the n derivatives, dc, of the vector cross product given the derivatives da and db of a and b for double precision vectors. More...

subroutine maths::matrixvectorproductsp (A, b, c, err, error,)
Calculates and returns the matrix-vector product of the single precision vector A*b in c. More...

subroutine maths::matrixvectorproductdp (A, b, c, err, error,)
Calculates and returns the matrix-vector product of the double precision vectir A*b in c. More...

subroutine maths::matrixtransposevectorproductsp (A, b, c, err, error,)
Calculates and returns the matrix-transpose vector product of the single precision vector A^T*b in c. More...

subroutine maths::matrixtransposevectorproductdp (A, b, c, err, error,)
Calculates and returns the matrix-transpose vector product of the double precision vector A^T*b in c. More...

integer(intg) function maths::determinantfullintg (A, err, error)
Returns the determinant of a full integer matrix A. More...

real(sp) function maths::determinantfullsp (A, err, error)
Returns the determinant of a full single precision matrix A. More...

real(dp) function maths::determinantfulldp (A, err, error)
Returns the determinant of a full double precision matrix A. More...

pure real(dp) function maths::edpdp (x)
Calculates the elliptic integral of the second kind - E(m), for a double precision argument. More...

pure real(sp) function maths::edpsp (x)
Calculates the elliptic integral of the second kind - E(m), for a single precision argument. More...

subroutine maths::eigenvaluefullsp (A, eValues, err, error,)
Returns the eigenvalues of a full single precision matrix A. More...

subroutine maths::eigenvaluefulldp (A, eValues, err, error,)
Returns the eigenvalues of a full double precision matrix A. More...

subroutine maths::eigenvectorfullsp (A, eValue, eVector, err, error,)
Returns the normalised eigenvector of a full single precision symmetric matrix A that corresponds to the eigenvalue eValue. More...

subroutine maths::eigenvectorfulldp (A, eValue, eVector, err, error,)
Returns the normalised eigenvector of a full double precision symmetric matrix A that corresponds to the eigenvalue eValue. More...

pure real(dp) function maths::i0dp (x)
Calculates the modified Bessel function of the first kind of order 0 using the approximation of Abromowitz and Stegun, for a double precision argument. More...

pure real(sp) function maths::i0sp (x)
Calculates the modified Bessel function of the first kind of order 0 using the approximation of Abromowitz and Stegun, for a single precision argument. More...

pure real(dp) function maths::i1dp (x)
Calculates the modified Bessel function of the first kind of order 1 using the approximation of Abromowitz and Stegun, for a double precision argument. More...

pure real(sp) function maths::i1sp (x)
Calculates the modified Bessel function of the first kind of order 1 using the approximation of Abromowitz and Stegun, for a single precision argument. More...

subroutine maths::identitymatrixsp (A, err, error,)
Returns an identity matrix. More...

subroutine maths::identitymatrixdp (A, err, error,)
Returns an identity matrix. More...

subroutine maths::invertfullsp (A, B, det, err, error,)
Inverts a full single precision matrix A to give matrix B and returns the determinant of A in det. More...

subroutine maths::invertfulldp (A, B, det, err, error,)
Inverts a full double precision matrix A to give matrix B and returns the determinant of A in det. More...

pure real(dp) function maths::k0dp (x)
Calculates the modified Bessel function of the second kind of order 1 using the approximation of Abromowitz and Stegun, for a double precision argument. More...

pure real(sp) function maths::k0sp (x)
Calculates the modified Bessel function of the second kind of order 0 using the approximation of Abromowitz and Stegun, for a single precision argument. More...

pure real(dp) function maths::k1dp (x)
Calculates the modified Bessel function of the second kind of order 1 using the approximation of Abromowitz and Stegun, for a double precision argument. More...

pure real(sp) function maths::k1sp (x)
Calculates the modified Bessel function of the second kind of order 1 using the approximation of Abromowitz and Stegun, for a single precision argument. More...

pure real(dp) function maths::kdpdp (x)
Calculates the elliptic integral of the first kind - K(m), for a double precision argument. More...

pure real(sp) function maths::kdpsp (x)
Calculates the elliptic integral of the first kind - K(m), for a single precision argument. More...

pure real(sp) function maths::l2normsp (a)
Returns the L2-norm of the single precision vector a. More...

real(dp) function maths::l2normdp (A)
Returns the L2-norm of the double precision vector a. More...

subroutine maths::matrixproductsp (A, B, C, err, error,)
Calculates and returns the matrix-product of the single precision matrix A*B in C for single precision arguments. More...

subroutine maths::matrixproductdp (A, B, C, err, error,)
Calculates and returns the matrix-product of the double precision matrix A*B in C. More...

subroutine maths::matrixtransposeproductsp (A, B, C, err, error,)
Calculates and returns the matrix-transpose product of the single precision matrix A^T*B in C for single precision arguments. More...

subroutine maths::matrixtransposeproductdp (A, B, C, err, error,)
Calculates and returns the matrix-transpose product of the double precision matrix A^T*B in C for double precision arguments. More...

subroutine maths::matrixproducttransposesp (A, B, C, err, error,)
Calculates and returns the matrix-product-transpose of the single precision matrix A*B^T in C for single precision arguments. More...

subroutine maths::matrixproducttransposedp (A, B, C, err, error,)
Calculates and returns the matrix-product-transpose of the double precision matrix A*B^T in C. More...

subroutine maths::matrixtransposesp (A, AT, err, error,)
Returns the transpose of a single precision matrix A in AT. More...

subroutine maths::matrixtransposedp (A, AT, err, error,)
Returns the transpose of a double precision matrix A in AT. More...

real(sp) function, dimension(size(a, 1)) maths::normalisesp (a, err, error)
Normalises a real single precision vector a. More...

real(dp) function, dimension(size(a, 1)) maths::normalisedp (a, err, error)
Normalises a real double precision vector a. More...

subroutine maths::normcrossproductsp (a, b, c, err, error,)
Calculates and returns the normalised vector cross-prouct of the single precision vectors a x b in c. More...

subroutine maths::normcrossproductdp (a, b, c, err, error,)
Calculates and returns the normalised vector cross-prouct of the double precision vectors a x b in c. More...

subroutine maths::solvesmalllinearsystemsp (A, x, b, err, error,)
Finds the solution to a small single precision linear system Ax=b. More...

subroutine maths::solvesmalllinearsystemdp (A, x, b, err, error,)
Finds the solution to a small double precision linear system Ax=b. More...

real(sp) function maths::cothsp (a)
Calculates single precision hyperbolic cotangent function. More...

real(dp) function maths::cothdp (a)
Calculates double precision hyperbolic cotangent function. More...

subroutine, public maths::spline_cubic_set (n, t, y, ibcbeg, ybcbeg, ibcend, ybcend, ypp, err, error,)
Calculates second derivatives of a cubic spline function for a tabulated function y(x). Call spline_cubic_val to evaluate at t values. algorithm adapted from John Burkhardt's spline_cubic_set routine from the SPLINE package (http://people.sc.fsu.edu/~jburkardt/f_src/spline/spline.html) More...

subroutine, public maths::s3_fs (a1, a2, a3, n, b, x, err, error,)
S3_FS factors and solves a tridiagonal linear system. algorithm adapted from John Burkhardt's s3_fs routine from the SPLINE package (http://people.sc.fsu.edu/~jburkardt/f_src/spline/spline.html) More...

subroutine, public maths::spline_cubic_val (n, t, y, ypp, tval, yval, ypval, yppval, err, error,)
Evaluates a cubic spline at a specified point. First call spline_cubic_set to calculate derivatives algorithm adapted from John Burkhardt's spline_cubic_val routine from the SPLINE package (http://people.sc.fsu.edu/~jburkardt/f_src/spline/spline.html) More...

## Detailed Description

This module contains all mathematics support routines.

Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is OpenCMISS

The Initial Developer of the Original Code is University of Auckland, Auckland, New Zealand, the University of Oxford, Oxford, United Kingdom and King's College, London, United Kingdom. Portions created by the University of Auckland, the University of Oxford and King's College, London are Copyright (C) 2007-2010 by the University of Auckland, the University of Oxford and King's College, London. All Rights Reserved.

Contributor(s): Kumar Mithraratne

Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.

Definition in file maths.f90.