TDMS
Time Domain Maxwell Solver
Loading...
Searching...
No Matches
interpolation_methods.h File Reference

InterpScheme class methods and supporting functions. More...

#include <complex>
#include "input_flags.h"
Include dependency graph for interpolation_methods.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  InterpolationScheme
 Executes an interpolation scheme. More...

Enumerations

enum  scheme_value {
  BAND_LIMITED_0 = 4 , BAND_LIMITED_1 = 6 , BAND_LIMITED_2 = 8 , BAND_LIMITED_3 = 9 ,
  BAND_LIMITED_4 = 7 , BAND_LIMITED_5 = 5 , BAND_LIMITED_6 = 3 , BAND_LIMITED_7 = 2 ,
  BAND_LIMITED_CELL_ZERO = 1 , CUBIC_INTERP_MIDDLE , CUBIC_INTERP_FIRST , CUBIC_INTERP_LAST = -2
}
 Defines our order of preference for the use of the various schemes. More...

Functions

const InterpolationSchemebest_scheme (int datapts_in_direction, int interpolation_position, tdms_flags::InterpolationMethod interpolation_methods=tdms_flags::InterpolationMethod::Cubic)
 Determine the appropriate interpolation scheme to use, given the number of datapoints available and the position to which we wish to interpolate to.

Variables

const InterpolationScheme BL0
const InterpolationScheme BL1
const InterpolationScheme BL2
const InterpolationScheme BL3
const InterpolationScheme BL4
const InterpolationScheme BL5
const InterpolationScheme BL6
const InterpolationScheme BL7
const InterpolationScheme BL_TO_CELL_0
const InterpolationScheme CBFst
const InterpolationScheme CBMid
const InterpolationScheme CBLst

Detailed Description

InterpScheme class methods and supporting functions.

Author
William Graham (ccaeg.nosp@m.ra@u.nosp@m.cl.ac.nosp@m..uk)

Non InterpScheme methods are required to preserve functionality whilst testing new schemes

Enumeration Type Documentation

◆ scheme_value

Defines our order of preference for the use of the various schemes.

There should never be an instance in which we wish to use BLi to position 7 - this will take us to a point OUTSIDE the computational domain. However for completion purposes (and if we find a use for it), it is included.

MODIFICATIONS TO THE ALIASED INTS WILL CHANGE THE ORDER OF SCHEME PREFERENCE!

For bandlimited schemes, we have 8 equidistant datapoints and can interpolate to the midpoint of any pair of consecutive points, or "half a point spacing" to the right of the final data point. These "interpolation positions" (interp positions) are marked with "o" below: v0 v1 v2 v3 v4 v5 v6 v7 o o o o o o o o We label these interp positions with the index of the point to the left: a data point at interp position 0 is effectively a data point "v0.5", being at the midpoint of v0 and v1, for example.

Function Documentation

◆ best_scheme()

const InterpolationScheme & best_scheme ( int datapts_in_direction,
int interpolation_position,
tdms_flags::InterpolationMethod interpolation_methods = tdms_flags::InterpolationMethod::Cubic )

Determine the appropriate interpolation scheme to use, given the number of datapoints available and the position to which we wish to interpolate to.

Parameters
datapts_in_directionThe number of datapoints available along this axis
interpolation_positionInterpolation is to be performed to the midpoint of the datapoints indexed with (interpolation_position-1) and (interpolation_position)
interpolation_methodsThe preferred interpolation methods to use
Returns
const InterpolationScheme&

Variable Documentation

◆ BL0

Initial value:
BAND_LIMITED_0)
Executes an interpolation scheme.
Definition interpolation_methods.h:57

◆ BL1

Initial value:
BAND_LIMITED_1)

◆ BL2

Initial value:
BAND_LIMITED_2)

◆ BL3

Initial value:
BAND_LIMITED_3)

◆ BL4

Initial value:
BAND_LIMITED_4)

◆ BL5

Initial value:
BAND_LIMITED_5)

◆ BL6

Initial value:
BAND_LIMITED_6)

◆ BL7

Initial value:
=
InterpolationScheme(BAND_LIMITED_7)

◆ BL_TO_CELL_0

const InterpolationScheme BL_TO_CELL_0
Initial value:
BAND_LIMITED_CELL_ZERO)

◆ CBFst

const InterpolationScheme CBFst
Initial value:
CUBIC_INTERP_FIRST)

◆ CBLst

const InterpolationScheme CBLst
Initial value:
CUBIC_INTERP_LAST)

◆ CBMid

const InterpolationScheme CBMid
Initial value:
CUBIC_INTERP_MIDDLE)