spatial_vector_norm_sym3x3 Subroutine

public subroutine spatial_vector_norm_sym3x3(g3, v, norm)

Uses

    • tensor
  • proc~~spatial_vector_norm_sym3x3~~UsesGraph proc~spatial_vector_norm_sym3x3 spatial_vector_norm_sym3x3 tensor tensor proc~spatial_vector_norm_sym3x3->tensor

Compute the spatial squared norm of a vector, using the spatial metric given as an array of 6 components

FT 14.02.2022


Arguments

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

The spacetime metric, given as a 6-vector.

double precision, intent(in) :: v(jx:jz)

The -vector whose norm has to be computed.

double precision, intent(out) :: norm

Spatial norm of the vector v.


Called by

proc~~spatial_vector_norm_sym3x3~~CalledByGraph proc~spatial_vector_norm_sym3x3 spatial_vector_norm_sym3x3 proc~compute_adm_momentum_fluid_m2p compute_adm_momentum_fluid_m2p proc~compute_adm_momentum_fluid_m2p->proc~spatial_vector_norm_sym3x3 proc~construct_particles_std construct_particles_std proc~construct_particles_std->proc~spatial_vector_norm_sym3x3 proc~correct_adm_linear_momentum correct_adm_linear_momentum proc~correct_adm_linear_momentum->proc~spatial_vector_norm_sym3x3 interface~compute_adm_momentum_fluid_m2p compute_adm_momentum_fluid_m2p interface~compute_adm_momentum_fluid_m2p->proc~compute_adm_momentum_fluid_m2p interface~construct_particles_std construct_particles_std interface~construct_particles_std->proc~construct_particles_std interface~correct_adm_linear_momentum correct_adm_linear_momentum interface~correct_adm_linear_momentum->proc~correct_adm_linear_momentum interface~particles particles interface~particles->interface~construct_particles_std program~convergence_test convergence_test program~convergence_test->interface~particles program~sphincs_id sphincs_id program~sphincs_id->interface~particles

Contents


Source Code

  SUBROUTINE spatial_vector_norm_sym3x3( g3, v, norm )

    !****************************************************************
    !
    !# Compute the spatial squared norm of a vector, using the
    !  spatial metric given as an array of 6 components
    !
    !  FT 14.02.2022
    !
    !****************************************************************

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

    IMPLICIT NONE

    DOUBLE PRECISION, INTENT(IN):: g3(jxx:jzz)
    !# The \(3\times 3\) spacetime metric, given as a 6-vector.
    DOUBLE PRECISION, INTENT(IN):: v(jx:jz)
    !# The \(3\)-vector whose norm has to be computed.
    DOUBLE PRECISION, INTENT(OUT):: norm
    !! Spatial norm of the vector v.

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

    norm= g3(jxx)*v(jx)*v(jx)     + two*g3(jxy)*v(jx)*v(jy) &
        + two*g3(jxz)*v(jx)*v(jz) + g3(jyy)*v(jy)*v(jy)     &
        + two*g3(jyz)*v(jy)*v(jz) + g3(jzz)*v(jz)*v(jz)

  END SUBROUTINE spatial_vector_norm_sym3x3