OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Private Attributes | List of all members
OscillatingField< Field > Class Template Reference

An oscillating electromagnetic field. More...

#include <OscillatingField.h>

Inheritance diagram for OscillatingField< Field >:
Inheritance graph
[legend]
Collaboration diagram for OscillatingField< Field >:
Collaboration graph
[legend]

Public Member Functions

 OscillatingField ()
 Default constructor. More...
 
virtual ~OscillatingField ()
 
virtual double getFrequency () const
 Return the RF frequency in Hz. More...
 
virtual double getPhase () const
 Return the RF phase in rad. More...
 
virtual void setFrequency (double f)
 Assign the RF frequency in Hz. More...
 
virtual void setPhase (double phi)
 Assign the RF phase in rad. More...
 
virtual EVector Efield (const Point3D &point) const
 Get field. More...
 
virtual EVector Efield (const Point3D &point, double time) const
 Get field. More...
 
virtual BVector Bfield (const Point3D &point) const
 Get field. More...
 
virtual BVector Bfield (const Point3D &point, double time) const
 Get field. More...
 
- Public Member Functions inherited from Field< T, Dim, M, C >
 Field ()
 
virtual ~Field ()
 
 Field (Layout_t &)
 
 Field (Layout_t &, const GuardCellSizes< Dim > &)
 
 Field (Layout_t &, const BConds< T, Dim, M, C > &)
 
 Field (Layout_t &, const GuardCellSizes< Dim > &, const BConds< T, Dim, M, C > &)
 
 Field (Layout_t &, const BConds< T, Dim, M, C > &, const GuardCellSizes< Dim > &)
 
 Field (FieldSpec< T, Dim, M, C > &)
 
constexpr Field (Field< T, Dim, M, C > &)=default
 
 Field (Mesh_t &, Layout_t &)
 
 Field (Mesh_t &, Layout_t &, const GuardCellSizes< Dim > &)
 
 Field (Mesh_t &, Layout_t &, const BConds< T, Dim, M, C > &)
 
 Field (Mesh_t &, Layout_t &, const GuardCellSizes< Dim > &, const BConds< T, Dim, M, C > &)
 
 Field (Mesh_t &, Layout_t &, const BConds< T, Dim, M, C > &, const GuardCellSizes< Dim > &)
 
 Field (Mesh_t &, FieldSpec< T, Dim, M, C > &)
 
void initialize (Layout_t &)
 
void initialize (Layout_t &, const GuardCellSizes< Dim > &)
 
void initialize (Layout_t &, const BConds< T, Dim, M, C > &)
 
void initialize (Layout_t &, const GuardCellSizes< Dim > &, const BConds< T, Dim, M, C > &)
 
void initialize (Layout_t &, const BConds< T, Dim, M, C > &, const GuardCellSizes< Dim > &)
 
void initialize (FieldSpec< T, Dim, M, C > &)
 
void initialize (Mesh_t &, Layout_t &)
 
void initialize (Mesh_t &, Layout_t &, const bool)
 
void initialize (Mesh_t &, Layout_t &, const GuardCellSizes< Dim > &)
 
void initialize (Mesh_t &, Layout_t &, const BConds< T, Dim, M, C > &)
 
void initialize (Mesh_t &, Layout_t &, const GuardCellSizes< Dim > &, const BConds< T, Dim, M, C > &)
 
void initialize (Mesh_t &, Layout_t &, const BConds< T, Dim, M, C > &, const GuardCellSizes< Dim > &)
 
void initialize (Mesh_t &, FieldSpec< T, Dim, M, C > &)
 
const bcond_valuegetBCond (int bc) const
 
bcond_valuegetBCond (int bc)
 
const bcond_containergetBConds () const
 
bcond_containergetBConds ()
 
bcond_iterator begin_BConds ()
 
bcond_iterator end_BConds ()
 
Mesh_tget_mesh () const
 
IndexedField< T, Dim, 1, M, C > operator[] (const Index &)
 
IndexedField< T, Dim, 1, M, C > operator[] (int)
 
IndexedField< T, Dim, Dim, M, C > operator[] (const NDIndex< Dim > &)
 
SubField< T, Dim, M, C, SIndex< Dim > > operator[] (const SIndex< Dim > &)
 
const Field< T, Dim, M, C > & operator= (T x)
 
