File fci.hxx

class FCIMap
#include <fci.hxx>

Field line map - contains the coefficients for interpolation.

Public Functions

FCIMap()
FCIMap(Mesh &mesh, int offset, BoundaryRegionPar *boundary, bool zperiodic)
Field3D interpolate(Field3D &f) const
Field3D integrate(Field3D &f) const

Public Members

Mesh &map_mesh
const int offset

Direction of map.

BoutMask boundary_mask

boundary mask - has the field line left the domain

BoutMask corner_boundary_mask

If any of the integration area has left the domain.

Private Members

std::unique_ptr<Interpolation> interp

Interpolation objects.

std::unique_ptr<Interpolation> interp_corner
class FCITransform : public ParallelTransform
#include <fci.hxx>

Flux Coordinate Independent method for parallel derivatives.

Public Functions

FCITransform()
FCITransform(Mesh &mesh, bool zperiodic = true)
void calcParallelSlices(Field3D &f)

Given a 3D field, calculate and set the Y up down fields.

void integrateParallelSlices(Field3D &f)

Calculate Yup and Ydown fields by integrating over mapped points This should be used for parallel divergence operators

const Field3D toFieldAligned(const Field3D &f, const std::string &region = "RGN_ALL")

Convert a field into field-aligned coordinates so that the y index is along the magnetic field

const FieldPerp toFieldAligned(const FieldPerp &f, const std::string &region = "RGN_ALL")
const Field3D fromFieldAligned(const Field3D &f, const std::string &region = "RGN_ALL")

Convert back from field-aligned coordinates into standard form

const FieldPerp fromFieldAligned(const FieldPerp &f, const std::string &region = "RGN_ALL")
bool canToFromFieldAligned()
bool requiresTwistShift(bool twist_shift_enabled, MAYBE_UNUSED(YDirectionType ytype))

Protected Functions

void checkInputGrid()

This method should be called in the constructor to check that if the grid has a ‘parallel_transform’ variable, it has the correct value

Private Members

std::vector<FCIMap> field_line_maps

FCI maps for each of the parallel slices.