Celeritas 0.6.0-rc.2.10+develop.de0a3a05
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 FieldParamsRef = NativeCRef< CylMapFieldParamsData >
 

Public Member Functions

CELER_FUNCTION CylMapField (FieldParamsRef const &shared)
 Construct with the shared magnetic field map data.
 
CELER_FUNCTION 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 a cartesian \((x,y,z)\) value 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()()

CELER_FUNCTION 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: