|
WarpX
|
Namespaces | |
| details | |
Functions | |
| template<typename T_BoundaryHandler , typename T_PostPhiCalculationFunctor = std::nullopt_t, typename T_FArrayBoxFactory = void> | |
| void | computePhi (amrex::Vector< amrex::MultiFab *> const &rho, amrex::Vector< amrex::MultiFab *> &phi, std::array< amrex::Real, 3 > const beta, amrex::Real const relative_tolerance, amrex::Real absolute_tolerance, int const max_iters, int const verbosity, amrex::Vector< amrex::Geometry > const geom, amrex::Vector< amrex::DistributionMapping > const dmap, amrex::Vector< amrex::BoxArray > const grids, T_BoundaryHandler const boundary_handler, bool const do_single_precision_comms=false, std::optional< amrex::Vector< amrex::IntVect > > rel_ref_ratio=std::nullopt, [[maybe_unused]] T_PostPhiCalculationFunctor post_phi_calculation=std::nullopt, [[maybe_unused]] std::optional< amrex::Real const > current_time=std::nullopt, [[maybe_unused]] std::optional< amrex::Vector< T_FArrayBoxFactory const *> > eb_farray_box_factory=std::nullopt) |
| void ablastr::fields::computePhi | ( | amrex::Vector< amrex::MultiFab *> const & | rho, |
| amrex::Vector< amrex::MultiFab *> & | phi, | ||
| std::array< amrex::Real, 3 > const | beta, | ||
| amrex::Real const | relative_tolerance, | ||
| amrex::Real | absolute_tolerance, | ||
| int const | max_iters, | ||
| int const | verbosity, | ||
| amrex::Vector< amrex::Geometry > const | geom, | ||
| amrex::Vector< amrex::DistributionMapping > const | dmap, | ||
| amrex::Vector< amrex::BoxArray > const | grids, | ||
| T_BoundaryHandler const | boundary_handler, | ||
| bool const | do_single_precision_comms = false, |
||
| std::optional< amrex::Vector< amrex::IntVect > > | rel_ref_ratio = std::nullopt, |
||
| [[maybe_unused] ] T_PostPhiCalculationFunctor | post_phi_calculation = std::nullopt, |
||
| [[maybe_unused] ] std::optional< amrex::Real const > | current_time = std::nullopt, |
||
| [[maybe_unused] ] std::optional< amrex::Vector< T_FArrayBoxFactory const *> > | eb_farray_box_factory = std::nullopt |
||
| ) |
Compute the potential phi by solving the Poisson equation
Uses rho as a source, assuming that the source moves at a constant speed
. This uses the AMReX solver.
More specifically, this solves the equation
| T_BoundaryHandler | handler for boundary conditions, for example |
| T_PostPhiCalculationFunctor | a calculation per level directly after phi was calculated |
| T_FArrayBoxFactory | usually nothing or an amrex::EBFArrayBoxFactory (EB ONLY) |
| [in] | rho | The charge density a given species |
| [out] | phi | The potential to be computed by this function |
| [in] | beta | Represents the velocity of the source of phi |
| [in] | relative_tolerance | The relative convergence threshold for the MLMG solver |
| [in] | absolute_tolerance | The absolute convergence threshold for the MLMG solver |
| [in] | max_iters | The maximum number of iterations allowed for the MLMG solver |
| [in] | verbosity | The verbosity setting for the MLMG solver |
| [in] | geom | the geometry per level (e.g., from AmrMesh) |
| [in] | dmap | the distribution mapping per level (e.g., from AmrMesh) |
| [in] | grids | the grids per level (e.g., from AmrMesh) |
| [in] | boundary_handler | a handler for boundary conditions, for example |
| [in] | do_single_precision_comms | perform communications in single precision |
| [in] | rel_ref_ratio | mesh refinement ratio between levels (default: 1) |
| [in] | post_phi_calculation | perform a calculation per level directly after phi was calculated; required for embedded boundaries (default: none) |
| [in] | current_time | the current time; required for embedded boundaries (default: none) |
| [in] | eb_farray_box_factory | a factory for field data, |
1.8.13