OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <MLPoissonSolver.h>
Public Member Functions | |
MLPoissonSolver (AmrBoxLib *itsAmrObject_p) | |
void | solve (AmrScalarFieldContainer_t &rho, AmrScalarFieldContainer_t &phi, AmrVectorFieldContainer_t &efield, unsigned short baseLevel, unsigned short finestLevel, bool prevAsGuess=true) |
double | getXRangeMin (unsigned short level=0) |
double | getXRangeMax (unsigned short level=0) |
double | getYRangeMin (unsigned short level=0) |
double | getYRangeMax (unsigned short level=0) |
double | getZRangeMin (unsigned short level=0) |
double | getZRangeMax (unsigned short level=0) |
Inform & | print (Inform &os) const |
Public Member Functions inherited from AmrPoissonSolver< AmrBoxLib > | |
AmrPoissonSolver (AmrBoxLib *itsAmrObject_p) | |
virtual | ~AmrPoissonSolver () |
void | computePotential (Field_t &, Vector_t) |
void | computePotential (Field_t &, Vector_t, double) |
void | test (PartBunchBase< double, 3 > *) |
void | hasToRegrid () |
Public Member Functions inherited from PoissonSolver | |
virtual | ~PoissonSolver () |
virtual void | resizeMesh (Vector_t &, Vector_t &, const Vector_t &, const Vector_t &, double) |
Private Types | |
typedef AmrBoxLib::AmrGeomContainer_t | GeomContainer_t |
typedef amrex::Vector< AmrBoxLib::AmrField_t * > | AmrFieldContainer_pt |
typedef amrex::Vector< const AmrBoxLib::AmrField_t * > | const_AmrFieldContainer_pt |
typedef AmrBoxLib::AmrGeometry_t | AmrGeometry_t |
typedef AmrBoxLib::AmrGrid_t | AmrGrid_t |
typedef AmrBoxLib::AmrProcMap_t | AmrProcMap_t |
typedef AmrBoxLib::AmrScalarFieldContainer_t | AmrScalarFieldContainer_t |
typedef AmrBoxLib::AmrVectorFieldContainer_t | AmrVectorFieldContainer_t |
typedef AmrBoxLib::AmrGridContainer_t | AmrGridContainer_t |
typedef AmrBoxLib::AmrProcMapContainer_t | AmrProcMapContainer_t |
Private Member Functions | |
void | mlmg_m (AmrScalarFieldContainer_t &rho, AmrScalarFieldContainer_t &phi, AmrVectorFieldContainer_t &efield, int baseLevel, int finestLevel) |
Private Attributes | |
double | reltol_m |
Relative tolearance for solver. More... | |
double | abstol_m |
Absolute tolerance for solver. More... | |
Additional Inherited Members | |
Protected Types inherited from PoissonSolver | |
typedef Field< int, 3, Mesh_t, Center_t > | IField_t |
typedef Field< std::complex< double >, 3, Mesh_t, Center_t > | CxField_t |
Protected Attributes inherited from AmrPoissonSolver< AmrBoxLib > | |
AmrBoxLib * | itsAmrObject_mp |
bool | regrid_m |
is set to true by itsAmrObject_mp and reset to false by solver More... | |
Definition at line 27 of file MLPoissonSolver.h.
|
private |
Definition at line 31 of file MLPoissonSolver.h.
|
private |
Definition at line 33 of file MLPoissonSolver.h.
|
private |
Definition at line 34 of file MLPoissonSolver.h.
|
private |
Definition at line 38 of file MLPoissonSolver.h.
|
private |
Definition at line 35 of file MLPoissonSolver.h.
Definition at line 39 of file MLPoissonSolver.h.
Definition at line 36 of file MLPoissonSolver.h.
Definition at line 37 of file MLPoissonSolver.h.
|
private |
Definition at line 32 of file MLPoissonSolver.h.
|
private |
Definition at line 30 of file MLPoissonSolver.h.
MLPoissonSolver::MLPoissonSolver | ( | AmrBoxLib * | itsAmrObject_p | ) |
This solver only works with AmrBoxLib. In order the solver to work the cells need to be of cubic shape. Otherwise the solver stops with the error message that it did not converge (AMReX internal).
itsAmrObject_p | has information about refinemen ratios, etc. |
Definition at line 31 of file MLPoissonSolver.cpp.
|
virtual |
Implements PoissonSolver.
Definition at line 60 of file MLPoissonSolver.cpp.
References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.
|
virtual |
Implements PoissonSolver.
Definition at line 55 of file MLPoissonSolver.cpp.
References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.
|
virtual |
Implements PoissonSolver.
Definition at line 70 of file MLPoissonSolver.cpp.
References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.
|
virtual |
Implements PoissonSolver.
Definition at line 65 of file MLPoissonSolver.cpp.
References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.
|
virtual |
Implements PoissonSolver.
Definition at line 80 of file MLPoissonSolver.cpp.
References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.
|
virtual |
Implements PoissonSolver.
Definition at line 75 of file MLPoissonSolver.cpp.
References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.
|
private |
Does the actual solve.
rho | charge density on grids [C / m] |
phi | electrostatic potential on grid [V] |
baseLevel | for solve |
finestLevel | for solve |
Definition at line 94 of file MLPoissonSolver.cpp.
References Options::info, and AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.
Referenced by solve().
Print information abour tolerances.
os | output stream where to write to |
Definition at line 85 of file MLPoissonSolver.cpp.
References abstol_m, endl(), and reltol_m.
|
virtual |
Multigrid solve based on AMReX FMultiGrid solver. The relative tolerance is set to 1.0e-9 and the absolute tolerance to 0.0.
rho | right-hand side charge density on grid [C / m] |
phi | electrostatic potential (unknown) [V] |
efield | electric field [V / m] |
baseLevel | for solve |
finestLevel | for solve |
prevAsGuess | use of previous solution as initial guess |
Reimplemented from PoissonSolver.
Definition at line 37 of file MLPoissonSolver.cpp.
References mlmg_m().
|
private |
Absolute tolerance for solver.
Definition at line 103 of file MLPoissonSolver.h.
Referenced by print().
|
private |
Relative tolearance for solver.
Definition at line 102 of file MLPoissonSolver.h.
Referenced by print().