Sapphire++
 v1.3.0-121-g2682132
Loading...
Searching...
No Matches
sapphirepp::VFP::MagneticField< dim > Class Template Reference

Magnetic field. More...

#include <config.h>

Inheritance diagram for sapphirepp::VFP::MagneticField< dim >:
[legend]
Collaboration diagram for sapphirepp::VFP::MagneticField< dim >:
[legend]

Public Member Functions

 MagneticField (const PhysicalParameters &physical_parameters)
 Constructor.
void vector_value (const dealii::Point< dim > &point, dealii::Vector< double > &magnetic_field) const override
 Evaluate the magnetic field at a point p.

Detailed Description

template<unsigned int dim>
class sapphirepp::VFP::MagneticField< dim >

Magnetic field.

Template Parameters
dimDimension of the reduced phase space \( (\mathbf{x}, p) \)

Constructor & Destructor Documentation

◆ MagneticField()

template<unsigned int dim>
sapphirepp::VFP::MagneticField< dim >::MagneticField ( const PhysicalParameters & physical_parameters)
inline

Constructor.

Parameters
physical_parametersUser defined runtime parameters

Member Function Documentation

◆ vector_value()

template<unsigned int dim>
void sapphirepp::VFP::MagneticField< dim >::vector_value ( const dealii::Point< dim > & point,
dealii::Vector< double > & magnetic_field ) const
inlineoverride

Evaluate the magnetic field at a point p.

Return a vector of values corresponding to the magnetic field \( \mathbf{B}(t, \mathbf{x}) \) at point in space.

Be aware that point is a point in reduced phase space \( (\mathbf{x}, p) \) and not in configuration space \( (\mathbf{x}) \). Therefore, the first dim_cs components correspond to the spatial coordinates \( \mathbf{x} \), while the last component corresponds to the momentum coordinate \( p \) and should not be used here (if the momentum term is activated).

const double x = point[0];
const double y = point[1]; // only if dim_cs > 1
const double z = point[2]; // only if dim_cs > 2

The magnetic field has always three components, independent of the dimension of the configuration space. This allows to describe a magnetic field that is points out of the simulation plane.

magnetic_field[0] = B_x;
magnetic_field[1] = B_y;
magnetic_field[2] = B_z;
Parameters
pointPoint in reduced phase space
magnetic_fieldReturn vector \( \mathbf{B}(t, \mathbf{x}) \)
See also
Function::vector_value()

[Magnetic field]

[Magnetic field]


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