|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
#include <Astra1DDynamic.h>


Public Member Functions | |
| virtual bool | getFieldstrength (const Vector_t< double, 3 > &R, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B) const override |
| Get the field strength at a given point. | |
| virtual bool | getFieldDerivative (const Vector_t< double, 3 > &R, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B, const DiffDirection &dir) const override |
| Get the field derivative with respect to a direction. | |
| virtual void | getFieldDimensions (double &zBegin, double &zEnd) const override |
| Get the longitudinal dimensions of the field. | |
| virtual void | getFieldDimensions (double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const override |
| Get the full 3D bounding box of the field. | |
| virtual void | swap () override |
| Swap coordinates. | |
| virtual void | getInfo (Inform *msg) override |
| Print info about the field map. | |
| virtual double | getFrequency () const override |
| Get the frequency. | |
| virtual void | setFrequency (double freq) override |
| Set the frequency. | |
| bool | isInside (const Vector_t< double, 3 > &r) const override |
| Checks if the given coordinate is inside the volume covered by the fieldmap. | |
| void | applyField (std::shared_ptr< ParticleContainer_t > pc, double) override |
| Apply the FM to all the particles. | |
| void | applyRFField (std::shared_ptr< ParticleContainer_t > pc, double electricScale, double magneticScale, double startField, double endField) |
| Apply RF-scaled Astra1DDynamic field to all particles. | |
| void | applyTravelingWave (std::shared_ptr< ParticleContainer_t > pc, double entryElectricScale, double entryMagneticScale, double core1ElectricScale, double core1MagneticScale, double core2ElectricScale, double core2MagneticScale, double exitElectricScale, double exitMagneticScale, double startField, double startCoreField, double startExitField, double mappedStartExitField, double periodLength, double cellLength, double elementLength) |
| Apply the traveling-wave RF field map to all particles. | |
| virtual void | getOnaxisEz (std::vector< std::pair< double, double > > &F) override |
| virtual void | setEdgeConstants (const double &bendAngle, const double &entranceAngle, const double &exitAngle) |
| virtual void | setFieldLength (const double &) |
| virtual void | get1DProfile1EngeCoeffs (std::vector< double > &engeCoeffsEntry, std::vector< double > &engeCoeffsExit) |
| virtual void | get1DProfile1EntranceParam (double &entranceParameter1, double &entranceParameter2, double &entranceParameter3) |
| virtual void | get1DProfile1ExitParam (double &exitParameter1, double &exitParameter2, double &exitParameter3) |
| virtual double | getFieldGap () |
| virtual void | setFieldGap (double gap) |
| MapType | getType () |
| template<class T > | |
| bool | interpretLine (std::ifstream &in, T &value, const bool &file_length_known) |
| Parses a single value of type T from a line in the stream. | |
Static Public Member Functions | |
| template<class ViewType > | |
| static KOKKOS_INLINE_FUNCTION void | computeField (const Vector_t< double, 3 > &R, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B, const ViewType &FourCoefs, double zbegin, double length, double xlrep, int accuracy) |
| template<class ViewType > | |
| static KOKKOS_INLINE_FUNCTION void | computeRFField (const Vector_t< double, 3 > &R, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B, const ViewType &FourCoefs, double zbegin, double zend, double length, double xlrep, int accuracy, double electricScale, double magneticScale, double startField, double endField) |
| template<class ViewType > | |
| static KOKKOS_INLINE_FUNCTION void | computeTravelingWaveField (const Vector_t< double, 3 > &R, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B, const ViewType &FourCoefs, double zbegin, double zend, double length, double xlrep, int accuracy, double entryElectricScale, double entryMagneticScale, double core1ElectricScale, double core1MagneticScale, double core2ElectricScale, double core2MagneticScale, double exitElectricScale, double exitMagneticScale, double startCoreField, double startExitField, double mappedStartExitField, double periodLength, double cellLength, double elementLength) |
| static Fieldmap * | getFieldmap (std::string Filename, bool fast=false) |
| Get a field map instance. Use this factory method to obtain a field map. It checks the cache (FieldmapDictionary) first. | |
| static std::vector< std::string > | getListFieldmapNames () |
| Get a list of all loaded field map names. | |
| static void | deleteFieldmap (std::string Filename) |
| Delete a specific field map from the cache and memory. | |
| static void | clearDictionary () |
| Clear the entire field map cache. | |
| static MapType | readHeader (std::string Filename) |
| Read the header of a field map file to determine its type. | |
| static void | readMap (std::string Filename) |
| Trigger the actual reading of the field map data. | |
| static void | freeMap (std::string Filename) |
| Decrease reference count or delete field map if unused. | |
| static std::string | typeset_msg (const std::string &msg, const std::string &title) |
Protected Member Functions | |
| void | getLine (std::ifstream &in, std::string &buffer) |
| template<class S > | |
| bool | interpretLine (std::ifstream &in, S &value, const bool &file_length_known=true) |
| template<class S , class T > | |
| bool | interpretLine (std::ifstream &in, S &value1, T &value2, const bool &file_length_known=true) |
| Parses two values (types S, T) from a line. | |
| template<class S , class T , class U > | |
| bool | interpretLine (std::ifstream &in, S &value1, T &value2, U &value3, const bool &file_length_known=true) |
| Parses three values (types S, T, U) from a line. | |
| template<class S , class T , class U , class V > | |
| bool | interpretLine (std::ifstream &in, S &value1, T &value2, U &value3, V &value4, const bool &file_length_known=true) |
| Parses four values (types S, T, U, V) from a line. | |
| template<class S > | |
| bool | interpretLine (std::ifstream &in, S &value1, S &value2, S &value3, S &value4, S &value5, S &value6, const bool &file_length_known=true) |
| Parses six values of the same type S from a line. | |
| bool | interpreteEOF (std::ifstream &in) |
| void | interpretWarning (const std::ios_base::iostate &state, const bool &read_all, const std::string &error_msg, const std::string &found) |
| void | missingValuesWarning () |
| void | exceedingValuesWarning () |
| void | disableFieldmapWarning () |
| void | noFieldmapWarning () |
| void | lowResolutionWarning (double squareError, double maxError) |
| void | checkMap (unsigned int accuracy, std::pair< double, double > fieldDimensions, double deltaZ, const std::vector< double > &fourierCoefficients, gsl_spline *splineCoefficients, gsl_interp_accel *splineAccelerator) |
| void | checkMap (unsigned int accuracy, double length, const std::vector< double > &zSampling, const std::vector< double > &fourierCoefficients, gsl_spline *splineCoefficients, gsl_interp_accel *splineAccelerator) |
| void | write3DField (unsigned int nx, unsigned int ny, unsigned int nz, const std::pair< double, double > &xrange, const std::pair< double, double > &yrange, const std::pair< double, double > &zrange, const std::vector< Vector_t< double, 3 > > &ef, const std::vector< Vector_t< double, 3 > > &bf) |
Static Protected Member Functions | |
| static void | getLine (std::ifstream &in, int &lines_read, std::string &buffer) |
Protected Attributes | |
| MapType | Type |
| std::string | Filename_m |
| int | lines_read_m |
| bool | normalize_m |
Private Member Functions | |
| Astra1DDynamic (const std::string &filename) | |
| ~Astra1DDynamic () | |
| void | readMap () override |
| Pure virtual method to read the map data. Called by the public static readMap(). | |
| void | freeMap () override |
| Pure virtual method to free the map data. | |
Private Attributes | |
| Kokkos::DualView< double * > | FourCoefs_m |
| Fourier coefficients of Ez(z) (device-accessible) Stored as: [a0, a1, b1, a2, b2, ..., aN, bN] and used in the reconstruction Ez(z) = a0 + sum_l [ a_l cos(l*kz) - b_l sin(l*kz) ]. | |
| double | frequency_m |
| double | zbegin_m |
| Z Bounds relative to element edge. | |
| double | zend_m |
| double | xlrep_m |
| Wave number (omega / c) | |
| double | length_m |
| Effective periodic length of the field map [m]. | |
| int | accuracy_m |
| Number of Fourier modes used. | |
| int | num_gridpz_m |
| Number of grid points in z-direction (input sampling) | |
Static Private Attributes | |
| static char | buffer_m [256] |
| static std::string | alpha_numeric |
| static std::map< std::string, FieldmapDescription > | FieldmapDictionary |
Friends | |
| class | Fieldmap |
| Allow Fieldmap factory access. | |
Definition at line 10 of file Astra1DDynamic.h.
|
private |
Definition at line 16 of file Astra1DDynamic.cpp.
References accuracy_m, Astra1DDynamic(), Physics::c, Fieldmap::disableFieldmapWarning(), Fieldmap::Filename_m, frequency_m, length_m, Fieldmap::lines_read_m, Units::MHz2Hz, Fieldmap::noFieldmapWarning(), Fieldmap::normalize_m, num_gridpz_m, TAstraDynamic, Util::toUpper(), Physics::two_pi, Fieldmap::Type, xlrep_m, zbegin_m, and zend_m.
Referenced by Astra1DDynamic().

|
private |
Definition at line 95 of file Astra1DDynamic.cpp.
References freeMap(), and ~Astra1DDynamic().
Referenced by ~Astra1DDynamic().

|
overridevirtual |
Apply the FM to all the particles.
| pc | Particle container |
| pc | Particle container |
| scale | Scaling factor for the field (currently not used) |
Implements Fieldmap.
Definition at line 280 of file Astra1DDynamic.cpp.
References accuracy_m, applyField(), computeField(), FourCoefs_m, length_m, xlrep_m, zbegin_m, and zend_m.
Referenced by applyField().

| void Astra1DDynamic::applyRFField | ( | std::shared_ptr< ParticleContainer_t > | pc, |
| double | electricScale, | ||
| double | magneticScale, | ||
| double | startField, | ||
| double | endField | ||
| ) |
Apply RF-scaled Astra1DDynamic field to all particles.
Used by RFCavity. The static fieldmap is evaluated on device and then scaled with the RF electric and magnetic phase factors.
| pc | Particle container. |
| electricScale | Scale factor applied to E. |
| magneticScale | Scale factor applied to B. |
| startField | Longitudinal start of the cavity field region. |
| endField | Longitudinal end of the cavity field region. |
Definition at line 309 of file Astra1DDynamic.cpp.
References accuracy_m, applyRFField(), computeRFField(), FourCoefs_m, length_m, xlrep_m, zbegin_m, and zend_m.
Referenced by applyRFField().

| void Astra1DDynamic::applyTravelingWave | ( | std::shared_ptr< ParticleContainer_t > | pc, |
| double | entryElectricScale, | ||
| double | entryMagneticScale, | ||
| double | core1ElectricScale, | ||
| double | core1MagneticScale, | ||
| double | core2ElectricScale, | ||
| double | core2MagneticScale, | ||
| double | exitElectricScale, | ||
| double | exitMagneticScale, | ||
| double | startField, | ||
| double | startCoreField, | ||
| double | startExitField, | ||
| double | mappedStartExitField, | ||
| double | periodLength, | ||
| double | cellLength, | ||
| double | elementLength | ||
| ) |
Apply the traveling-wave RF field map to all particles.
This is the device-safe path used by TravelingWave. It avoids calling the virtual Fieldmap::getFieldstrength() interface inside a Kokkos kernel and reproduces the traveling-wave cavity region logic directly on device.
The cavity is split into three longitudinal regions:
| pc | Particle container. |
| entryElectricScale | Scale factor applied to E in the entry region. |
| entryMagneticScale | Scale factor applied to B in the entry region. |
| core1ElectricScale | Scale factor applied to the first core contribution in E. |
| core1MagneticScale | Scale factor applied to the first core contribution in B. |
| core2ElectricScale | Scale factor applied to the second core contribution in E. |
| core2MagneticScale | Scale factor applied to the second core contribution in B. |
| exitElectricScale | Scale factor applied to E in the exit region. |
| exitMagneticScale | Scale factor applied to B in the exit region. |
| startField | Longitudinal beginning of the full traveling-wave structure. |
| startCoreField | Longitudinal beginning of the periodic core region. |
| startExitField | Longitudinal beginning of the exit region. |
| mappedStartExitField | Shift used to remap the exit region into field-map coordinates. |
| periodLength | Period length of the base field-map cell. |
| cellLength | Cell-to-cell longitudinal shift in the core region. |
| elementLength | Total longitudinal length of the traveling-wave element. |
Definition at line 334 of file Astra1DDynamic.cpp.
References accuracy_m, applyTravelingWave(), computeTravelingWaveField(), FourCoefs_m, length_m, xlrep_m, zbegin_m, and zend_m.
Referenced by applyTravelingWave().

|
protectedinherited |
Definition at line 346 of file Fieldmap.cpp.
References Fieldmap::checkMap(), Util::combineFilePath(), Fieldmap::Filename_m, OpalData::getInstance(), gsl_spline_eval(), Fieldmap::lowResolutionWarning(), and Physics::two_pi.

|
protectedinherited |
Definition at line 330 of file Fieldmap.cpp.
References Fieldmap::checkMap().
Referenced by Fieldmap::checkMap(), and Fieldmap::checkMap().

|
staticinherited |
Clear the entire field map cache.
Definition at line 160 of file Fieldmap.cpp.
References Fieldmap::clearDictionary(), and Fieldmap::FieldmapDictionary.
Referenced by Fieldmap::clearDictionary().

|
inlinestatic |
Definition at line 91 of file Astra1DDynamic.h.
References Physics::c, Physics::pi, and Physics::two_pi.
Referenced by applyField(), computeRFField(), computeTravelingWaveField(), and getFieldstrength().
|
inlinestatic |
Definition at line 134 of file Astra1DDynamic.h.
References computeField().
Referenced by applyRFField().

|
inlinestatic |
Definition at line 156 of file Astra1DDynamic.h.
References computeField().
Referenced by applyTravelingWave().

|
staticinherited |
Delete a specific field map from the cache and memory.
| Filename | The filename of the map to delete. |
Definition at line 158 of file Fieldmap.cpp.
References Fieldmap::deleteFieldmap(), and Fieldmap::freeMap().
Referenced by Fieldmap::deleteFieldmap().

|
protectedinherited |
Definition at line 489 of file Fieldmap.cpp.
References Fieldmap::disableFieldmapWarning(), and Fieldmap::Filename_m.
Referenced by Astra1DDynamic(), Astra1DMagnetoStatic::Astra1DMagnetoStatic(), Fieldmap::disableFieldmapWarning(), FM2DDynamic::FM2DDynamic(), and FM2DMagnetoStatic::FM2DMagnetoStatic().

|
protectedinherited |
Definition at line 479 of file Fieldmap.cpp.
References Fieldmap::exceedingValuesWarning(), Fieldmap::Filename_m, and Fieldmap::lines_read_m.
Referenced by Fieldmap::exceedingValuesWarning(), and Fieldmap::interpreteEOF().

|
overrideprivatevirtual |
Pure virtual method to free the map data.
Implements Fieldmap.
Definition at line 264 of file Astra1DDynamic.cpp.
References Fieldmap::Filename_m, FourCoefs_m, and freeMap().
Referenced by freeMap(), and ~Astra1DDynamic().

|
staticinherited |
Decrease reference count or delete field map if unused.
| Filename | The file to free. |
Definition at line 311 of file Fieldmap.cpp.
References Fieldmap::FieldmapDictionary, and Fieldmap::freeMap().
Referenced by Fieldmap::freeMap(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

|
virtualinherited |
Definition at line 590 of file Fieldmap.cpp.
References Fieldmap::get1DProfile1EngeCoeffs().
Referenced by Fieldmap::get1DProfile1EngeCoeffs().

|
virtualinherited |
Definition at line 593 of file Fieldmap.cpp.
References Fieldmap::get1DProfile1EntranceParam().
Referenced by Fieldmap::get1DProfile1EntranceParam().

|
virtualinherited |
Definition at line 597 of file Fieldmap.cpp.
References Fieldmap::get1DProfile1ExitParam().
Referenced by Fieldmap::get1DProfile1ExitParam().

|
overridevirtual |
Get the field derivative with respect to a direction.
Get the derivative of the field at position R.
| R | Position [m]. |
| E | Output derivative of Electric field. |
| B | Output derivative of Magnetic field. |
| dir | Direction of derivative (DX, DY, DZ). |
| R | Position |
| E | Electric Field |
| B | Derivate of the magnetic field (unused) |
Implements Fieldmap.
Definition at line 384 of file Astra1DDynamic.cpp.
References accuracy_m, FourCoefs_m, getFieldDerivative(), length_m, Physics::pi, Physics::two_pi, and zbegin_m.
Referenced by getFieldDerivative().

|
overridevirtual |
Get the full 3D bounding box of the field.
| xIni | Output minimum x [m]. |
| xFinal | Output maximum x [m]. |
| yIni | Output minimum y [m]. |
| yFinal | Output maximum y [m]. |
| zIni | Output minimum z [m]. |
| zFinal | Output maximum z [m]. |
Implements Fieldmap.
Definition at line 408 of file Astra1DDynamic.cpp.
References getFieldDimensions().

|
overridevirtual |
Get the longitudinal dimensions of the field.
| zBegin | Output start of field [m]. |
| zEnd | Output end of field [m]. |
Implements Fieldmap.
Definition at line 403 of file Astra1DDynamic.cpp.
References getFieldDimensions(), zbegin_m, and zend_m.
Referenced by getFieldDimensions(), and getFieldDimensions().

|
virtualinherited |
Definition at line 600 of file Fieldmap.cpp.
References Fieldmap::getFieldGap().
Referenced by Fieldmap::getFieldGap().

|
staticinherited |
Get a field map instance. Use this factory method to obtain a field map. It checks the cache (FieldmapDictionary) first.
Factory method to obtain a Fieldmap instance.
| Filename | The path to the field map file. |
| fast | If true, load a "fast" version if available (implementation dependent). |
Checks the FieldmapDictionary cache to see if the file is already loaded. If not, it calls readHeader() to determine the map type, instantiates the corresponding subclass, and adds it to the dictionary.
| Filename | Absolute path to the fieldmap file. |
| fast | Not implemented. Previously attempted to load a "fast" version. |
Found matching entry?
Return fieldmap pointer
Determine fieldmap type
Based on type:
Definition at line 72 of file Fieldmap.cpp.
References Fieldmap::FieldmapDictionary, Fieldmap::getFieldmap(), Fieldmap::readHeader(), T2DDynamic, T2DMagnetoStatic, TAstraDynamic, and TAstraMagnetoStatic.
Referenced by Fieldmap::getFieldmap().

|
overridevirtual |
Get the field strength at a given point.
| R | Position [m] relative to the field map origin. |
| E | Output Electric field [MV/m]. |
| B | Output Magnetic field [T]. |
Implements Fieldmap.
Definition at line 365 of file Astra1DDynamic.cpp.
References accuracy_m, computeField(), FourCoefs_m, getFieldstrength(), isInside(), length_m, xlrep_m, and zbegin_m.
Referenced by getFieldstrength().

|
overridevirtual |
Get the frequency.
Implements Fieldmap.
Definition at line 421 of file Astra1DDynamic.cpp.
References frequency_m, and getFrequency().
Referenced by getFrequency().

|
overridevirtual |
Print info about the field map.
Implements Fieldmap.
Definition at line 416 of file Astra1DDynamic.cpp.
References Fieldmap::Filename_m, getInfo(), zbegin_m, and zend_m.
Referenced by getInfo().

|
staticprotectedinherited |
Definition at line 414 of file Fieldmap.cpp.
References Fieldmap::alpha_numeric, Fieldmap::buffer_m, Fieldmap::getLine(), and READ_BUFFER_LENGTH.

|
inlineprotectedinherited |
Definition at line 237 of file Fieldmap.h.
References Fieldmap::getLine(), and Fieldmap::lines_read_m.
Referenced by Fieldmap::getLine(), Fieldmap::getLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::readHeader(), readMap(), Astra1DMagnetoStatic::readMap(), FM2DDynamic::readMap(), and FM2DMagnetoStatic::readMap().

|
staticinherited |
Get a list of all loaded field map names.
Definition at line 149 of file Fieldmap.cpp.
References Fieldmap::FieldmapDictionary, and Fieldmap::getListFieldmapNames().
Referenced by Fieldmap::getListFieldmapNames().

|
overridevirtual |
Reimplemented from Fieldmap.
Definition at line 430 of file Astra1DDynamic.cpp.
References Fieldmap::Filename_m, getOnaxisEz(), and num_gridpz_m.
Referenced by getOnaxisEz().

|
inlineinherited |
Definition at line 206 of file Fieldmap.h.
References Fieldmap::Type.
|
protectedinherited |
Definition at line 436 of file Fieldmap.cpp.
References Fieldmap::alpha_numeric, Fieldmap::buffer_m, Fieldmap::exceedingValuesWarning(), Fieldmap::interpreteEOF(), Fieldmap::lines_read_m, and READ_BUFFER_LENGTH.
Referenced by FM2DDynamic::FM2DDynamic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), and Fieldmap::interpreteEOF().

|
protectedinherited |
|
protectedinherited |
Parses six values of the same type S from a line.
Definition at line 176 of file Fieldmap.hpp.
References Fieldmap::getLine(), Fieldmap::interpretLine(), Fieldmap::interpretWarning(), and Fieldmap::missingValuesWarning().

|
protectedinherited |
Parses two values (types S, T) from a line.
Definition at line 55 of file Fieldmap.hpp.
References Fieldmap::getLine(), Fieldmap::interpretLine(), Fieldmap::interpretWarning(), and Fieldmap::missingValuesWarning().

|
protectedinherited |
Parses three values (types S, T, U) from a line.
Definition at line 92 of file Fieldmap.hpp.
References Fieldmap::getLine(), Fieldmap::interpretLine(), Fieldmap::interpretWarning(), and Fieldmap::missingValuesWarning().

|
protectedinherited |
Parses four values (types S, T, U, V) from a line.
Definition at line 132 of file Fieldmap.hpp.
References Fieldmap::getLine(), Fieldmap::interpretLine(), Fieldmap::interpretWarning(), and Fieldmap::missingValuesWarning().

|
inherited |
Parses a single value of type T from a line in the stream.
Reads a line using getLine(), then attempts to extract one value. Validates that the extraction matches the type and that no unexpected data remains on the line.
| in | Input file stream. |
| value | Output variable reference. |
| file_length_known | If false, EOF is acceptable. |
Definition at line 23 of file Fieldmap.hpp.
References Fieldmap::getLine(), Fieldmap::interpretLine(), Fieldmap::interpretWarning(), and Fieldmap::missingValuesWarning().

|
protectedinherited |
Definition at line 452 of file Fieldmap.cpp.
References Fieldmap::Filename_m, Fieldmap::interpretWarning(), and Fieldmap::lines_read_m.
Referenced by Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), and Fieldmap::interpretWarning().

