standard_tpo_formulation Module

This module contains the definition of ABSTRACT TYPE tpo



Uses

  • module~~standard_tpo_formulation~~UsesGraph module~standard_tpo_formulation standard_tpo_formulation mesh_refinement mesh_refinement module~standard_tpo_formulation->mesh_refinement module~id_base id_base module~standard_tpo_formulation->module~id_base module~sph_particles sph_particles module~standard_tpo_formulation->module~sph_particles module~utility utility module~standard_tpo_formulation->module~utility timing timing module~standard_tpo_formulation->timing module~id_base->module~utility module~id_base->timing module~sph_particles->module~id_base module~sph_particles->module~utility module~sph_particles->timing constants constants module~utility->constants matrix matrix module~utility->matrix

Used by

  • module~~standard_tpo_formulation~~UsedByGraph module~standard_tpo_formulation standard_tpo_formulation module~access~9 access module~access~9->module~standard_tpo_formulation module~analysis analysis module~analysis->module~standard_tpo_formulation module~bssn_formulation bssn_formulation module~bssn_formulation->module~standard_tpo_formulation module~cauchy_convergence_test cauchy_convergence_test module~cauchy_convergence_test->module~standard_tpo_formulation module~io~2 io module~io~2->module~standard_tpo_formulation module~recovery_m2p recovery_m2p module~recovery_m2p->module~standard_tpo_formulation module~sph_adm_variables sph_adm_variables module~sph_adm_variables->module~standard_tpo_formulation module~standard_tpo_variables standard_tpo_variables module~standard_tpo_variables->module~standard_tpo_formulation program~convergence_test convergence_test program~convergence_test->module~standard_tpo_formulation program~convergence_test->module~bssn_formulation program~convergence_test->module~cauchy_convergence_test module~bssn_variables bssn_variables module~bssn_variables->module~bssn_formulation module~constraints constraints module~constraints->module~bssn_formulation module~constructor constructor module~constructor->module~bssn_formulation module~io~3 io module~io~3->module~bssn_formulation module~landau_lifshitz landau_lifshitz module~landau_lifshitz->module~bssn_formulation module~memory~2 memory module~memory~2->module~bssn_formulation module~perform_test perform_test module~perform_test->module~cauchy_convergence_test module~ricci ricci module~ricci->module~bssn_formulation module~shared_grid shared_grid module~shared_grid->module~cauchy_convergence_test program~sphincs_id sphincs_id program~sphincs_id->module~bssn_formulation

Contents


Interfaces

interface

  • public module subroutine abs_values_in(this, lower_bound, upper_bound, constraint, l, export, unit_analysis, cnt)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    double precision, intent(in) :: lower_bound
    double precision, intent(in) :: upper_bound
    double precision, intent(in), DIMENSION(:,:,:) :: constraint
    integer, intent(in) :: l
    logical, intent(in) :: export
    integer, intent(in) :: unit_analysis
    integer, intent(out) :: cnt

interface

  • public module subroutine analyze_constraint(this, l, constraint, name_constraint, unit_logfile, name_analysis, l2_norm, loo_norm, integral, source)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l
    double precision, intent(in), DIMENSION(:,:,:) :: constraint
    character(len=*), intent(in) :: name_constraint
    integer, intent(in) :: unit_logfile
    character(len=*), intent(in) :: name_analysis
    double precision, intent(out) :: l2_norm
    double precision, intent(out) :: loo_norm
    double precision, intent(out) :: integral
    double precision, intent(in), optional, DIMENSION(:,:,:) :: source

interface

  • public module subroutine compute_adm_momentum_fluid_m2p(this, parts, adm_mom)

    Computes an estimate of the linear momentum of the fluid using the \(\mathrm{SPH}\) hydro fields, and the spacetime metric mapped from the mesh

    Arguments

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

    tpo object which this PROCEDURE is a member of

    class(particles), intent(in) :: parts

    particles object used to map the metric from the mesh to the particles, and to call the recovery procedures

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

    ADM linear momentum of the fluid computed using the metric mapped with the mesh-to-particle mapping

interface

  • public module subroutine deallocate_standard_tpo_variables(this)

    Arguments

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