const Field< T, Dim, M, C > & operator= (const Field< T, Dim, M, C > &x)
 
template<class X >
const Field< T, Dim, M, C > & operator= (const BareField< X, Dim > &x)
 
template<class B >
const Field< T, Dim, M, C > & operator= (const PETE_Expr< B > &x)
 
void fillGuardCells (bool reallyFill=true) const
 
void print_Centerings (std::ostream &)
 
virtual void Repartition (UserList *)
 
virtual void notifyUserOfDelete (UserList *)
 
- Public Member Functions inherited from BareField< T, Dim >
 BareField ()
 
 BareField (const BareField< T, Dim > &)
 
 BareField (Layout_t &)
 
 BareField (Layout_t &, const GuardCellSizes< Dim > &)
 
 ~BareField ()
 
void initialize (Layout_t &)
 
void initialize (Layout_t &, const bool)
 
void initialize (Layout_t &, const GuardCellSizes< Dim > &)
 
iterator_if begin_if ()
 
iterator_if end_if ()
 
const_iterator_if begin_if () const
 
const_iterator_if end_if () const
 
ac_id_larray::size_type size_if () const
 
void setGuardCells (const T &) const
 
void accumGuardCells ()
 
bool isDirty () const
 
void setDirtyFlag ()
 
void clearDirtyFlag ()
 
void fillGuardCellsIfNotDirty () const
 
Layout_tgetLayout () const
 
IndexedBareField< T, Dim, 1 > operator[] (const Index &idx)
 
IndexedBareField< T, Dim, 1 > operator[] (int i)
 
IndexedBareField< T, Dim, Dimoperator[] (const NDIndex< Dim > &nidx)
 
SubBareField< T, Dim, SIndex< Dim > > operator[] (const SIndex< Dim > &)
 
const GuardCellSizes< Dim > & getGC () const
 
const GuardCellSizes< Dim > & getGuardCellSizes () const
 
unsigned leftGuard (unsigned d) const
 
unsigned rightGuard (unsigned d) const
 
const IndexgetIndex (unsigned d) const
 
const NDIndex< Dim > & getDomain () const
 
const BareField< T, Dim > & operator= (T x)
 
const BareField< T, Dim > & operator= (const BareField< T, Dim > &x)
 
template<class X >
const BareField< T, Dim > & operator= (const BareField< X, Dim > &x)
 
template<class B >
const BareField< T, Dim > & operator= (const PETE_Expr< B > &x)
 
bool compressible () const
 
double CompressedFraction () const
 
void Compress () const
 
void Uncompress () const
 
void setCompression (bool compress)
 
iterator begin () const
 
iterator end () const
 
iterator beginLoc (const FieldLoc< Dim > &loc) const
 
void prepareForScalarCode (bool tryfill=true)
 
void finishScalarCode (bool modified=true)
 
T & localElement (const NDIndex< Dim > &) const
 
void getsingle (const NDIndex< Dim > &, T &) const
 
void write (std::ostream &)
 
iterator MakeExpression () const
 
- Public Member Functions inherited from FieldLayoutUser
 FieldLayoutUser ()
 
virtual ~FieldLayoutUser ()
 
- Public Member Functions inherited from User
 User ()
 
virtual ~User ()
 
ID_t get_Id () const
 
- Public Member Functions inherited from PETE_Expr< BareField< T, Dim > >
BareField< T, Dim > & PETE_unwrap ()
 
const BareField< T, Dim > & PETE_unwrap () const
 
- Public Member Functions inherited from DataSource
 DataSource ()
 
virtual ~DataSource ()
 
bool connected (DataConnect *=0) const
 
DataSourceObjectfindDataSourceObject (DataConnect *) const
 
DataConnectconnect (const char *, DataConnect *=0, int=DataSource::DEFAULT)
 
bool connect (DataSourceObject *)
 
bool disconnect (DataConnect *=0)
 
bool updateConnection (DataConnect *=0)
 
void interact (DataConnect *=0)
 
void interact (const char *, DataConnect *=0)
 

Private Attributes

double frequency
 
double phase
 

Additional Inherited Members

- Public Types inherited from Field< T, Dim, M, C >
typedef M Mesh_t
 
typedef C Centering_t
 
typedef BareField< T, DimBase_t
 
typedef FieldLayout< DimLayout_t
 
typedef BConds< T, Dim, M, C > bcond_container
 
