determinant_sym3x3 Subroutine

public subroutine determinant_sym3x3(A, det)

Uses

    • tensor
  • proc~~determinant_sym3x3~~UsesGraph proc~determinant_sym3x3 determinant_sym3x3 tensor tensor proc~determinant_sym3x3->tensor

Compute the determinant of a symmetric matrix field, given as a 6-vector, at a given grid point

FT 26.03.2021

Generalized to not be bound to the mesh

FT 07.02.2022


Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: A(jxx:jzz)

The symmetric matrix, given as a 6-vector.

double precision, intent(out) :: det

Determinant of the symmetric matrix


Called by

proc~~determinant_sym3x3~~CalledByGraph proc~determinant_sym3x3 determinant_sym3x3 proc~analyze_constraint analyze_constraint proc~analyze_constraint->proc~determinant_sym3x3 proc~integrate_baryon_mass_density integrate_baryon_mass_density proc~integrate_baryon_mass_density->proc~determinant_sym3x3 proc~read_boost_superimpose_tov_adm_id read_boost_superimpose_tov_adm_id proc~read_boost_superimpose_tov_adm_id->proc~determinant_sym3x3 proc~read_fuka_id_particles read_fuka_id_particles proc~read_fuka_id_particles->proc~determinant_sym3x3 proc~read_fuka_id_spacetime read_fuka_id_spacetime proc~read_fuka_id_spacetime->proc~determinant_sym3x3 proc~read_id_particles read_id_particles proc~read_id_particles->proc~determinant_sym3x3 proc~setup_standard_tpo_variables setup_standard_tpo_variables proc~setup_standard_tpo_variables->proc~determinant_sym3x3 interface~analyze_constraint analyze_constraint interface~analyze_constraint->proc~analyze_constraint interface~integrate_baryon_mass_density integrate_baryon_mass_density interface~integrate_baryon_mass_density->proc~integrate_baryon_mass_density interface~read_fuka_id_particles read_fuka_id_particles interface~read_fuka_id_particles->proc~read_fuka_id_particles interface~read_fuka_id_spacetime read_fuka_id_spacetime interface~read_fuka_id_spacetime->proc~read_fuka_id_spacetime interface~read_id_particles read_id_particles interface~read_id_particles->proc~read_id_particles interface~setup_standard_tpo_variables setup_standard_tpo_variables interface~setup_standard_tpo_variables->proc~setup_standard_tpo_variables program~construct_newtonian_binary construct_newtonian_binary program~construct_newtonian_binary->proc~read_boost_superimpose_tov_adm_id

Contents

Source Code


Source Code

  SUBROUTINE determinant_sym3x3( A, det )

    !****************************************************************
    !
    !# Compute the determinant of a \(3\times 3\) symmetric matrix
    !  field, given as a 6-vector, at a given grid point
    !
    !  FT 26.03.2021
    !
    !  Generalized to not be bound to the mesh
    !
    !  FT 07.02.2022
    !
    !****************************************************************

    USE tensor, ONLY: jxx, jxy, jxz, jyy, jyz, jzz, n_sym3x3

    IMPLICIT NONE

    DOUBLE PRECISION, INTENT(IN):: A(jxx:jzz)
    !# The \(3\times 3\) symmetric matrix, given as a 6-vector.
    DOUBLE PRECISION, INTENT(OUT):: det
    !! Determinant of the \(3\times 3\) symmetric matrix

    IF( SIZE(A) /= n_sym3x3 )THEN
      PRINT *, "** ERROR in determinant_sym3x3_grid in MODULE utility.", &
               " This subroutine needs an array with 6 components,",&
               " and a ", SIZE(A), "component array was given instead."
      STOP
    ENDIF

    det=   A(jxx)*A(jyy)*A(jzz) &
         + A(jxy)*A(jyz)*A(jxz) &
         + A(jxz)*A(jxy)*A(jyz) &
         - A(jxy)*A(jxy)*A(jzz) &
         - A(jxz)*A(jyy)*A(jxz) &
         - A(jxx)*A(jyz)*A(jyz)

  END SUBROUTINE determinant_sym3x3