interface

  • public module function get_HC(this, i, j, k, l) result(HC_value)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: i
    integer, intent(in) :: j
    integer, intent(in) :: k
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module function get_HC_parts(this, i, j, k, l) result(HC_value)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: i
    integer, intent(in) :: j
    integer, intent(in) :: k
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module function get_MC(this, i, j, k, l) result(MC_value)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: i
    integer, intent(in) :: j
    integer, intent(in) :: k
    integer, intent(in) :: l

    Return Value double precision, DIMENSION(3)

interface

  • public module function get_MC_parts(this, i, j, k, l) result(MC_value)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: i
    integer, intent(in) :: j
    integer, intent(in) :: k
    integer, intent(in) :: l

    Return Value double precision, DIMENSION(3)

interface

  • public module function get_dx(this, l) result(dx)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module function get_dy(this, l) result(dy)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module function get_dz(this, l) result(dz)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module function get_grid_point(this, i, j, k, l) result(grid_point)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: i
    integer, intent(in) :: j
    integer, intent(in) :: k
    integer, intent(in) :: l

    Return Value double precision, DIMENSION(3)

interface

  • public module function get_levels(this) result(levels)

    Arguments

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

    Return Value type(level), DIMENSION(:), ALLOCATABLE

interface

  • public module function get_ngrid_x(this, l) result(ngrid_x)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value integer

interface

  • public module function get_ngrid_y(this, l) result(ngrid_y)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value integer

interface

  • public module function get_ngrid_z(this, l) result(ngrid_z)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value integer

interface

  • public module function get_nlevels(this) result(nlevels)

    Arguments

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

    Return Value integer

interface

  • public module function get_xR(this, l) result(xR)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module function get_yR(this, l) result(yR)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module function get_zR(this, l) result(zR)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    integer, intent(in) :: l

    Return Value double precision

interface

  • public module subroutine print_summary(this)

    Prints a summary of the properties of the refined mesh, and optionally, to a formatted file whose name is given as the optional argument filename

    Arguments

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

    Name of the formatted file to print the summary to

interface

  • public module subroutine setup_standard_tpo_variables(tpof, id, dx, dy, dz)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: tpof
    class(idbase), intent(inout) :: id
    double precision, intent(in), optional :: dx
    double precision, intent(in), optional :: dy
    double precision, intent(in), optional :: dz

interface

  • public module subroutine test_recovery_m2p(this, parts, namefile)

    Tests the recovery. Computes the conserved variables from the physical ones, and then the physical ones from the conserved ones. It then compares the variables computed with the recovery PROCEDURES, with those computed with \(\texttt{SPHINCS_ID}\). Uses the mesh-2-particle.

    Arguments

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

    tpo object which this PROCEDURE is a member of

    class(particles), intent(in) :: parts

    particles object used to map the metric from the mesh to the particles, and to call the recovery procedures

    character(len=*), intent(inout) :: namefile

    Name of the formatted file where the data is printed


Abstract Interfaces

abstract interface

  • public subroutine compute_and_print_tpo_constraints_grid_interface(this, id, namefile, name_logfile, points)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout), TARGET :: this
    class(idbase), intent(inout) :: id
    character(len=*), intent(inout) :: namefile
    character(len=*), intent(inout) :: name_logfile
    double precision, intent(in), optional, DIMENSION(:,:,:,:), TARGET :: points

abstract interface

  • public subroutine compute_and_print_tpo_constraints_particles_interface(this, parts_obj, namefile, name_logfile, points)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout), TARGET :: this
    class(particles), intent(inout) :: parts_obj
    character(len=*), intent(inout) :: namefile
    character(len=*), intent(inout) :: name_logfile
    double precision, intent(in), optional, DIMENSION(:,:,:,:), TARGET :: points

abstract interface

  • public subroutine compute_and_print_tpo_variables_interface(this, namefile)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    character(len=*), intent(inout), optional :: namefile

abstract interface

  • public subroutine deallocate_fields_interface(this)

    Arguments

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

abstract interface

  • public subroutine define_allocate_fields_interface(this)

    Arguments

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

abstract interface

  • public subroutine print_formatted_id_tpo_variables_interface(this, points, namefile)

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: this
    double precision, intent(in), optional, DIMENSION(:,:,:,:) :: points
    character(len=*), intent(inout), optional :: namefile

Derived Types

type, public ::  tpo

ABSTRACT TYPE representing the standard formulation of the Einstein equations

Components

Type Visibility Attributes Name Initial
type(grid_function_scalar), public :: HC

