Peano
Loading...
Searching...
No Matches
makeIC-multiscale Namespace Reference

Functions

 get_coords (box_min, box_max, npart)
 Generate coordinates for particles between box_min and box_max.
 
 get_coords (box_xmin, box_xmax, box_ymin, box_ymax, npart)
 Generate coordinates for particles between box_min and box_max npart: number of particles in each dimension.
 
 get_coords (box_xmin, box_xmax, box_ymin, box_ymax, box_zmin, box_zmax, npart)
 Generate coordinates for particles between box_min and box_max npart: number of particles in each dimension.
 

Variables

str fileName = "test_sml_multiscale_1D.hdf5"
 
float boxSize = 1.0
 
 parser = argparse.ArgumentParser(description="SPH benchmarking script")
 
 dest
 
 required
 
 type
 
 help
 
 action
 
 default
 
 args = parser.parse_args()
 
 npart = args.particle_number
 
 seed = args.random_seed
 
 max_displacement = args.max_displacement
 
int npart_tot = 4 * npart
 
 coords = np.zeros((npart_tot, 3))
 
 v = np.zeros((npart_tot, 3))
 
 ids = np.linspace(1, npart_tot, npart_tot)
 
 m = np.ones(npart_tot)
 
float h = np.ones(npart_tot) * 4.0 * boxSize / npart_tot
 
 u = np.ones(npart_tot)
 
 rng = np.random.RandomState(seed=seed)
 
 new_coords = get_coords(0.0, boxSize, npart)
 
 marker
 
 bins
 
 file = h5py.File(fileName, "w")
 
 grp = file.create_group("/Header")
 
 data
 
 dtype
 
float dx = boxSize / npart
 
int npart2 = npart**2
 
float scale = 0.8
 
 s
 
int npart3 = npart**3
 

Function Documentation

◆ get_coords() [1/3]

makeIC-multiscale.get_coords (   box_min,
  box_max,
  npart 
)

Generate coordinates for particles between box_min and box_max.

Definition at line 70 of file makeIC-multiscale.py.

◆ get_coords() [2/3]

makeIC-multiscale.get_coords (   box_xmin,
  box_xmax,
  box_ymin,
  box_ymax,
  box_zmin,
  box_zmax,
  npart 
)

Generate coordinates for particles between box_min and box_max npart: number of particles in each dimension.

Definition at line 74 of file makeIC-multiscale.py.

◆ get_coords() [3/3]

makeIC-multiscale.get_coords (   box_xmin,
  box_xmax,
  box_ymin,
  box_ymax,
  npart 
)

Generate coordinates for particles between box_min and box_max npart: number of particles in each dimension.

Definition at line 74 of file makeIC-multiscale.py.

Variable Documentation

◆ action

makeIC-multiscale.action

Definition at line 35 of file makeIC-multiscale.py.

◆ args

makeIC-multiscale.args = parser.parse_args()

Definition at line 50 of file makeIC-multiscale.py.

◆ bins

makeIC-multiscale.bins

Definition at line 115 of file makeIC-multiscale.py.

◆ boxSize

float makeIC-multiscale.boxSize = 1.0

Definition at line 12 of file makeIC-multiscale.py.

◆ coords

makeIC-multiscale.coords = np.zeros((npart_tot, 3))

Definition at line 60 of file makeIC-multiscale.py.

◆ data

makeIC-multiscale.data

Definition at line 151 of file makeIC-multiscale.py.

◆ default

makeIC-multiscale.default

Definition at line 36 of file makeIC-multiscale.py.

◆ dest

makeIC-multiscale.dest

Definition at line 18 of file makeIC-multiscale.py.

◆ dtype

makeIC-multiscale.dtype

Definition at line 151 of file makeIC-multiscale.py.

◆ dx

float makeIC-multiscale.dx = boxSize / npart

Definition at line 66 of file makeIC-multiscale.py.

◆ file

makeIC-multiscale.file = h5py.File(fileName, "w")

Definition at line 120 of file makeIC-multiscale.py.

◆ fileName

str makeIC-multiscale.fileName = "test_sml_multiscale_1D.hdf5"

Definition at line 11 of file makeIC-multiscale.py.

◆ grp

makeIC-multiscale.grp = file.create_group("/Header")

Definition at line 123 of file makeIC-multiscale.py.

◆ h

float makeIC-multiscale.h = np.ones(npart_tot) * 4.0 * boxSize / npart_tot

Definition at line 64 of file makeIC-multiscale.py.

◆ help

makeIC-multiscale.help

Definition at line 21 of file makeIC-multiscale.py.

◆ ids

makeIC-multiscale.ids = np.linspace(1, npart_tot, npart_tot)

Definition at line 62 of file makeIC-multiscale.py.

◆ m

makeIC-multiscale.m = np.ones(npart_tot)

Definition at line 63 of file makeIC-multiscale.py.

◆ marker

makeIC-multiscale.marker

Definition at line 113 of file makeIC-multiscale.py.

◆ max_displacement

makeIC-multiscale.max_displacement = args.max_displacement

Definition at line 53 of file makeIC-multiscale.py.

◆ new_coords

makeIC-multiscale.new_coords = get_coords(0.0, boxSize, npart)

Definition at line 98 of file makeIC-multiscale.py.

◆ npart

makeIC-multiscale.npart = args.particle_number

Definition at line 51 of file makeIC-multiscale.py.

◆ npart2

int makeIC-multiscale.npart2 = npart**2

Definition at line 114 of file makeIC-multiscale.py.

◆ npart3

int makeIC-multiscale.npart3 = npart**3

Definition at line 120 of file makeIC-multiscale.py.

◆ npart_tot

int makeIC-multiscale.npart_tot = 4 * npart

Definition at line 59 of file makeIC-multiscale.py.

◆ parser

makeIC-multiscale.parser = argparse.ArgumentParser(description="SPH benchmarking script")

Definition at line 14 of file makeIC-multiscale.py.

◆ required

makeIC-multiscale.required

Definition at line 19 of file makeIC-multiscale.py.

◆ rng

makeIC-multiscale.rng = np.random.RandomState(seed=seed)

Definition at line 67 of file makeIC-multiscale.py.

◆ s

makeIC-multiscale.s

Definition at line 143 of file makeIC-multiscale.py.

◆ scale

float makeIC-multiscale.scale = 0.8

Definition at line 133 of file makeIC-multiscale.py.

◆ seed

makeIC-multiscale.seed = args.random_seed

Definition at line 52 of file makeIC-multiscale.py.

◆ type

makeIC-multiscale.type

Definition at line 20 of file makeIC-multiscale.py.

◆ u

makeIC-multiscale.u = np.ones(npart_tot)

Definition at line 65 of file makeIC-multiscale.py.

◆ v

makeIC-multiscale.v = np.zeros((npart_tot, 3))

Definition at line 61 of file makeIC-multiscale.py.