Psgrid

class CADMium.Psgrid(NP, NM, a, L, loc)[source]

Bases: object

Generates spheroidal grid

Parameters
  • NP (int) – Number of points per integration block

  • NM (list) – Number of angluar/radial blocks

  • a (float) – half bond lenght

  • L (float) – spheroidal box size

  • loc (np.ndarray) – stencil required for derivatives

Variables
  • ~Psgrid.Na (int) – Number of angular points

  • ~Psgrid.Nr (int) – Number or radial points

  • ~Psgrid.Nelem (int) – Total number of points

  • ~Psgrid.xa (np.ndarray) – Angular coordinate

  • ~Psgrid.xr (np.ndarray) – Radial coordinate

  • ~Psgrid.Xa (np.ndarray) – Angular coordinate in 2D grid

  • ~Psgrid.Xr (np.ndarray) – Angular coordiante in 2D grid

  • ~Psgrid.ha (float) – Angular grid spacing

  • ~Psgrid.hr (float) – Radial grid spacing

  • ~Psgrid.Y (np.ndarray) – Y axis cartesian representation of PS grid

  • ~Psgrid.Z (np.ndarray) – Z axis cartesian representation of PS grid

  • ~Psgrid.a (float) – Half bond length

  • ~Psgrid.R (float) – Bond length

  • ~Psgrid.L (float) – Spheroidal box size

  • ~Psgrid.w (np.ndarray) – Volume element

  • ~Psgrid.wi (np.ndarray) – Integration weights

  • ~Psgrid.f (np.ndarray) – Orbital angular momentum poential

  • ~Psgrid.d1 (np.ndarray) – First order coefficients

  • ~Psgrid.i1 (np.ndarray) – Location of coefficients

  • ~Psgrid.d2 (np.ndarray) – Second order coefficients

  • ~Psgrid.i2 (np.ndarray) – Location of coefficients

  • ~Psgrid.eDa1 (np.ndarray) – Angular Differentiator (Even symmetry)

  • ~Psgrid.eDa2 (np.ndarray) – Angular Differentiator (Even symmetry)

  • ~Psgrid.eDr1 (np.ndarray) – Radial Differentiator (Even symmetry)

  • ~Psgrid.eDr2 (np.ndarray) – Radial Differentiator (Even symmetry)

  • ~Psgrid.oDa1 (np.ndarray) – Angular Differentiator (Odd symmetry)

  • ~Psgrid.oDa2 (np.ndarray) – Angular Differentiator (Odd symmetry)

  • ~Psgrid.oDr1 (np.ndarray) – Radial Differentiator (Odd symmetry)

  • ~Psgrid.oDr2 (np.ndarray) – Radial Differentiator (Odd symmetry)

  • ~Psgrid.elap (csc_matrix) – Laplacian -> Even

  • ~Psgrid.olap (csc_matrix) – Laplacian -> Odd

  • ~Psgrid.grada (csc_matrix) – Angular gradient component (We only need m+=even gradient)

  • ~Psgrid.gradr (csc_matrix) – Radial gradient component

  • ~Psgrid.diva (csc_matrix) – Angular divergence component (We only need m=even gradient)

  • ~Psgrid.divr (csc_matrix) – Radial divergence component

  • ~Psgrid.bcN (int) – Size of boundary region

  • ~Psgrid.bc1 (np.ndarray) – Outer radial boundary conditions 1st order

  • ~Psgrid.bc2 (np.ndarray) – Outer radial boundary conditions 2nd order

  • ~Psgrid.blap (csc_matrix) – Laplacian for balues beond Xr=L boundary

  • ~Psgrid.bXa (np.ndarray) – Coordinates just outside the Xr=L boundary

  • ~Psgrid.bXr (np.ndarray) –

  • ~Psgrid.h1 (np.ndarray) –

  • ~Psgrid.h2 (np.ndarray) –

  • ~Psgrid.h3 (np.ndarray) –

  • ~Psgrid.L_lap (csc_matrix) –

  • ~Psgrid.U_lap (csc_matrix) –

  • ~Psgrid.DISP (logical) – Displays information about current run

initialize()[source]

Initalizes prolate spheroidal grid

mirror(fin)[source]

Mirror function accros AB plane

square(fin)[source]
sigma(fin)[source]

Calculates gradient squared

spinflip(fin)[source]

Flip spins

integrate(f)[source]

Integrates a function f

finite_difference_1d()[source]

Build finite difference operator matrices

finite_difference_2d()[source]

Build finite difference operator matrices

operators()[source]

Construct PS operators

factorize_laplacian(DISP)[source]

Factorizes Laplacian for Hartree calculation

reduced_grad(n)[source]

Calculates the reduced density gradient

plotter(fin, max=1, sym=1)[source]

Plots function of psgrid

Methods Summary

factorize_laplacian(DISP)

finite_difference_1d()

finite_difference_2d()

initialize()

integrate(f)

mirror(fin)

operators()

plotter(fin[, max, sym])

reduced_grad(n)

sigma(n)

spinflip(fin)

square(fin)

Methods Documentation

factorize_laplacian(DISP)[source]
finite_difference_1d()[source]
finite_difference_2d()[source]
initialize()[source]
integrate(f)[source]
mirror(fin)[source]
operators()[source]
plotter(fin, max=1, sym=1)[source]
reduced_grad(n)[source]
sigma(n)[source]
spinflip(fin)[source]
square(fin)[source]