OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <P3MPoissonSolver.h>
Public Types | |
typedef FFT< CCTransform, 3, double > | FFTC_t |
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) |
double | getXRangeMax (unsigned short) |
double | getYRangeMin (unsigned short) |
double | getYRangeMax (unsigned short) |
double | getZRangeMin (unsigned short) |
double | getZRangeMax (unsigned short) |
void | computeAvgSpaceChargeForces (PartBunchBase< double, 3 > *bunch) |
void | compute_temperature (PartBunchBase< double, 3 > *bunch) |
Inform & | print (Inform &os) const |
![]() | |
virtual void | solve (AmrScalarFieldContainer_t &, AmrScalarFieldContainer_t &, AmrVectorFieldContainer_t &, unsigned short, unsigned short, bool=true) |
virtual void | hasToRegrid () |
virtual | ~PoissonSolver () |
virtual void | resizeMesh (Vector_t &, Vector_t &, const Vector_t &, const Vector_t &, double) |
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] |
Additional Inherited Members | |
![]() | |
typedef Field< int, 3, Mesh_t, Center_t > | IField_t |
typedef Field< std::complex< double >, 3, Mesh_t, Center_t > | CxField_t |
Definition at line 46 of file P3MPoissonSolver.h.
typedef FFT<CCTransform, 3, double> P3MPoissonSolver::FFTC_t |
Definition at line 49 of file P3MPoissonSolver.h.
P3MPoissonSolver::P3MPoissonSolver | ( | Mesh_t * | mesh, |
FieldLayout_t * | fl, | ||
double | interaction_radius, | ||
double | alpha, | ||
double | eps | ||
) |
Definition at line 119 of file P3MPoissonSolver.cpp.
References bc_m, bcp_m, Dim, domain_m, eg_m, fft_m, UniformCartesian< Dim, MFLOAT >::get_meshSpacing(), FieldLayout< Dim >::getDomain(), IpplInfo::getNodes(), grncmpl_m, hr_m, Field< T, Dim, M, C >::initialize(), layout_m, mesh_m, nr_m, phi_m, rho_m, rhocmpl_m, and vbc_m.
P3MPoissonSolver::~P3MPoissonSolver | ( | ) |
Definition at line 254 of file P3MPoissonSolver.cpp.
void P3MPoissonSolver::applyConstantFocusing | ( | PartBunchBase< double, 3 > * | bunch, |
double | f, | ||
double | r | ||
) |
Definition at line 359 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 273 of file P3MPoissonSolver.cpp.
References Physics::alpha, domain_m, PartBunchBase< T, Dim >::Ef, eg_m, fft_m, ParticleAttrib< T >::gather(), Grad1Ord(), grncmpl_m, hr_m, Field< T, Dim, M, C >::initialize(), layout_m, cmp_diff::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 257 of file P3MPoissonSolver.cpp.
References Physics::alpha, 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 377 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 335 of file P3MPoissonSolver.cpp.
References abs(), avgEF_m, Dim, PartBunchBase< T, Dim >::Ef, PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::getTotalNum(), globSumEf_m, and reduce().
Referenced by test().
Implements PoissonSolver.
Definition at line 372 of file P3MPoissonSolver.cpp.
Implements PoissonSolver.
Definition at line 330 of file P3MPoissonSolver.cpp.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 74 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 73 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 76 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 75 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 78 of file P3MPoissonSolver.h.
|
inlinevirtual |
Implements PoissonSolver.
Definition at line 77 of file P3MPoissonSolver.h.
void P3MPoissonSolver::initFields | ( | ) |
Definition at line 193 of file P3MPoissonSolver.cpp.
References bc_m, bcp_m, Dim, domain_m, eg_m, fft_m, UniformCartesian< Dim, MFLOAT >::get_meshSpacing(), FieldLayout< Dim >::getDomain(), IpplInfo::getNodes(), grncmpl_m, hr_m, Field< T, Dim, M, C >::initialize(), layout_m, mesh_m, nr_m, phi_m, rho_m, rhocmpl_m, and vbc_m.
Referenced by test().
Definition at line 476 of file P3MPoissonSolver.cpp.
References alpha_m, endl(), eps_m, extend_l, extend_r, hr_m, interaction_radius_m, and nr_m.
|
virtual |
Implements PoissonSolver.
Definition at line 413 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 131 of file P3MPoissonSolver.h.
Definition at line 138 of file P3MPoissonSolver.h.
Referenced by applyConstantFocusing(), and computeAvgSpaceChargeForces().
Definition at line 85 of file P3MPoissonSolver.h.
Referenced by initFields(), and P3MPoissonSolver().
Definition at line 86 of file P3MPoissonSolver.h.
Referenced by initFields(), and P3MPoissonSolver().
|
private |
Definition at line 123 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 127 of file P3MPoissonSolver.h.
|
private |
Definition at line 93 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 132 of file P3MPoissonSolver.h.
Vektor<double,3> P3MPoissonSolver::extend_l |
Definition at line 143 of file P3MPoissonSolver.h.
Referenced by calculatePairForces(), print(), and test().
Vektor<double,3> P3MPoissonSolver::extend_r |
Definition at line 144 of file P3MPoissonSolver.h.
Referenced by calculatePairForces(), print(), and test().
|
private |
Definition at line 106 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 139 of file P3MPoissonSolver.h.
Referenced by computeAvgSpaceChargeForces().
|
private |
Definition at line 96 of file P3MPoissonSolver.h.
|
private |
Definition at line 99 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 111 of file P3MPoissonSolver.h.
|
private |
Definition at line 103 of file P3MPoissonSolver.h.
|
private |
Definition at line 134 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), P3MPoissonSolver(), print(), and test().
|
private |
Definition at line 130 of file P3MPoissonSolver.h.
|
private |
Definition at line 116 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 115 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 135 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), P3MPoissonSolver(), print(), and test().
|
private |
Definition at line 91 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 98 of file P3MPoissonSolver.h.
Referenced by calculateGridForces(), initFields(), and P3MPoissonSolver().
|
private |
Definition at line 120 of file P3MPoissonSolver.h.
Definition at line 87 of file P3MPoissonSolver.h.
Referenced by initFields(), and P3MPoissonSolver().