set_sphere

Module

Description

This module sets up spherical particle distributions

By default this is done by cropping and stretching cubes

References:

None

Owner:

Daniel Price

Runtime parameters:

None

Dependencies:

physcon, random, stretchmap, unifdis

Quick access

Variables:

ierr_notashape, ierr_notinrange, ierr_unknown, set_sphere_mc, set_unifdis_spheren

Routines:

set_ellipse(), set_sphere()

Needed modules

  • unifdis (set_unifdis(), mask_prototype(), mask_true())

  • physcon (pi()): Physical and mathematical constants (as in sphNG)

  • stretchmap (rho_func()): This module implements stretch mapping to create one dimensional density profiles from uniform arrangements of SPH particles

Variables

  • spherical/ierr_not_converged [integer,private/parameter/optional/default=2]
  • spherical/ierr_notashape [integer,private/parameter/optional/default=4]
  • spherical/ierr_notinrange [integer,private/parameter/optional/default=1]
  • spherical/ierr_unknown [integer,private/parameter/optional/default=3]
  • spherical/rho_func [public]
  • spherical/set_sphere_mc [private]
  • spherical/set_unifdis_spheren [private]

Subroutines and functions

subroutine  spherical/set_sphere(lattice, id, master, rmin, rmax, delta, hfact, np, xyzh, rhofunc[, rhotab[, rtab[, xyz_origin[, nptot[, dir[, exactn[, np_requested, mask]]]]]]])
Parameters:
  • lattice [character,in]

  • id [integer,in]

  • master [integer,in]

  • rmin [real,in]

  • rmax [real,in]

  • delta [real,inout]

  • hfact [real,in]

  • np [integer,inout]

  • xyzh (,) [real,out]

  • rhofunc [real]

  • rhotab (*) [real,in,]

  • rtab (*) [real,in,]

  • xyz_origin (3) [real,in,]

  • nptot [integer,inout,]

  • dir [integer,in,]

  • exactn [logical,in,]

  • np_requested [integer,in,]

  • mask [integer]

Use :

stretchmap (set_density_profile(), rho_func())

Call to:

set_density_profile()

subroutine  spherical/set_ellipse(lattice, id, master, r_ellipsoid, delta, hfact, xyzh, np, nptot, np_requested, mask)
Parameters:
  • lattice [character,in]

  • id [integer,in]

  • master [integer,in]

  • r_ellipsoid (3) [real,in]

  • delta [real,inout]

  • hfact [real,in]

  • xyzh (,) [real,out]

  • np [integer,inout]

  • nptot [integer,inout]

  • np_requested [integer,in]

  • mask [integer]