7#ifndef ABLASTR_IGF_SOLVER_H
8#define ABLASTR_IGF_SOLVER_H
24 using namespace amrex::literals;
40 amrex::Real
const r = std::sqrt( x*x + y*y + z*z );
41 amrex::Real
const G = - 0.5_rt * z*z * std::atan( x*y/(z*r) )
42 - 0.5_rt * y*y * std::atan( x*z/(y*r) )
43 - 0.5_rt * x*x * std::atan( y*z/(x*r) )
44 + y*z*std::asinh( x/std::sqrt(y*y + z*z) )
45 + x*z*std::asinh( y/std::sqrt(x*x + z*z) )
46 + x*y*std::asinh( z/std::sqrt(x*x + y*y) );
62 amrex::Real
const G = 3_rt*x*y
63 - x*x * std::atan(y/x)
64 - y*y * std::atan(x/y)
65 - x*y * std::log(x*x + y*y);
131 std::array<amrex::Real, 3>
const & cell_size,
132 bool is_igf_2d_slices);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
constexpr auto epsilon_0
vacuum permittivity: dielectric permittivity of vacuum [F/m]
Definition constant.H:152
constexpr auto pi
ratio of a circle's circumference to its diameter
Definition constant.H:29
Definition EffectivePotentialPoissonSolver.H:63
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real SumOfIntegratedPotential3D(amrex::Real x, amrex::Real y, amrex::Real z, amrex::Real dx, amrex::Real dy, amrex::Real dz)
add
Definition IntegratedGreenFunctionSolver.H:83
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real IntegratedPotential2D(amrex::Real x, amrex::Real y)
Implements equation 58 in https://doi.org/10.1016/j.jcp.2004.01.008.
Definition IntegratedGreenFunctionSolver.H:60
void computePhiIGF(amrex::MultiFab const &rho, amrex::MultiFab &phi, std::array< amrex::Real, 3 > const &cell_size, bool const is_igf_2d_slices)
Compute the electrostatic potential using the Integrated Green Function method as in http://dx....
Definition IntegratedGreenFunctionSolver.cpp:34
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real IntegratedPotential3D(amrex::Real x, amrex::Real y, amrex::Real z)
Implements equation 2 in https://doi.org/10.1103/PhysRevSTAB.10.129901 with some modification to symm...
Definition IntegratedGreenFunctionSolver.H:38
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real SumOfIntegratedPotential2D(amrex::Real x, amrex::Real y, amrex::Real dx, amrex::Real dy)
add
Definition IntegratedGreenFunctionSolver.H:109