OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <P3MPoissonSolver.h>
Public Member Functions | |
P3MPoissonSolver (Mesh_t *mesh, FieldLayout_t *fl, double interaction_radius, double alpha, double eps) | |
~P3MPoissonSolver () | |
void | initFields () |
void | calculateGridForces (PartBunchBase< double, 3 > *bunch, double interaction_radius, double alpha, double eps) |
void | calculatePairForces (PartBunchBase< double, 3 > *bunch, double interaction_radius, double alpha, double eps) |
void | computePotential (Field_t &rho, Vector_t hr, double zshift) |
void | computePotential (Field_t &rho, Vector_t hr) |
void | applyConstantFocusing (PartBunchBase< double, 3 > *bunch, double f, double r) |
void | test (PartBunchBase< double, 3 > *bunch) |
double | getXRangeMin (unsigned short level) |
double | getXRangeMax (unsigned short level) |
double | getYRangeMin (unsigned short level) |
double | getYRangeMax (unsigned short level) |
double | getZRangeMin (unsigned short level) |
double | getZRangeMax (unsigned short level) |
void | computeAvgSpaceChargeForces (PartBunchBase< double, 3 > *bunch) |
void | compute_temperature (PartBunchBase< double, 3 > *bunch) |
Inform & | print (Inform &os) const |
![]() | |
virtual void | solve (AmrScalarFieldContainer_t &rho, AmrScalarFieldContainer_t &phi, AmrVectorFieldContainer_t &efield, unsigned short baseLevel, unsigned short finestLevel, bool prevAsGuess=true) |
virtual void | hasToRegrid () |
virtual | ~PoissonSolver () |
Public Attributes | |
Vektor< double, 3 > | extend_l |
Vektor< double, 3 > | extend_r |
Private Attributes | |
BConds< double, Dim, Mesh_t, Center_t > | bc_m |
BConds< double, Dim, Mesh_t, Center_t > | bcp_m |
BConds< Vector_t, Dim, Mesh_t, Center_t > | vbc_m |
Field_t | rho_m |
Field_t | phi_m |
VField_t | eg_m |
Field_t | greentr_m |
CxField_t | rhocmpl_m |
CxField_t | grncmpl_m |
CxField_t | grntr_m |
std::unique_ptr< FFTC_t > | fft_m |
IField_t | grnIField_m [3] |
Mesh_t * | mesh_m |
FieldLayout_t * | layout_m |
Field_t | tmpgreen |
NDIndex< 3 > | domain_m |
NDIndex< 3 > | domainP3MConstruct_m |
double | interaction_radius_m |
double | alpha_m |
double | eps_m |
Vector_t | hr_m |
Vektor< int, 3 > | nr_m |
Vektor< double, Dim > | avgEF_m |
double | globSumEf_m [Dim] |
Definition at line 41 of file P3MPoissonSolver.h.
P3MPoissonSolver::P3MPoissonSolver | ( | Mesh_t * | mesh, |
FieldLayout_t * | fl, | ||
double | interaction_radius, | ||
double | alpha, | ||
double | eps | ||
) |
Definition at line 112 of file P3MPoissonSolver.cpp.
References bc_m, bcp_m, Dim, domain_m, eg_m, fft_m, UniformCartesian< D, T >::get_meshSpacing(), FieldLayout< Dim >::getDomain(), IpplInfo::getNodes(), grncmpl_m, hr_m, Field< T, Dim, Mesh, Centering >::initialize(), layout_m, mesh_m, nr_m, phi_m, rho_m, rhocmpl_m, and vbc_m.
P3MPoissonSolver::~P3MPoissonSolver | ( | ) |
Definition at line 247 of file P3MPoissonSolver.cpp.
void P3MPoissonSolver::applyConstantFocusing | ( | PartBunchBase< double, 3 > * | bunch, |
double | f, | ||
double | r | ||
) |
Definition at line 352 of file P3MPoissonSolver.cpp.
References avgEF_m, dot(), PartBunchBase< T, Dim >::Ef, PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::R, and sqrt().
Referenced by test().
void P3MPoissonSolver::calculateGridForces | ( | PartBunchBase< double, 3 > * | bunch, |
double | interaction_radius, | ||
double | alpha, | ||
double | eps | ||
) |
Definition at line 266 of file P3MPoissonSolver.cpp.
References domain_m, PartBunchBase< T, Dim >::Ef, eg_m, fft_m, ParticleAttrib< T >::gather(), Grad1Ord(), grncmpl_m, hr_m, Field< T, Dim, Mesh, Centering >::initialize(), layout_m, lt(), mesh_m, nr_m, PartBunchBase< T, Dim >::Phi, phi_m, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, real(), rho_m, rhocmpl_m, ParticleAttrib< T >::scatter(), and where().
Referenced by test().
void P3MPoissonSolver::calculatePairForces | ( | PartBunchBase< double, 3 > * | bunch, |
double | interaction_radius, | ||
double | alpha, | ||
double | eps | ||
) |
Definition at line 250 of file P3MPoissonSolver.cpp.
References extend_l, extend_r, HashPairBuilderPeriodic< PBase >::for_each(), HashPairBuilderPeriodicParallel< PBase >::for_each(), and IpplInfo::getNodes().
Referenced by test().
void P3MPoissonSolver::compute_temperature | ( | PartBunchBase< double, 3 > * | bunch | ) |
Definition at line 370 of file P3MPoissonSolver.cpp.
References Dim, endl(), PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::getTotalNum(), PartBunchBase< T, Dim >::P, and reduce().
void P3MPoissonSolver::computeAvgSpaceChargeForces | ( | PartBunchBase< double, 3 > * | bunch | ) |
Definition at line 328 of file P3MPoissonSolver.cpp.
References avgEF_m, Dim, PartBunchBase< T, Dim >::Ef, fabs(), PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::getTotalNum(), globSumEf_m, and reduce().
Referenced by test().
Implements PoissonSolver.
Definition at line 323 of file P3MPoissonSolver.cpp.
Implements PoissonSolver.
Definition at line 365 of file P3MPoissonSolver.cpp.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 66 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 65 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 68 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 67 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 70 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 69 of file P3MPoissonSolver.h.
void P3MPoissonSolver::initFields | ( | ) |
Definition at line 186 of file P3MPoissonSolver.cpp.
References bc_m, bcp_m, Dim, domain_m, eg_m, fft_m, UniformCartesian< D, T >::get_meshSpacing(), FieldLayout< Dim >::getDomain(), IpplInfo::getNodes(), grncmpl_m, hr_m, Field< T, Dim, Mesh, Centering >::initialize(), layout_m, mesh_m, nr_m, phi_m, rho_m, rhocmpl_m, and vbc_m.
Referenced by test().
Definition at line 469 of file P3MPoissonSolver.cpp.
References alpha_m, endl(), eps_m, extend_l, extend_r, hr_m, interaction_radius_m, and nr_m.
Referenced by operator<<().
|
virtual |
Implements PoissonSolver.
Definition at line 406 of file P3MPoissonSolver.cpp.
References alpha_m, applyConstantFocusing(), assign(), PartBunchBase< T, Dim >::calcBeamParameters(), calculateGridForces(), calculatePairForces(), computeAvgSpaceChargeForces(), DataSink::dumpSDDS(), PartBunchBase< T, Dim >::Ef, endl(), eps_m, extend_l, extend_r, OpalData::getDataSink(), PartBunchBase< T, Dim >::getdT(), OpalData::getInstance(), hr_m, initFields(), interaction_radius_m, PartBunchBase< T, Dim >::M, nr_m, PartBunchBase< T, Dim >::P, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, and PartBunchBase< T, Dim >::update().
|
private |
Definition at line 123 of file P3MPoissonSolver.h.
Definition at line 130 of file P3MPoissonSolver.h.
Referenced by applyConstantFocusing(), and computeAvgSpaceChargeForces().
Definition at line 77 of file P3MPoissonSolver.h.
Referenced by initFields(), and P3MPoissonSolver().
Definition at line 78 of file P3MPoissonSolver.h.
Referenced by initFields(), and P3MPoissonSolver().
|
private |
Definition at line 115 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 119 of file P3MPoissonSolver.h.
|
private |
Definition at line 85 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 124 of file P3MPoissonSolver.h.
Vektor<double,3> P3MPoissonSolver::extend_l |
Definition at line 135 of file P3MPoissonSolver.h.
Referenced by calculatePairForces(), print(), and test().
Vektor<double,3> P3MPoissonSolver::extend_r |
Definition at line 136 of file P3MPoissonSolver.h.
Referenced by calculatePairForces(), print(), and test().
|
private |
Definition at line 98 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 131 of file P3MPoissonSolver.h.
Referenced by computeAvgSpaceChargeForces().
|
private |
Definition at line 88 of file P3MPoissonSolver.h.
|
private |
Definition at line 91 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 103 of file P3MPoissonSolver.h.
|
private |
Definition at line 95 of file P3MPoissonSolver.h.
|
private |
Definition at line 126 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), P3MPoissonSolver(), print(), and test().
|
private |
Definition at line 122 of file P3MPoissonSolver.h.
|
private |
Definition at line 108 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 107 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 127 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), P3MPoissonSolver(), print(), and test().
|
private |
Definition at line 83 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 82 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 90 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 112 of file P3MPoissonSolver.h.
Definition at line 79 of file P3MPoissonSolver.h.
Referenced by initFields(), and P3MPoissonSolver().