Grid scalar function storing the Hamiltonian constraint (violations) computed using the ID on the mesh

double precision, public, DIMENSION(:), ALLOCATABLE :: HC_int

Integral the Hamiltonian constraint computed using the stress-energy tensor mapped from the particles

double precision, public, DIMENSION(:), ALLOCATABLE :: HC_l2

norm of the Hamiltonian constraint computed on the mesh

double precision, public, DIMENSION(:), ALLOCATABLE :: HC_loo

norm of the Hamiltonian constraint computed on the mesh (i.e., its maximum)

type(grid_function_scalar), public :: HC_parts

Grid scalar function storing the Hamiltonian constraint (violations) computed using the stress-energy tensor mapped from the particles to the mesh

double precision, public, DIMENSION(:), ALLOCATABLE :: HC_parts_int

Integral the Hamiltonian constraint computed on the mesh

double precision, public, DIMENSION(:), ALLOCATABLE :: HC_parts_l2

norm of the Hamiltonian constraint computed on the mesh, using the stress-energy tensor mapped from the particles

double precision, public, DIMENSION(:), ALLOCATABLE :: HC_parts_loo

norm of the Hamiltonian constraint computed on the mesh, using the stress-energy tensor mapped from the particles (i.e., its maximum)

type(grid_function), public :: K_phys3_ll

Grid function storing the extrinsic curvature

type(grid_function), public :: MC

Grid function storing the momentum constraint (violations) computed using the ID on the mesh

double precision, public, DIMENSION(:,:), ALLOCATABLE :: MC_int

Integral of the momentum constraint computed on the mesh

double precision, public, DIMENSION(:,:), ALLOCATABLE :: MC_l2

norm of the momentum constraint computed on the mesh

double precision, public, DIMENSION(:,:), ALLOCATABLE :: MC_loo

norm of the momentum constraint computed on the mesh (i.e., its maximum)

type(grid_function), public :: MC_parts

Grid function storing the momentum constraint (violations) computed using the stress-energy tensor mapped from the particles to the mesh

double precision, public, DIMENSION(:,:), ALLOCATABLE :: MC_parts_int

Integral of the momentum constraint computed using the stress-energy tensor mapped from the particles

double precision, public, DIMENSION(:,:), ALLOCATABLE :: MC_parts_l2

norm of the Hamiltonian constraint computed on the mesh, using the stress-energy tensor mapped from the particles

double precision, public, DIMENSION(:,:), ALLOCATABLE :: MC_parts_loo

norm of the momentum constraint computed on the mesh, using the stress-energy tensor mapped from the particles (i.e., its maximum)

type(grid_function), public :: S

Grid function storing the matter source in the momentum constraint computed using the ID on the mesh, multiplied by

type(grid_function), public :: S_parts

Grid function storing the matter source in the momentum constraint computed using the stress-energy tensor mapped from the particles to the mesh, multiplied by

integer, public :: cons_step

Constraint violations are printed to file every cons_step-th grid point

type(grid_function), public :: coords

Grid function storing the Cartesian coordinates

logical, public :: export_constraints

.TRUE. if the constraint violations are to be printed to file, .FALSE. otherwise

logical, public :: export_constraints_details

.TRUE. if the points at which the constraints violations are within the intervals , with and , are to be printed to file; .FALSE. otherwise

logical, public :: export_constraints_x

.TRUE. if only the constrain violations on the axis are to be

logical, public :: export_constraints_xy

.TRUE. if only the constrain violations on the plane are to be

type(grid_function), public :: g_phys3_ll

Grid function storing the spatial metric

type(timer), public :: grid_timer

Timer that times how long it takes to set up the grid and allocate the grid functions

type(timer), public :: importer_timer

Timer that times how long it takes to import the \(\texttt{LORENE}\) ID on the mesh

type(grid_function_scalar), public :: lapse

Grid scalar function storing the lapse function

type(level), public, DIMENSION(:), ALLOCATABLE :: levels

Array containing the information on each refinement level

integer, public :: n_matter

Number of matter objects in the physical system

integer, public :: nlevels

Number of refinement levels

integer, public, DIMENSION(:), ALLOCATABLE :: npoints_xaxis

Array containing the number of mesh points of the highest-resolution refinement level across the x-axis-size of the matter objects

type(grid_function_scalar), public :: rad_coord

