spatial_rotation Derived Type

type, public, extends(lorentz_transformation) :: spatial_rotation

TYPE representing a spatial rotation


Inherits

type~~spatial_rotation~~InheritsGraph type~spatial_rotation spatial_rotation type~lorentz_transformation lorentz_transformation type~spatial_rotation->type~lorentz_transformation

Contents

Source Code


Components

Type Visibility Attributes Name Initial
double precision, private, DIMENSION(3) :: euler_angles

Euler angles that define the rotation around the axes, in this order

double precision, private, DIMENSION(3,3) :: inv_r

Full inverse rotation operator

double precision, private, DIMENSION(3,3) :: inv_r_x

Inverse rotation operator around the axis

double precision, private, DIMENSION(3,3) :: inv_r_y

Inverse rotation operator around the axis

double precision, private, DIMENSION(3,3) :: inv_r_z

Inverse rotation operator around the axis

double precision, private, DIMENSION(3,3) :: r

Full rotation operator

double precision, private, DIMENSION(3,3) :: r_x

Rotation operator around the axis

double precision, private, DIMENSION(3,3) :: r_y

Rotation operator around the axis

double precision, private, DIMENSION(3,3) :: r_z

Rotation operator around the axis

double precision, private, DIMENSION(3,3) :: tr_r

Transpose of the full inverse rotation operator


Constructor

public interface spatial_rotation

  • public module function construct_rotation(euler_angles) result(rotation)

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in), DIMENSION(3) :: euler_angles

    Euler angles that define the rotation around the axes, in this order

    Return Value type(spatial_rotation)

    spatial_rotation object to be constructed

  • public module function construct_rotation_angles(alpha, beta, gamma) result(rotation)

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in) :: alpha

    Euler angle that defines the rotation around the axis

    double precision, intent(in) :: beta

    Euler angle that defines the rotation around the axis

    double precision, intent(in) :: gamma

    Euler angle that defines the rotation around the axis

    Return Value type(spatial_rotation)

    spatial_rotation object to be constructed


Type-Bound Procedures

generic, public :: apply_as_congruence => apply_as_congruence_to_tensor, apply_as_congruence_to_symrank2_tensor

Generic procedure to apply the lorentz_transformation as a congruence

procedure, public, NON_OVERRIDABLE :: apply_as_congruence_to_symrank2_tensor

Action of the lorentz_transformation as a congruence on a -vector storing the components of a symmetric, purely covariant, tensor

  • interface

    public module function apply_as_congruence_to_symrank2_tensor(this, t) result(transformed_t)

    Action of the lorentz_transformation on a -vector

    Arguments

    Type IntentOptional Attributes Name
    class(lorentz_transformation), intent(in) :: this

    lorentz_transformation object to apply

    double precision, intent(in), DIMENSION(n_sym4x4) :: t

    -vector storing the components of the symmetric tensor to be boosted

    Return Value double precision, DIMENSION(n_sym4x4)

    -vector storing the components of the boosted symmetric tensor

procedure, public, NON_OVERRIDABLE :: apply_as_congruence_to_tensor

Action of the lorentz_transformation as a congruence on a generic purely covariant tensor

  • interface

    public module function apply_as_congruence_to_tensor(this, t) result(transformed_t)

    Action of the lorentz_transformation on a -vector

    Arguments

    Type IntentOptional Attributes Name
    class(lorentz_transformation), intent(in) :: this

    lorentz_transformation object to apply

    double precision, intent(in), DIMENSION(4,4) :: t(0:3,0:3)

    tensor to be boosted

    Return Value double precision, DIMENSION(4,4), (0:3,0:3)

    Boosted tensor

generic, public :: apply_as_similarity => apply_as_similarity_to_tensor, apply_as_similarity_to_symrank2_tensor

Generic procedure to apply the lorentz_transformation as a similarity

procedure, public, NON_OVERRIDABLE :: apply_as_similarity_to_symrank2_tensor

Action of the lorentz_transformation as a similarity on a -vector storing the components of a symmetric tensor

  • interface

    public module function apply_as_similarity_to_symrank2_tensor(this, t) result(transformed_t)

    Action of the lorentz_transformation on a -vector

    Arguments

    Type IntentOptional Attributes Name
    class(lorentz_transformation), intent(in) :: this

    lorentz_transformation object to apply

    double precision, intent(in), DIMENSION(n_sym4x4) :: t

    -vector storing the components of the symmetric tensor to be boosted

    Return Value double precision, DIMENSION(n_sym4x4)

    -vector storing the components of the boosted symmetric tensor

