OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Member Functions | Private Attributes | List of all members
CoreFitSC::MomentSums Class Reference

#include <CoreFitSC.h>

Collaboration diagram for CoreFitSC::MomentSums:
Collaboration graph
[legend]

Public Member Functions

 MomentSums (const Vector_t &centre, double gamma)
 
void add (double q, const Vector_t &r)
 Adds a particle of charge q at r (local frame, not rest frame)
 
CoreMoments reduce (const Reducer &reducer) const
 Moments of all ranks' particles: one sum of 10 doubles.
 

Private Attributes

Vector_t centre_m
 
double gamma_m
 
std::array< double, 10 > sums_m
 

Detailed Description

Local sums of q, q s and q s_i s_j (10 numbers) over the particles added, with s the rest-frame position about a fixed centre (the core box centre, for conditioning).

Definition at line 219 of file CoreFitSC.h.

Constructor & Destructor Documentation

◆ MomentSums()

CoreFitSC::MomentSums::MomentSums ( const Vector_t &  centre,
double  gamma 
)

Definition at line 252 of file CoreFitSC.cpp.

References sums_m.

Member Function Documentation

◆ add()

void CoreFitSC::MomentSums::add ( double  q,
const Vector_t &  r 
)

Adds a particle of charge q at r (local frame, not rest frame)

Definition at line 260 of file CoreFitSC.cpp.

References CoreFitSC::toRestFrame().

Referenced by PartBunch::computeFarField().

Here is the call graph for this function:

◆ reduce()

CoreFitSC::CoreMoments CoreFitSC::MomentSums::reduce ( const Reducer &  reducer) const

Moments of all ranks' particles: one sum of 10 doubles.

Definition at line 276 of file CoreFitSC.cpp.

References CoreFitSC::CoreMoments::centroid, CoreFitSC::CoreMoments::charge, CoreFitSC::CoreMoments::quadrupole, CoreFitSC::Reducer::sum(), and trace().

Referenced by PartBunch::computeFarField().

Here is the call graph for this function:

Member Data Documentation

◆ centre_m

Vector_t CoreFitSC::MomentSums::centre_m
private

Definition at line 230 of file CoreFitSC.h.

◆ gamma_m

double CoreFitSC::MomentSums::gamma_m
private

Definition at line 231 of file CoreFitSC.h.

◆ sums_m

std::array<double, 10> CoreFitSC::MomentSums::sums_m
private

Definition at line 232 of file CoreFitSC.h.

Referenced by MomentSums().


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