File fci.hxx

class FCIMap
#include <fci.hxx>

Field line map - contains the coefficients for interpolation.

Public Functions

FCIMap() = delete
FCIMap(Mesh &mesh, const Coordinates::FieldMetric &dy, Options &options, int offset, BoundaryRegionPar *inner_boundary, BoundaryRegionPar *outer_boundary, bool zperiodic)
inline 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<XZInterpolation> interp

Interpolation objects.

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

Flux Coordinate Independent method for parallel derivatives.

Public Functions

FCITransform() = delete
inline FCITransform(Mesh &mesh, const Coordinates::FieldMetric &dy, bool zperiodic = true, Options *opt = nullptr)
virtual void calcParallelSlices(Field3D &f) override

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

virtual void integrateParallelSlices(Field3D &f) override

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

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

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

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

Convert back from field-aligned coordinates into standard form

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

Protected Functions

virtual void checkInputGrid() override

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.