procedure, public, NON_OVERRIDABLE :: apply_as_similarity_to_tensor

Action of the lorentz_transformation as a similarity on a generic tensor

  • interface

    public module function apply_as_similarity_to_tensor(this, t) result(transformed_t)

    Action of the lorentz_transformation on a -vector

    Arguments

    Type IntentOptional Attributes Name
    class(lorentz_transformation), intent(in) :: this

    lorentz_transformation object to apply

    double precision, intent(in), DIMENSION(4,4) :: t(0:3,0:3)

    tensor to be boosted

    Return Value double precision, DIMENSION(4,4), (0:3,0:3)

    Boosted tensor

procedure, public, NON_OVERRIDABLE :: apply_to_vector

Action of the lorentz_transformation on a -vector

  • interface

    public module function apply_to_vector(this, u) result(transformed_u)

    Action of the lorentz_transformation on a -vector

    Arguments

    Type IntentOptional Attributes Name
    class(lorentz_transformation), intent(in) :: this

    lorentz_transformation object to apply

    double precision, intent(in), DIMENSION(4) :: u(0:3)

    -vector to be boosted

    Return Value double precision, DIMENSION(4), (0:3)

    Boosted -vector

procedure, public :: compute_rotation_matrices

Computes the spatial part of the matrix of the Lorentz

  • interface

    public module subroutine compute_rotation_matrices(this, euler_angles, r_x, r_y, r_z, r, matrix, inv_r_x, inv_r_y, inv_r_z, inv_r, inv_matrix)

    Compute the matrices for the spatial_rotation

    Arguments

    Type IntentOptional Attributes Name
    class(spatial_rotation), intent(inout) :: this

    spatial_rotation object to compuet the matrices for

    double precision, intent(in), DIMENSION(3) :: euler_angles

    lambdav

    double precision, intent(out), DIMENSION(3,3) :: r_x

    Rotation operator around the axis

    double precision, intent(out), DIMENSION(3,3) :: r_y

    Rotation operator around the axis

    double precision, intent(out), DIMENSION(3,3) :: r_z

    Rotation operator around the axis

    double precision, intent(out), DIMENSION(3,3) :: r

    Full rotation operator

    double precision, intent(out), DIMENSION(4,4) :: matrix(0:3,0:3)

    matrix representing the Lorentz boost

    double precision, intent(out), DIMENSION(3,3) :: inv_r_x

    Inverse rotation operator around the axis

    double precision, intent(out), DIMENSION(3,3) :: inv_r_y

    Inverse rotation operator around the axis

    double precision, intent(out), DIMENSION(3,3) :: inv_r_z

    Inverse rotation operator around the axis

    double precision, intent(out), DIMENSION(3,3) :: inv_r

    Inverse of the full rotation operator

    double precision, intent(out), DIMENSION(4,4) :: inv_matrix(0:3,0:3)

    Inverse of the matrix representing the Lorentz boost

Source Code

  TYPE, EXTENDS(lorentz_transformation):: spatial_rotation
  !! TYPE representing a spatial rotation

    PRIVATE

    DOUBLE PRECISION, DIMENSION(3):: euler_angles
    !# Euler angles that define the rotation around the \(x,y,z\) axes,
    !  in this order

    DOUBLE PRECISION, DIMENSION(3,3):: r_x
    !! Rotation operator around the \(x\) axis
    DOUBLE PRECISION, DIMENSION(3,3):: r_y
    !! Rotation operator around the \(y\) axis
    DOUBLE PRECISION, DIMENSION(3,3):: r_z
    !! Rotation operator around the \(z\) axis
    DOUBLE PRECISION, DIMENSION(3,3):: r
    !! Full rotation operator

    DOUBLE PRECISION, DIMENSION(3,3):: tr_r
    !! Transpose of the full inverse rotation operator

    DOUBLE PRECISION, DIMENSION(3,3):: inv_r_x
    !! Inverse rotation operator around the \(x\) axis
    DOUBLE PRECISION, DIMENSION(3,3):: inv_r_y
    !! Inverse rotation operator around the \(y\) axis
    DOUBLE PRECISION, DIMENSION(3,3):: inv_r_z
    !! Inverse rotation operator around the \(z\) axis
    DOUBLE PRECISION, DIMENSION(3,3):: inv_r
    !! Full inverse rotation operator


    CONTAINS


    PROCEDURE:: compute_rotation_matrices
    !! Computes the spatial part of the matrix of the Lorentz
    !  boost, and its whole matrix, starting from the vector
    !  \(p\)


  END TYPE spatial_rotation