|
inlineoverridevirtual |
Checks if the given coordinate is inside the volume covered by the fieldmap.
| r | Coordinate |
Implements Fieldmap.
Definition at line 85 of file Astra1DDynamic.h.
References zbegin_m, and zend_m.
Referenced by getFieldstrength().
|
protectedinherited |
Definition at line 503 of file Fieldmap.cpp.
References Fieldmap::Filename_m, OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), Fieldmap::lowResolutionWarning(), and Fieldmap::typeset_msg().
Referenced by Fieldmap::checkMap(), and Fieldmap::lowResolutionWarning().

|
protectedinherited |
Definition at line 470 of file Fieldmap.cpp.
References Fieldmap::Filename_m, Fieldmap::lines_read_m, and Fieldmap::missingValuesWarning().
Referenced by Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), Fieldmap::interpretLine(), and Fieldmap::missingValuesWarning().

|
protectedinherited |
Definition at line 496 of file Fieldmap.cpp.
References Fieldmap::Filename_m, and Fieldmap::noFieldmapWarning().
Referenced by Astra1DDynamic(), Astra1DMagnetoStatic::Astra1DMagnetoStatic(), FM2DDynamic::FM2DDynamic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), and Fieldmap::noFieldmapWarning().

|
staticinherited |
Read the header of a field map file to determine its type.
Determines the fieldmap type.
| Filename | The file to check. |
Definition at line 174 of file Fieldmap.cpp.
References Fieldmap::getLine(), Fieldmap::lines_read_m, Fieldmap::readHeader(), T1DDynamic, T1DElectroStatic, T1DMagnetoStatic, T1DProfile1, T2DDynamic, T2DElectroStatic, T2DMagnetoStatic, T3DDynamic, T3DDynamicH5Block, T3DElectroStatic, T3DMagnetoStatic, T3DMagnetoStatic_Extended, T3DMagnetoStaticH5Block, TAstraDynamic, TAstraElectroStatic, TAstraMagnetoStatic, and UNKNOWN.
Referenced by Fieldmap::getFieldmap(), and Fieldmap::readHeader().

|
overrideprivatevirtual |
Pure virtual method to read the map data. Called by the public static readMap().
Implements Fieldmap.
Definition at line 97 of file Astra1DDynamic.cpp.
References accuracy_m, Fieldmap::Filename_m, FourCoefs_m, Fieldmap::getLine(), gsl_interp_accel_alloc(), gsl_interp_accel_free(), gsl_interp_cspline, gsl_spline_alloc(), gsl_spline_eval(), gsl_spline_free(), gsl_spline_init(), Fieldmap::normalize_m, num_gridpz_m, readMap(), Physics::two_pi, Units::Vpm2MVpm, zbegin_m, and zend_m.
Referenced by readMap().

|
staticinherited |
Trigger the actual reading of the field map data.
| Filename | The file to read. |
Definition at line 301 of file Fieldmap.cpp.
References Fieldmap::FieldmapDictionary, and Fieldmap::readMap().
Referenced by Fieldmap::readMap(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

|
virtualinherited |
Definition at line 408 of file Fieldmap.cpp.
References Fieldmap::setEdgeConstants().
Referenced by Fieldmap::setEdgeConstants().

|
virtualinherited |
Definition at line 602 of file Fieldmap.cpp.
References Fieldmap::setFieldGap().
Referenced by Fieldmap::setFieldGap().

|
virtualinherited |
Definition at line 412 of file Fieldmap.cpp.
References Fieldmap::setFieldLength().
Referenced by Fieldmap::setFieldLength().

|
overridevirtual |
Set the frequency.
| freq | Frequency [MHz]. |
Implements Fieldmap.
Definition at line 423 of file Astra1DDynamic.cpp.
References frequency_m, and setFrequency().
Referenced by setFrequency().

|
overridevirtual |
Swap coordinates.
Implements Fieldmap.
Definition at line 414 of file Astra1DDynamic.cpp.
References swap().
Referenced by swap().

|
staticinherited |
Definition at line 527 of file Fieldmap.cpp.
References Fieldmap::typeset_msg().
Referenced by FM2DMagnetoStatic::freeMap(), Fieldmap::lowResolutionWarning(), FM2DMagnetoStatic::readMap(), and Fieldmap::typeset_msg().

|
protectedinherited |
Definition at line 604 of file Fieldmap.cpp.
References Util::combineFilePath(), Fieldmap::Filename_m, OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), and Fieldmap::write3DField().
Referenced by Fieldmap::write3DField().

