OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MLPoissonSolver Class Reference

#include <MLPoissonSolver.h>

Inheritance diagram for MLPoissonSolver:
Inheritance graph
[legend]
Collaboration diagram for MLPoissonSolver:
Collaboration graph
[legend]

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)
 
Informprint (Inform &os) const
 
- Public Member Functions inherited from AmrPoissonSolver< AmrBoxLib >
 AmrPoissonSolver (AmrBoxLib *itsAmrObject_p)
 
virtual ~AmrPoissonSolver ()
 
void computePotential (Field_t &rho, Vector_t hr)
 
void computePotential (Field_t &rho, Vector_t hr, double zshift)
 
void test (PartBunchBase< double, 3 > *bunch)
 
void hasToRegrid ()
 
- Public Member Functions inherited from PoissonSolver
virtual ~PoissonSolver ()
 

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 Attributes inherited from AmrPoissonSolver< AmrBoxLib >
AmrBoxLibitsAmrObject_mp
 
bool regrid_m
 is set to true by itsAmrObject_mp and reset to false by solver More...
 

Detailed Description

Definition at line 7 of file MLPoissonSolver.h.

Member Typedef Documentation

Definition at line 11 of file MLPoissonSolver.h.

Definition at line 13 of file MLPoissonSolver.h.

Definition at line 14 of file MLPoissonSolver.h.

Definition at line 18 of file MLPoissonSolver.h.

Definition at line 15 of file MLPoissonSolver.h.

Definition at line 19 of file MLPoissonSolver.h.

Definition at line 16 of file MLPoissonSolver.h.

Definition at line 17 of file MLPoissonSolver.h.

Definition at line 12 of file MLPoissonSolver.h.

Definition at line 10 of file MLPoissonSolver.h.

Constructor & Destructor Documentation

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).

Parameters
itsAmrObject_phas information about refinemen ratios, etc.

Definition at line 11 of file MLPoissonSolver.cpp.

Member Function Documentation

double MLPoissonSolver::getXRangeMax ( unsigned short  level = 0)
virtual

Implements PoissonSolver.

Definition at line 40 of file MLPoissonSolver.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

double MLPoissonSolver::getXRangeMin ( unsigned short  level = 0)
virtual

Implements PoissonSolver.

Definition at line 35 of file MLPoissonSolver.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

double MLPoissonSolver::getYRangeMax ( unsigned short  level = 0)
virtual

Implements PoissonSolver.

Definition at line 50 of file MLPoissonSolver.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

double MLPoissonSolver::getYRangeMin ( unsigned short  level = 0)
virtual

Implements PoissonSolver.

Definition at line 45 of file MLPoissonSolver.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

double MLPoissonSolver::getZRangeMax ( unsigned short  level = 0)
virtual

Implements PoissonSolver.

Definition at line 60 of file MLPoissonSolver.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

double MLPoissonSolver::getZRangeMin ( unsigned short  level = 0)
virtual

Implements PoissonSolver.

Definition at line 55 of file MLPoissonSolver.cpp.

References AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp.

void MLPoissonSolver::mlmg_m ( AmrScalarFieldContainer_t rho,
AmrScalarFieldContainer_t phi,
AmrVectorFieldContainer_t efield,
int  baseLevel,
int  finestLevel 
)
private

Does the actual solve.

Parameters
rhocharge density on grids [C / m]
phielectrostatic potential on grid [V]
baseLevelfor solve
finestLevelfor solve

Definition at line 74 of file MLPoissonSolver.cpp.

References abstol_m, Options::info, AmrPoissonSolver< AmrBoxLib >::itsAmrObject_mp, and reltol_m.

Referenced by solve().

Inform & MLPoissonSolver::print ( Inform os) const

Print information abour tolerances.

Parameters
osoutput stream where to write to

Definition at line 65 of file MLPoissonSolver.cpp.

References abstol_m, endl(), and reltol_m.

Referenced by operator<<().

Here is the call graph for this function:

void MLPoissonSolver::solve ( AmrScalarFieldContainer_t rho,
AmrScalarFieldContainer_t phi,
AmrVectorFieldContainer_t efield,
unsigned short  baseLevel,
unsigned short  finestLevel,
bool  prevAsGuess = true 
)
virtual

Multigrid solve based on AMReX FMultiGrid solver. The relative tolerance is set to 1.0e-9 and the absolute tolerance to 0.0.

Parameters
rhoright-hand side charge density on grid [C / m]
phielectrostatic potential (unknown) [V]
efieldelectric field [V / m]
baseLevelfor solve
finestLevelfor solve
prevAsGuessuse of previous solution as initial guess

Reimplemented from PoissonSolver.

Definition at line 17 of file MLPoissonSolver.cpp.

References mlmg_m().

Here is the call graph for this function:

Member Data Documentation

double MLPoissonSolver::abstol_m
private

Absolute tolerance for solver.

Definition at line 83 of file MLPoissonSolver.h.

Referenced by mlmg_m(), and print().

double MLPoissonSolver::reltol_m
private

Relative tolearance for solver.

Definition at line 82 of file MLPoissonSolver.h.

Referenced by mlmg_m(), and print().


The documentation for this class was generated from the following files: