centreofmass

Module

Description

Utilities for computing the centre of mass on the particles

and correcting the bulk motion (used for turbulent driving)

References:

None

Owner:

Daniel Price

Runtime parameters:

None

Dependencies:

dim, io, mpiutils, part, vectorutils

Quick access

Routines:

correct_bulk_motion(), get_centreofmass(), get_centreofmass_accel(), get_total_angular_momentum(), reset_centreofmass()

Variables

Subroutines and functions

subroutine  centreofmass/reset_centreofmass(npart, xyzh, vxyzu[, nptmass[, xyzmh_ptmass[, vxyz_ptmass]]])
Parameters:
  • npart [integer,in]

  • xyzh (,) [real,inout]

  • vxyzu (,) [real,inout]

  • nptmass [integer,in,]

  • xyzmh_ptmass (,) [real,inout,]

  • vxyz_ptmass (,) [real,inout,]

Use :

io (iprint())

Call to:

get_centreofmass()

subroutine  centreofmass/get_centreofmass(xcom, vcom, npart, xyzh, vxyzu[, nptmass[, xyzmh_ptmass[, vxyz_ptmass[, mass]]]])
Parameters:
  • xcom (3) [real,out]

  • vcom (3) [real,out]

  • npart [integer,in]

  • xyzh (,) [real,in]

  • vxyzu (,) [real,in]

  • nptmass [integer,in,]

  • xyzmh_ptmass (,) [real,in,]

  • vxyz_ptmass (,) [real,in,]

  • mass [real,out,]

Use :

io (id(), master()), dim (maxphase(), maxp()), part (massoftype(), iamtype(), iphase(), igas(), isdead_or_accreted()), mpiutils (reduceall_mpi())

Called from:

reset_centreofmass(), gw_still_inspiralling()

subroutine  centreofmass/get_centreofmass_accel(acom, npart, xyzh, fxyzu, fext[, nptmass[, xyzmh_ptmass[, fxyz_ptmass]]])
Parameters:
  • acom (3) [real,out]

  • npart [integer,in]

  • xyzh (,) [real,in]

  • fxyzu (,) [real,in]

  • fext (,) [real,in]

  • nptmass [integer,in,]

  • xyzmh_ptmass (,) [real,in,]

  • fxyz_ptmass (,) [real,in,]

Use :

io (id(), master()), dim (maxphase(), maxp()), part (massoftype(), iamtype(), iphase(), igas(), isdead_or_accreted()), mpiutils (reduceall_mpi())

subroutine  centreofmass/correct_bulk_motion()
Use :

dim (maxp(), maxphase()), part (npart(), xyzh(), vxyzu(), fxyzu(), iamtype(), igas(), iphase(), nptmass(), xyzmh_ptmass(), vxyz_ptmass(), isdead_or_accreted(), massoftype()), mpiutils (reduceall_mpi()), io (iprint(), iverbose(), id(), master())

subroutine  centreofmass/get_total_angular_momentum(xyzh, vxyz, npart, l_tot[, xyzmh_ptmass[, vxyz_ptmass[, npart_ptmass]]])
Parameters:
  • xyzh (,) [real,in]

  • vxyz (,) [real,in]

  • npart [integer,in]

  • l_tot (3) [real,out]

  • xyzmh_ptmass (,) [real,in,]

  • vxyz_ptmass (,) [real,in,]

  • npart_ptmass [integer,in,]

Use :

vectorutils (cross_product3d()), part (iphase(), iamtype(), massoftype(), isdead_or_accreted()), mpiutils (reduceall_mpi())

Call to:

cross_product3d()