|
friend |
Allow Fieldmap factory access.
Definition at line 323 of file Astra1DDynamic.h.
|
private |
Number of Fourier modes used.
Definition at line 317 of file Astra1DDynamic.h.
Referenced by applyField(), applyRFField(), applyTravelingWave(), Astra1DDynamic(), getFieldDerivative(), getFieldstrength(), and readMap().
|
staticprivateinherited |
Definition at line 302 of file Fieldmap.h.
Referenced by Fieldmap::getLine(), and Fieldmap::interpreteEOF().
|
staticprivateinherited |
Definition at line 301 of file Fieldmap.h.
Referenced by Fieldmap::getLine(), and Fieldmap::interpreteEOF().
|
staticprivateinherited |
Definition at line 313 of file Fieldmap.h.
Referenced by Fieldmap::clearDictionary(), Fieldmap::freeMap(), Fieldmap::getFieldmap(), Fieldmap::getListFieldmapNames(), and Fieldmap::readMap().
|
protectedinherited |
Definition at line 233 of file Fieldmap.h.
Referenced by Astra1DDynamic(), Astra1DMagnetoStatic::Astra1DMagnetoStatic(), Fieldmap::checkMap(), Fieldmap::disableFieldmapWarning(), Fieldmap::exceedingValuesWarning(), FM2DDynamic::FM2DDynamic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), freeMap(), Astra1DMagnetoStatic::freeMap(), FM2DDynamic::freeMap(), FM2DMagnetoStatic::freeMap(), getInfo(), Astra1DMagnetoStatic::getInfo(), FM2DDynamic::getInfo(), FM2DMagnetoStatic::getInfo(), getOnaxisEz(), Fieldmap::interpretWarning(), Fieldmap::lowResolutionWarning(), Fieldmap::missingValuesWarning(), Fieldmap::noFieldmapWarning(), readMap(), Astra1DMagnetoStatic::readMap(), FM2DDynamic::readMap(), FM2DMagnetoStatic::readMap(), and Fieldmap::write3DField().
|
private |
Fourier coefficients of Ez(z) (device-accessible) Stored as: [a0, a1, b1, a2, b2, ..., aN, bN] and used in the reconstruction Ez(z) = a0 + sum_l [ a_l cos(l*kz) - b_l sin(l*kz) ].
Definition at line 302 of file Astra1DDynamic.h.
Referenced by applyField(), applyRFField(), applyTravelingWave(), freeMap(), getFieldDerivative(), getFieldstrength(), and readMap().
|
private |
Definition at line 304 of file Astra1DDynamic.h.
Referenced by Astra1DDynamic(), getFrequency(), and setFrequency().
|
private |
Effective periodic length of the field map [m].
Definition at line 314 of file Astra1DDynamic.h.
Referenced by applyField(), applyRFField(), applyTravelingWave(), Astra1DDynamic(), getFieldDerivative(), and getFieldstrength().
|
protectedinherited |
Definition at line 234 of file Fieldmap.h.
Referenced by Astra1DDynamic(), Astra1DMagnetoStatic::Astra1DMagnetoStatic(), Fieldmap::exceedingValuesWarning(), FM2DDynamic::FM2DDynamic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), Fieldmap::getLine(), Fieldmap::interpreteEOF(), Fieldmap::interpretWarning(), Fieldmap::missingValuesWarning(), and Fieldmap::readHeader().
|
protectedinherited |
Definition at line 236 of file Fieldmap.h.
Referenced by Astra1DDynamic(), Astra1DMagnetoStatic::Astra1DMagnetoStatic(), FM2DDynamic::FM2DDynamic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), readMap(), Astra1DMagnetoStatic::readMap(), FM2DDynamic::readMap(), and FM2DMagnetoStatic::readMap().
|
private |
Number of grid points in z-direction (input sampling)
Definition at line 320 of file Astra1DDynamic.h.
Referenced by Astra1DDynamic(), getOnaxisEz(), and readMap().
|
protectedinherited |
Definition at line 231 of file Fieldmap.h.
Referenced by Astra1DDynamic(), Astra1DMagnetoStatic::Astra1DMagnetoStatic(), FM2DDynamic::FM2DDynamic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), and Fieldmap::getType().
|
private |
Wave number (omega / c)
Definition at line 311 of file Astra1DDynamic.h.
Referenced by applyField(), applyRFField(), applyTravelingWave(), Astra1DDynamic(), and getFieldstrength().
|
private |
Z Bounds relative to element edge.
Start position of field map [m]
Definition at line 307 of file Astra1DDynamic.h.
Referenced by applyField(), applyRFField(), applyTravelingWave(), Astra1DDynamic(), getFieldDerivative(), getFieldDimensions(), getFieldstrength(), getInfo(), isInside(), and readMap().
|
private |
End position of field map [m]
Definition at line 308 of file Astra1DDynamic.h.
Referenced by applyField(), applyRFField(), applyTravelingWave(), Astra1DDynamic(), getFieldDimensions(), getInfo(), isInside(), and readMap().