Grid scalar function storing the radial coordinates of each grid point

type(grid_function_scalar), public :: rho

Grid scalar function storing the matter source in the Hamiltonian constraint computed using the ID on the mesh, multiplied by

type(grid_function_scalar), public :: rho_parts

Grid scalar function storing the matter source in the Hamiltonian constraint computed using the stress-energy tensor mapped from the particles to the mesh, multiplied by

type(grid_function), public :: shift_u

Grid function storing the shift vector

integer, public :: tpo_id_number

Negative integer that identifies the tpo object

Type-Bound Procedures

procedure , public :: abs_values_in Interface
procedure , public , NON_OVERRIDABLE :: analyze_constraint Interface

Analyze a constraint (or an arbitrary scalar grid function) by examining its values at the refined mesh. Computes the number of mesh points at which the scalar grid function has values lying within predefined (hard-coded) intervals

Read more…
procedure , public , NON_OVERRIDABLE :: compute_adm_momentum_fluid_m2p Interface

Computes an estimate of the linear momentum of the fluid using the \(\mathrm{SPH}\) hydro fields, and the spacetime metric mapped from the mesh

Read more…
generic, public :: compute_and_print_tpo_constraints => compute_and_print_tpo_constraints_grid, compute_and_print_tpo_constraints_particles

Overloaded PROCEDURE to compute the constraints using only the \(\mathrm{ID}\) on the refined mesh, or the spacetime \(\mathrm{ID}\) on the refined mesh and the hydrodynamical \(\mathrm{ID}\) mapped from the particles to the refined mesh

procedure (compute_and_print_tpo_constraints_grid_interface) , public :: compute_and_print_tpo_constraints_grid

Computes the constraints specific to the formulation identified by an EXTENDED TYPE, using the full \(\mathrm{ID}\) on the refined mesh

procedure (compute_and_print_tpo_constraints_particles_interface) , public :: compute_and_print_tpo_constraints_particles

Computes the constraints specific to the formulation identified by an EXTENDED TYPE, using the \(\mathrm{BSSNOK}\) \(\mathrm{ID}\) on the refined mesh and the hydrodynamical \(\mathrm{ID}\) mapped from the particles to the mesh

procedure (compute_and_print_tpo_variables_interface) , public :: compute_and_print_tpo_variables

Compute the fields specific to the formulation identified by an EXTENDED TYPE, starting from the standard 3+1 fields

procedure (deallocate_fields_interface) , public :: deallocate_fields

Deallocates memory for the fields specific to the formulation identified by an EXTENDED TYPE

procedure , public , NON_OVERRIDABLE :: deallocate_standard_tpo_variables Interface

Deallocates memory for the standard 3+1 fields

procedure (define_allocate_fields_interface) , public :: define_allocate_fields

Allocates memory for the fields specific to the formulation identified by an EXTENDED TYPE

procedure , public :: get_HC Interface
procedure , public :: get_HC_parts Interface
procedure , public :: get_MC Interface
procedure , public :: get_MC_parts Interface
procedure , public :: get_dx Interface
procedure , public :: get_dy Interface
procedure , public :: get_dz Interface
procedure , public :: get_grid_point Interface
procedure , public :: get_levels Interface
procedure , public :: get_ngrid_x Interface
procedure , public :: get_ngrid_y Interface
procedure , public :: get_ngrid_z Interface
procedure , public :: get_nlevels Interface
procedure , public :: get_xR Interface
procedure , public :: get_yR Interface
procedure , public :: get_zR Interface
procedure (print_formatted_id_tpo_variables_interface) , public :: print_formatted_id_tpo_variables

Prints the spacetime \(\mathrm{ID}\) to a formatted file

procedure , public , NON_OVERRIDABLE :: print_summary Interface

Prints a summary about the features of the refined mesh

procedure , public , NON_OVERRIDABLE :: setup_standard_tpo_variables Interface

Set up the refined mesh by reading the gravity_grid_parameter.dat parameter file, and read the standard 3+1 \(\mathrm{ID}\) using the given idbase object, on the refined mesh

procedure , public , NON_OVERRIDABLE :: test_recovery_m2p Interface

Computes the conserved variables from the physical ones, and vice versa, to test that the recovered physical variables are the same to those computed from the \(\mathrm{ID}\). Uses the metric mapped from the grid to the particles.

Read more…