Celeritas 0.7.0-dev.313+develop.1857205b
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::CylMapField Class Reference

Interpolate a magnetic field vector on an r/phi/z grid. More...

#include <CylMapField.hh>

Public Types

Type aliases
using real_type = cylmap_real_type
 
using Real3 = Array< celeritas::real_type, 3 >
 
using ParamsRef = NativeCRef< CylMapFieldParamsData >
 

Public Member Functions

 CylMapField (ParamsRef const &shared)
 Construct with the shared magnetic field map data.
 
Real3 operator() (Real3 const &pos) const
 Calculate the magnetic field vector for the given position.
 

Detailed Description

Interpolate a magnetic field vector on an r/phi/z grid.

The field vector is stored as cylindrical \((r,\phi,z)\) components on the cylindrical mesh grid points, and trilinear interpolation is performed within each grid cell. The value outside the grid is zero.

Currently the grid requires a full \(2\pi\) azimuthal grid.

Member Function Documentation

◆ operator()()

auto celeritas::CylMapField::operator() ( Real3 const pos) const
inline

Calculate the magnetic field vector for the given position.

This does a 3-D interpolation on the input grid and reconstructs the magnetic field vector from the stored R, Z, and Phi components of the field. The result is in the native Celeritas unit system.


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