typedef BCondBase< T, Dim, M, C > bcond_value
 
typedef bcond_container::iterator bcond_iterator
 
- Public Types inherited from BareField< T, Dim >
enum  { Dim_u = Dim }
 
enum  { IsExpr = 0 }
 
typedef T T_t
 
typedef FieldLayout< DimLayout_t
 
typedef LField< T, DimLField_t
 
typedef vmap< typename Unique::type, my_auto_ptr< LField< T, Dim > > > ac_id_larray
 
typedef ac_id_larray::iterator iterator_if
 
typedef ac_id_larray::const_iterator const_iterator_if
 
typedef LField< T, Dim >::iterator LFI
 
typedef BareFieldIterator< T, Dimiterator
 
typedef iterator PETE_Expr_t
 
- Public Types inherited from User
typedef Unique::type ID_t
 
- Public Types inherited from PETE_Expr< BareField< T, Dim > >
typedef BareField< T, DimWrapped
 
- Public Types inherited from DataSource
enum  DsMode { INPUT , OUTPUT , BOTH , DEFAULT }
 
typedef std::vector< DataSourceObject * > container_t
 
- Protected Member Functions inherited from Field< T, Dim, M, C >
virtual DataSourceObjectcreateDataSourceObject (const char *, DataConnect *, int)
 
- Protected Attributes inherited from BareField< T, Dim >
ac_id_larray Locals_ac
 
- Protected Attributes inherited from User
ID_t Id
 

Detailed Description

template<class Field>
class OscillatingField< Field >

An oscillating electromagnetic field.

Definition at line 37 of file OscillatingField.h.

Constructor & Destructor Documentation

◆ OscillatingField()

template<class Field >
OscillatingField< Field >::OscillatingField

Default constructor.

Definition at line 87 of file OscillatingField.h.

◆ ~OscillatingField()

template<class Field >
OscillatingField< Field >::~OscillatingField
virtual

Definition at line 92 of file OscillatingField.h.

Member Function Documentation

◆ Bfield() [1/2]

template<class Field >
BVector OscillatingField< Field >::Bfield ( const Point3D point) const
virtual

Get field.

Definition at line 127 of file OscillatingField.h.

◆ Bfield() [2/2]

template<class Field >
BVector OscillatingField< Field >::Bfield ( const Point3D point,
double  time 
) const
virtual

Get field.

Definition at line 132 of file OscillatingField.h.

References cos().

Here is the call graph for this function:

◆ Efield() [1/2]

template<class Field >
EVector OscillatingField< Field >::Efield ( const Point3D point) const
virtual

Get field.

Definition at line 117 of file OscillatingField.h.

◆ Efield() [2/2]

template<class Field >
EVector OscillatingField< Field >::Efield ( const Point3D point,
double  time 
) const
virtual

Get field.

Definition at line 122 of file OscillatingField.h.

References cos().

Here is the call graph for this function:

◆ getFrequency()

template<class Field >
double OscillatingField< Field >::getFrequency
inlinevirtual

Return the RF frequency in Hz.

Definition at line 97 of file OscillatingField.h.

Referenced by RFCavityRep::getFrequency(), and TravelingWaveRep::getFrequency().

◆ getPhase()

template<class Field >
double OscillatingField< Field >::getPhase
inlinevirtual

Return the RF phase in rad.

Definition at line 102 of file OscillatingField.h.

Referenced by RFCavityRep::getPhase(), and TravelingWaveRep::getPhase().

◆ setFrequency()

template<class Field >
void OscillatingField< Field >::setFrequency ( double  f)
inlinevirtual

Assign the RF frequency in Hz.

Definition at line 107 of file OscillatingField.h.

Referenced by RFCavityRep::setFrequency(), and TravelingWaveRep::setFrequency().

◆ setPhase()

template<class Field >
void OscillatingField< Field >::setPhase ( double  phi)
inlinevirtual

Assign the RF phase in rad.

Definition at line 112 of file OscillatingField.h.

Referenced by RFCavityRep::setPhase(), and TravelingWaveRep::setPhase().

Member Data Documentation

◆ frequency

template<class Field >
double OscillatingField< Field >::frequency
private

Definition at line 78 of file OscillatingField.h.

◆ phase

template<class Field >
double OscillatingField< Field >::phase
private

Definition at line 79 of file OscillatingField.h.


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