PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Public Member Functions | List of all members
num_utilities::calc_det Interface Reference

Calculate determinant of a matrix. More...

Public Member Functions

integer function calc_det_0d (det_0D, A)
 private constant version More...
 
integer recursive function calc_det_3d (detA, A, n)
 private array version More...
 

Detailed Description

Calculate determinant of a matrix.

This matrix can be defined on a 3-D grid or constant. The storage convention described in eq_vars.eq_2_type is used.

In the former case the size of the matrix (last two indices) should be small, as the direct formula employing cofactors is used through a recursive formulation.

In the latter case, lapack routines are used.

See also
Adapted from http://dualm.wordpress.com/2012/01/06/computing-determinant-in-fortran/
Returns
ierr

Definition at line 63 of file num_utilities.f90.

Member Function/Subroutine Documentation

◆ calc_det_0d()

integer function num_utilities::calc_det::calc_det_0d ( real(dp), intent(inout)  det_0D,
real(dp), dimension(:,:), intent(in)  A 
)

private constant version

Parameters
[in,out]det_0doutput
[in]ainput

Definition at line 622 of file num_utilities.f90.

◆ calc_det_3d()

integer recursive function num_utilities::calc_det::calc_det_3d ( real(dp), dimension(:,:,:), intent(inout)  detA,
real(dp), dimension(:,:,:,:), intent(in)  A,
integer, intent(in)  n 
)

private array version

Parameters
[in,out]detaoutput
[in]ainput
[in]nsize of matrix

Definition at line 543 of file num_utilities.f90.

+ Here is the call graph for this function:

The documentation for this interface was generated from the following file: