poisson
Module
Description
$Id$
- This module solves the Poisson equation
(d^2/dx^2 + d^2/dy^2 + d^2/dz^2 - h) f = RHS(x,y,z)
[which for h/=0 could also be called inhomogenous nonuniform Helmholtz equation] for the function f(x,y,z).
** AUTOMATIC CPARAM.INC GENERATION ************************ Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module
CPARAM logical, parameter :: lpoisson=.true.
MVAR CONTRIBUTION 0 MAUX CONTRIBUTION 0
Quick access
- Variables:
apply_boundcond,b,bessel_grid,bsmooth,calc_potential,check_setup,compute_acceleration,construct_large_grid,copy_density_large_grid,copy_potential_small_grid,coslt,decide_fourier_routine,dkr,dphi,dr,dr1,dth,dth1,du,dxc1,dxlt,dyc1,dz1,fft_fouriergrid,fourier_cosine_terms,fourier_to_physical_proc,fourier_to_physical_procs,gauss_seidel_iterate,generate_coordinates,generate_fourier_density,generate_kernals,generate_massfields,get_communication_matrix,gnewton,gphi,gr,innerradius,inverse_laplacian_expandgrid,inverse_laplacian_fft,inverse_laplacian_isoz,inverse_laplacian_logradial_fft,ipoisson_method,iproc_fourier,ipx_fourier,ipy_fourier,iregion,irl,iroot,iru,iteration_threshold,ixlower_fourier,ixupper_fourier,iylower_fourier,iyupper_fourier,jrl,jru,kkx_fft,kky_fft,kphi,kphi_fft_imag,kphi_fft_real,kr_fft,kr_fft_imag,kr_fft_real,krl,kru,legendre_qmod,lexpand_grid,lisoz,lklimit_shear,lkmax,lkmin,lmakecartoon,lnorepeatsumming,lprecalcdists,lrazor_thin,lreadoctree,lsemispectral,lshowtime,lsolve_bessel,lsolve_cyl2cart,lsolve_relax_sor,lsquareregions,ltreestatus,luseprevioussum,lwriteoctree,m_fft,mmax,ngroup,niter_poisson,nkhgrid,nkr,nkt,nktgrid,nlt,nnx,nny,nprecalc,nsingle,nslice,nth,nthgrid,octree_maxdist,octree_smoothdist,octree_theta,phi2d,phi2d_global,phi_previous_step,physical_to_fourier_proc,physical_to_fourier_procs,r2_ext,r2_int,rad1,refine,regdist1_group,regdist1_single,regsmooth_group,regsmooth_single,remap_to_pencil_fouriergrid,residual,restrict,rhs_previous_step,rjac,rn,sinlt,smooth_full_weight,sphi,sphi_fft_imag,sphi_fft_real,sqrtrad_1,sr,sr_fft_imag,sr_fft_real,stop_fatal,themap_group,themap_single,theta0,theta1,tht,transp_pencil_fouriergrid,trilinear_interpolate,u2d,u2d_global,unmap_from_pencil_fouriergrid,v_cycle,vols,xc0,xlt,xmesh,xrecv,yc0,ymesh,yrecv,zed,zmesh,zrecv- Routines:
calculate_cross_bessel_functions(),calculate_cross_legendre_functions(),do_barneshut(),five_point_solver(),get_acceleration(),get_border_values(),get_dist(),get_serial_array(),initialize_poisson(),integrate_border(),inverse_laplacian(),inverse_laplacian_bessel(),inverse_laplacian_cyl2cart(),inverse_laplacian_fft_z(),inverse_laplacian_semispectral(),inverse_laplacian_sor(),inverse_laplacian_z_2nd_neumann(),mkmap(),read_octree(),read_poisson_init_pars(),read_poisson_run_pars(),roundtwo(),sincoslf(),write_octree(),write_poisson_init_pars(),write_poisson_run_pars()
Needed modules
Variables
- poisson/decide_fourier_routine [private]
- poisson/inverse_laplacian_fft [private]
- poisson/inverse_laplacian_isoz [private]
- poisson/kmax [real,private/optional/default=0.0]
- poisson/lexpand_grid [logical,private/optional/default=.false.]
- poisson/lisoz [logical,private/optional/default=.false.]
- poisson/lklimit_shear [logical,private/optional/default=.false.]
- poisson/lrazor_thin [logical,private/optional/default=.false.]
- poisson/lsemispectral [logical,private/optional/default=.false.]
- poisson/luse_fourier_transform [logical,private/optional/default=.false.]
Subroutines and functions
- subroutine poisson/initialize_poisson()
Perform any post-parameter-read initialization i.e. calculate derived parameters.
18-oct-07/anders: adapted
- subroutine poisson/inverse_laplacian(phi)
Dispatch solving the Poisson equation to inverse_laplacian_fft or inverse_laplacian_semispectral, based on the boundary conditions
17-jul-2007/wolf: coded wrapper
- subroutine poisson/inverse_laplacian_semispectral(phi)
Solve the Poisson equation by Fourier transforming in the xy-plane and solving the discrete matrix equation in the z-direction.
19-dec-2006/anders: coded
- Parameters:
- Use :
- Call to:
svn_id(),fourier_transform_shear_xy(),fourier_transform_xy(),transp_xz(),tridag(),transp_zx(),cffti(),fatal_error(),cfftf(),cfftb()
- subroutine poisson/inverse_laplacian_fft_z(phi)
Solve the Poisson equation with nxgrid = nygrid /= nzgrid.
10-sep-2009/ccyang: coded
- Parameters:
- Use :
- Call to:
cffti(),fourier_transform_shear_xy(),fourier_transform_xy(),fatal_error(),transp_xz(),cfftf(),cfftb(),transp_zx()
- subroutine poisson/inverse_laplacian_z_2nd_neumann(f)
19-mar-2018/MR: coded Second-order version in the vertical direction that uses tridag_neumann. On input: phi=div(U), on output: phi=potential of the irrotational flow.
- Parameters:
f (,,*,*) [real,inout]
- Use :
fourier(fourier_transform_xy(),kx_fft2(),ky_fft2()),mpicomm(transp_xz(),transp_zx())- Call to:
- subroutine poisson/read_poisson_init_pars(iomsg)
- Parameters:
iomsg [character,out]
- Use :
- subroutine poisson/write_poisson_init_pars(unit)
- Parameters:
unit [integer,in]
- subroutine poisson/read_poisson_run_pars(iomsg)
- Parameters:
iomsg [character,out]
- Use :
- subroutine poisson/write_poisson_run_pars(unit)
- Parameters:
unit [integer,in]