OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Fieldmap Class Referenceabstract

Abstract base class for all field maps. It acts as a factory for creating specific field map types based on the file content and manages a cache of loaded field maps. More...

#include <Fieldmap.h>

Inheritance diagram for Fieldmap:
Inheritance graph
Collaboration diagram for Fieldmap:
Collaboration graph

Classes

struct  FieldmapDescription
 
struct  TypeParseTraits
 
struct  TypeParseTraits< double >
 
struct  TypeParseTraits< int >
 
struct  TypeParseTraits< std::string >
 
struct  TypeParseTraits< unsigned int >
 

Public Member Functions

virtual void applyField (std::shared_ptr< ParticleContainer_t > pc, double scale=1.0)=0
 Apply the FM to all the particles.
 
virtual bool getFieldstrength (const Vector_t< double, 3 > &R, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B) const =0
 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 =0
 Get the field derivative with respect to a direction.
 
virtual void getFieldDimensions (double &zBegin, double &zEnd) const =0
 Get the longitudinal dimensions of the field.
 
virtual void getFieldDimensions (double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const =0
 Get the full 3D bounding box of the field.
 
virtual void swap ()=0
 Swap coordinates (implementation dependent).
 
virtual void getInfo (Inform *msg)=0
 Print info about the field map.
 
virtual double getFrequency () const =0
 Get the frequency.
 
virtual void setFrequency (double freq)=0
 Set the frequency.
 
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 ()
 
virtual void getOnaxisEz (std::vector< std::pair< double, double > > &onaxis)
 
virtual bool isInside (const Vector_t< double, 3 > &) const =0
 Check if a point is inside the field map.
 
virtual void readMap ()=0
 Pure virtual method to read the map data. Called by the public static readMap().
 
virtual void freeMap ()=0
 Pure virtual method to free the map data.
 
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

static FieldmapgetFieldmap (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

 Fieldmap ()=delete
 
 Fieldmap (const std::string &aFilename)
 
virtual ~Fieldmap ()
 
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
 

Static Private Attributes

static char buffer_m [256]
 
static std::string alpha_numeric
 
static std::map< std::string, FieldmapDescriptionFieldmapDictionary
 

Detailed Description

Abstract base class for all field maps. It acts as a factory for creating specific field map types based on the file content and manages a cache of loaded field maps.

Definition at line 62 of file Fieldmap.h.

Constructor & Destructor Documentation

◆ Fieldmap() [1/2]

Fieldmap::Fieldmap ( )
protecteddelete

◆ Fieldmap() [2/2]

Fieldmap::Fieldmap ( const std::string &  aFilename)
inlineprotected

Definition at line 227 of file Fieldmap.h.

◆ ~Fieldmap()

virtual Fieldmap::~Fieldmap ( )
inlineprotectedvirtual

Definition at line 230 of file Fieldmap.h.

Member Function Documentation

◆ applyField()

virtual void Fieldmap::applyField ( std::shared_ptr< ParticleContainer_t pc,
double  scale = 1.0 
)
pure virtual

Apply the FM to all the particles.

Parameters
pcParticle container
scaleScaling factor applied to the field (default 1.0)

Implemented in Astra1DMagnetoStatic, FM2DMagnetoStatic, Astra1DDynamic, FM2DDynamic, FakeFieldmap, and FakeTWFieldmap.

Referenced by Solenoid::apply().

◆ checkMap() [1/2]

void Fieldmap::checkMap ( unsigned int  accuracy,
double  length,
const std::vector< double > &  zSampling,
const std::vector< double > &  fourierCoefficients,
gsl_spline splineCoefficients,
gsl_interp_accel splineAccelerator 
)
protected

Definition at line 346 of file Fieldmap.cpp.

References checkMap(), Util::combineFilePath(), Filename_m, OpalData::getInstance(), gsl_spline_eval(), lowResolutionWarning(), and Physics::two_pi.

Here is the call graph for this function:

◆ checkMap() [2/2]

void Fieldmap::checkMap ( unsigned int  accuracy,
std::pair< double, double >  fieldDimensions,
double  deltaZ,
const std::vector< double > &  fourierCoefficients,
gsl_spline splineCoefficients,
gsl_interp_accel splineAccelerator 
)
protected

Definition at line 330 of file Fieldmap.cpp.

References checkMap().

Referenced by checkMap(), and checkMap().

Here is the call graph for this function:

◆ clearDictionary()

void Fieldmap::clearDictionary ( )
static

Clear the entire field map cache.

Definition at line 160 of file Fieldmap.cpp.

References clearDictionary(), and FieldmapDictionary.

Referenced by clearDictionary().

Here is the call graph for this function:

◆ deleteFieldmap()

void Fieldmap::deleteFieldmap ( std::string  Filename)
static

Delete a specific field map from the cache and memory.

Parameters
FilenameThe filename of the map to delete.

Definition at line 158 of file Fieldmap.cpp.

References deleteFieldmap(), and freeMap().

Referenced by deleteFieldmap().

Here is the call graph for this function:

◆ disableFieldmapWarning()

void Fieldmap::disableFieldmapWarning ( )
protected

◆ exceedingValuesWarning()

void Fieldmap::exceedingValuesWarning ( )
protected

Definition at line 479 of file Fieldmap.cpp.

References exceedingValuesWarning(), Filename_m, and lines_read_m.

Referenced by exceedingValuesWarning(), and interpreteEOF().

Here is the call graph for this function:

◆ freeMap() [1/2]

virtual void Fieldmap::freeMap ( )
pure virtual

Pure virtual method to free the map data.

Implemented in Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, FM2DMagnetoStatic, FakeFieldmap, and FakeTWFieldmap.

Referenced by deleteFieldmap().

◆ freeMap() [2/2]

void Fieldmap::freeMap ( std::string  Filename)
static

Decrease reference count or delete field map if unused.

Parameters
FilenameThe file to free.

Definition at line 311 of file Fieldmap.cpp.

References FieldmapDictionary, and freeMap().

Referenced by freeMap(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the call graph for this function:

◆ get1DProfile1EngeCoeffs()

void Fieldmap::get1DProfile1EngeCoeffs ( std::vector< double > &  engeCoeffsEntry,
std::vector< double > &  engeCoeffsExit 
)
virtual

Definition at line 590 of file Fieldmap.cpp.

References get1DProfile1EngeCoeffs().

Referenced by get1DProfile1EngeCoeffs().

Here is the call graph for this function:

◆ get1DProfile1EntranceParam()

void Fieldmap::get1DProfile1EntranceParam ( double &  entranceParameter1,
double &  entranceParameter2,
double &  entranceParameter3 
)
virtual

Definition at line 593 of file Fieldmap.cpp.

References get1DProfile1EntranceParam().

Referenced by get1DProfile1EntranceParam().

Here is the call graph for this function:

◆ get1DProfile1ExitParam()

void Fieldmap::get1DProfile1ExitParam ( double &  exitParameter1,
double &  exitParameter2,
double &  exitParameter3 
)
virtual

Definition at line 597 of file Fieldmap.cpp.

References get1DProfile1ExitParam().

Referenced by get1DProfile1ExitParam().

Here is the call graph for this function:

◆ getFieldDerivative()

virtual bool Fieldmap::getFieldDerivative ( const Vector_t< double, 3 > &  R,
Vector_t< double, 3 > &  E,
Vector_t< double, 3 > &  B,
const DiffDirection dir 
) const
pure virtual

Get the field derivative with respect to a direction.

Parameters
RPosition [m].
EOutput derivative of Electric field.
BOutput derivative of Magnetic field.
dirDirection of derivative (DX, DY, DZ).
Returns
true if R is outside, false otherwise.

Implemented in FakeFieldmap, FakeTWFieldmap, Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, and FM2DMagnetoStatic.

Referenced by TEST_F(), and TEST_F().

◆ getFieldDimensions() [1/2]

virtual void Fieldmap::getFieldDimensions ( double &  xIni,
double &  xFinal,
double &  yIni,
double &  yFinal,
double &  zIni,
double &  zFinal 
) const
pure virtual

Get the full 3D bounding box of the field.

Parameters
xIniOutput minimum x [m].
xFinalOutput maximum x [m].
yIniOutput minimum y [m].
yFinalOutput maximum y [m].
zIniOutput minimum z [m].
zFinalOutput maximum z [m].

Implemented in Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, FM2DMagnetoStatic, FakeTWFieldmap, and FakeFieldmap.

◆ getFieldDimensions() [2/2]

virtual void Fieldmap::getFieldDimensions ( double &  zBegin,
double &  zEnd 
) const
pure virtual

Get the longitudinal dimensions of the field.

Parameters
zBeginOutput start of field [m].
zEndOutput end of field [m].

Implemented in Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, FM2DMagnetoStatic, FakeFieldmap, and FakeTWFieldmap.

Referenced by Solenoid::getSupportEnvelope(), RFCavity::initialise(), Solenoid::initialise(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ getFieldGap()

double Fieldmap::getFieldGap ( )
virtual

Definition at line 600 of file Fieldmap.cpp.

References getFieldGap().

Referenced by getFieldGap().

Here is the call graph for this function:

◆ getFieldmap()

Fieldmap * Fieldmap::getFieldmap ( std::string  Filename,
bool  fast = false 
)
static

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.

Parameters
FilenameThe path to the field map file.
fastIf true, load a "fast" version if available (implementation dependent).
Returns
Pointer to the Fieldmap instance.

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.

Parameters
FilenameAbsolute path to the fieldmap file.
fastNot implemented. Previously attempted to load a "fast" version.
Returns
Fieldmap* Pointer to the managed fieldmap instance.

Found matching entry?

Return fieldmap pointer

Determine fieldmap type

Based on type:

  • Create new fieldmap object by parsing the fieldmap file
  • Create new FieldmapDescription object for this fieldmap
  • Insert FieldmapDescription into FieldmapDictionary
  • Return pointer to the fieldmap

Definition at line 72 of file Fieldmap.cpp.

References FieldmapDictionary, getFieldmap(), readHeader(), T2DDynamic, T2DMagnetoStatic, TAstraDynamic, and TAstraMagnetoStatic.

Referenced by getFieldmap().

Here is the call graph for this function:

◆ getFieldstrength()

virtual bool Fieldmap::getFieldstrength ( const Vector_t< double, 3 > &  R,
Vector_t< double, 3 > &  E,
Vector_t< double, 3 > &  B 
) const
pure virtual

Get the field strength at a given point.

Parameters
RPosition [m] relative to the field map origin.
EOutput Electric field [MV/m].
BOutput Magnetic field [T].
Returns
true if R is outside of the field map, false otherwise.

Implemented in FakeFieldmap, FakeTWFieldmap, Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, and FM2DMagnetoStatic.

Referenced by RFCavity::apply(), Solenoid::apply(), TravelingWave::apply(), RFCavity::applyToReferenceParticle(), Solenoid::applyToReferenceParticle(), TravelingWave::applyToReferenceParticle(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ getFrequency()

virtual double Fieldmap::getFrequency ( ) const
pure virtual

Get the frequency.

Returns
Frequency [MHz].

Implemented in Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, FM2DMagnetoStatic, FakeFieldmap, and FakeTWFieldmap.

Referenced by RFCavity::initialise(), TEST_F(), and TEST_F().

◆ getInfo()

virtual void Fieldmap::getInfo ( Inform *  msg)
pure virtual

◆ getLine() [1/2]

void Fieldmap::getLine ( std::ifstream &  in,
int &  lines_read,
std::string &  buffer 
)
staticprotected

Definition at line 414 of file Fieldmap.cpp.

References alpha_numeric, buffer_m, getLine(), and READ_BUFFER_LENGTH.

Here is the call graph for this function:

◆ getLine() [2/2]

void Fieldmap::getLine ( std::ifstream &  in,
std::string &  buffer 
)
inlineprotected

◆ getListFieldmapNames()

std::vector< std::string > Fieldmap::getListFieldmapNames ( )
static

Get a list of all loaded field map names.

Returns
Vector of filenames.

Definition at line 149 of file Fieldmap.cpp.

References FieldmapDictionary, and getListFieldmapNames().

Referenced by getListFieldmapNames().

Here is the call graph for this function:

◆ getOnaxisEz()

void Fieldmap::getOnaxisEz ( std::vector< std::pair< double, double > > &  onaxis)
virtual

Reimplemented in Astra1DDynamic, FM2DDynamic, and FakeTWFieldmap.

Definition at line 588 of file Fieldmap.cpp.

References getOnaxisEz().

Referenced by RFCavity::getAutoPhaseEstimate(), TravelingWave::getAutoPhaseEstimate(), and getOnaxisEz().

Here is the call graph for this function:

◆ getType()

MapType Fieldmap::getType ( )
inline

Definition at line 206 of file Fieldmap.h.

References Type.

Referenced by TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ interpreteEOF()

bool Fieldmap::interpreteEOF ( std::ifstream &  in)
protected

Definition at line 436 of file Fieldmap.cpp.

References alpha_numeric, buffer_m, exceedingValuesWarning(), interpreteEOF(), lines_read_m, and READ_BUFFER_LENGTH.

Referenced by FM2DDynamic::FM2DDynamic(), FM2DMagnetoStatic::FM2DMagnetoStatic(), and interpreteEOF().

Here is the call graph for this function:

◆ interpretLine() [1/6]

template<class S >
bool Fieldmap::interpretLine ( std::ifstream &  in,
S &  value,
const bool &  file_length_known = true 
)
protected

◆ interpretLine() [2/6]

template<class S >
bool Fieldmap::interpretLine ( std::ifstream &  in,
S &  value1,
S &  value2,
S &  value3,
S &  value4,
S &  value5,
S &  value6,
const bool &  file_length_known = true 
)
protected

Parses six values of the same type S from a line.

See also
interpretLine<T>

Definition at line 176 of file Fieldmap.hpp.

References getLine(), interpretLine(), interpretWarning(), and missingValuesWarning().

Here is the call graph for this function:

◆ interpretLine() [3/6]

template<class S , class T >
bool Fieldmap::interpretLine ( std::ifstream &  in,
S &  value1,
T value2,
const bool &  file_length_known = true 
)
protected

Parses two values (types S, T) from a line.

See also
interpretLine<T>

Definition at line 55 of file Fieldmap.hpp.

References getLine(), interpretLine(), interpretWarning(), and missingValuesWarning().

Here is the call graph for this function:

◆ interpretLine() [4/6]

template<class S , class T , class U >
bool Fieldmap::interpretLine ( std::ifstream &  in,
S &  value1,
T value2,
U &  value3,
const bool &  file_length_known = true 
)
protected

Parses three values (types S, T, U) from a line.

See also
interpretLine<T>

Definition at line 92 of file Fieldmap.hpp.

References getLine(), interpretLine(), interpretWarning(), and missingValuesWarning().

Here is the call graph for this function:

◆ interpretLine() [5/6]

template<class S , class T , class U , class V >
bool Fieldmap::interpretLine ( std::ifstream &  in,
S &  value1,
T value2,
U &  value3,
V &  value4,
const bool &  file_length_known = true 
)
protected

Parses four values (types S, T, U, V) from a line.

See also
interpretLine<T>

Definition at line 132 of file Fieldmap.hpp.

References getLine(), interpretLine(), interpretWarning(), and missingValuesWarning().

Here is the call graph for this function:

◆ interpretLine() [6/6]

template<class T >
bool Fieldmap::interpretLine ( std::ifstream &  in,
T value,
const bool &  file_length_known 
)

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.

Parameters
inInput file stream.
valueOutput variable reference.
file_length_knownIf false, EOF is acceptable.
Returns
true if successful, false if EOF (and permitted).

Definition at line 23 of file Fieldmap.hpp.

References getLine(), interpretLine(), interpretWarning(), and missingValuesWarning().

Here is the call graph for this function:

◆ interpretWarning()

void Fieldmap::interpretWarning ( const std::ios_base::iostate &  state,
const bool &  read_all,
const std::string &  error_msg,
const std::string &  found 
)
protected

Definition at line 452 of file Fieldmap.cpp.

References Filename_m, interpretWarning(), and lines_read_m.

Referenced by interpretLine(), interpretLine(), interpretLine(), interpretLine(), interpretLine(), and interpretWarning().

Here is the call graph for this function:

◆ isInside()

virtual bool Fieldmap::isInside ( const Vector_t< double, 3 > &  ) const
pure virtual

◆ lowResolutionWarning()

void Fieldmap::lowResolutionWarning ( double  squareError,
double  maxError 
)
protected

Definition at line 503 of file Fieldmap.cpp.

References Filename_m, OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), lowResolutionWarning(), and typeset_msg().

Referenced by checkMap(), and lowResolutionWarning().

Here is the call graph for this function:

◆ missingValuesWarning()

void Fieldmap::missingValuesWarning ( )
protected

Definition at line 470 of file Fieldmap.cpp.

References Filename_m, lines_read_m, and missingValuesWarning().

Referenced by interpretLine(), interpretLine(), interpretLine(), interpretLine(), interpretLine(), and missingValuesWarning().

Here is the call graph for this function:

◆ noFieldmapWarning()

void Fieldmap::noFieldmapWarning ( )
protected

◆ readHeader()

MapType Fieldmap::readHeader ( std::string  Filename)
static

Read the header of a field map file to determine its type.

Determines the fieldmap type.

Parameters
FilenameThe file to check.
Returns
The MapType determined from the file header.
MapType

Definition at line 174 of file Fieldmap.cpp.

References getLine(), lines_read_m, readHeader(), T1DDynamic, T1DElectroStatic, T1DMagnetoStatic, T1DProfile1, T2DDynamic, T2DElectroStatic, T2DMagnetoStatic, T3DDynamic, T3DDynamicH5Block, T3DElectroStatic, T3DMagnetoStatic, T3DMagnetoStatic_Extended, T3DMagnetoStaticH5Block, TAstraDynamic, TAstraElectroStatic, TAstraMagnetoStatic, and UNKNOWN.

Referenced by getFieldmap(), and readHeader().

Here is the call graph for this function:

◆ readMap() [1/2]

virtual void Fieldmap::readMap ( )
pure virtual

Pure virtual method to read the map data. Called by the public static readMap().

Implemented in Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, FM2DMagnetoStatic, FakeFieldmap, and FakeTWFieldmap.

◆ readMap() [2/2]

void Fieldmap::readMap ( std::string  Filename)
static

Trigger the actual reading of the field map data.

Parameters
FilenameThe file to read.

Definition at line 301 of file Fieldmap.cpp.

References FieldmapDictionary, and readMap().

Referenced by readMap(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the call graph for this function:

◆ setEdgeConstants()

void Fieldmap::setEdgeConstants ( const double &  bendAngle,
const double &  entranceAngle,
const double &  exitAngle 
)
virtual

Definition at line 408 of file Fieldmap.cpp.

References setEdgeConstants().

Referenced by setEdgeConstants().

Here is the call graph for this function:

◆ setFieldGap()

void Fieldmap::setFieldGap ( double  gap)
virtual

Definition at line 602 of file Fieldmap.cpp.

References setFieldGap().

Referenced by setFieldGap().

Here is the call graph for this function:

◆ setFieldLength()

void Fieldmap::setFieldLength ( const double &  )
virtual

Definition at line 412 of file Fieldmap.cpp.

References setFieldLength().

Referenced by setFieldLength().

Here is the call graph for this function:

◆ setFrequency()

virtual void Fieldmap::setFrequency ( double  freq)
pure virtual

Set the frequency.

Parameters
freqFrequency [MHz].

Implemented in Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, FM2DMagnetoStatic, FakeFieldmap, and FakeTWFieldmap.

Referenced by TEST_F(), and TEST_F().

◆ swap()

virtual void Fieldmap::swap ( )
pure virtual

Swap coordinates (implementation dependent).

Implemented in Astra1DDynamic, Astra1DMagnetoStatic, FM2DDynamic, FM2DMagnetoStatic, FakeFieldmap, and FakeTWFieldmap.

◆ typeset_msg()

std::string Fieldmap::typeset_msg ( const std::string &  msg,
const std::string &  title 
)
static

Definition at line 527 of file Fieldmap.cpp.

References typeset_msg().

Referenced by FM2DMagnetoStatic::freeMap(), lowResolutionWarning(), FM2DMagnetoStatic::readMap(), and typeset_msg().

Here is the call graph for this function:

◆ write3DField()

void Fieldmap::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 
)
protected

Definition at line 604 of file Fieldmap.cpp.

References Util::combineFilePath(), Filename_m, OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), and write3DField().

Referenced by write3DField().

Here is the call graph for this function:

Member Data Documentation

◆ alpha_numeric

std::string Fieldmap::alpha_numeric
staticprivate

Definition at line 302 of file Fieldmap.h.

Referenced by getLine(), and interpreteEOF().

◆ buffer_m

char Fieldmap::buffer_m
staticprivate

Definition at line 301 of file Fieldmap.h.

Referenced by getLine(), and interpreteEOF().

◆ FieldmapDictionary

std::map< std::string, Fieldmap::FieldmapDescription > Fieldmap::FieldmapDictionary
staticprivate
Initial value:
=
std::map<std::string, Fieldmap::FieldmapDescription>()

Definition at line 313 of file Fieldmap.h.

Referenced by clearDictionary(), freeMap(), getFieldmap(), getListFieldmapNames(), and readMap().

◆ Filename_m

◆ lines_read_m

◆ normalize_m

◆ Type


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