XGC1
Functions
fourier_filter.cpp File Reference
#include "fourier_filter.hpp"
Include dependency graph for fourier_filter.cpp:

Functions

double * get_grid_qsafety_loc ()
 
double * get_grid_sol_fourier_win_loc ()
 
double * get_grid_theta_loc ()
 
int * get_grid_theta_sort_idx_loc ()
 
int * get_grid_m_max_surf_loc ()
 
int get_grid_surf_maxlen ()
 
int * get_grid_surf_len_loc ()
 
int * get_grid_surf_idx_loc ()
 
int get_sml_sep_surf_index ()
 
int get_nsurf_sol ()
 
int get_filter_nsurf ()
 
int get_grid_num_non_aligned ()
 
int * get_grid_non_aligned_vert_loc ()
 
int * get_grid_non_aligned_ff_idx_loc ()
 
double * get_grid_non_aligned_ff_w_loc ()
 
UniformRange construct_theta_coords (const View< double *, CLayout, HostType > &theta, int n_points, bool periodic)
 
void get_separatrix_start_len (const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, int sep_surf_index, int &i0_sep, int &len_sep)
 
KOKKOS_INLINE_FUNCTION int nearest_int (double x)
 
void set_m_limit (const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, Plasma &plasma, const View< bool *, CLayout, HostType > &run_filter, double mode_select_max_kth_rho, const View< int *, CLayout, DeviceType > &m_limit_d)
 
void set_is_periodic (const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, const View< bool *, CLayout, HostType > &run_filter, int sep_surf_index, const View< bool *, CLayout, HostType > &is_periodic)
 
void setup_m_min_max (const FourierFilter &filter, const FourierFilter::Options &options, const View< int **, CLayout, DeviceType > &m_minmax)
 
void get_surf_damp_fac (const FourierFilter::Options &options, const View< double *, CLayout, DeviceType > &psi, const View< double *, CLayout, DeviceType > &damp_fac)
 
void reverse_fft (const View< double *, CLayout, DeviceType > &theta, const View< Complex **, CLayout, DeviceType > &spec, const View< double *, CLayout, DeviceType > &inv_npt, const View< int **, CLayout, DeviceType > &m_minmax, const View< int *, CLayout, DeviceType > &node_offsets, const View< int *, CLayout, DeviceType > &freq_offsets, const View< int *, CLayout, DeviceType > &node_surf_map, const View< double **, CLayout, DeviceType > &x)
 
void map_back (FourierFilter::ScrapeOffLayerMethod sol_method, const View< int *, CLayout, DeviceType > &node_mapping, const View< int *, CLayout, DeviceType > &node_surf_map, const View< double *, CLayout, DeviceType > &win, const View< double **, CLayout, DeviceType > &x_ordered, const View< double *, CLayout, DeviceType > &damp_fac, const View< double **, CLayout, DeviceType > &x)
 
void map_x (const View< int *, CLayout, DeviceType > &node_mapping, const View< double **, CLayout, DeviceType > &x_in, const View< double **, CLayout, DeviceType > &x_ordered)
 
void band_pass_filter (const View< int **, CLayout, DeviceType > &m_minmax, const View< int *, CLayout, DeviceType > &freq_surf_map, const View< int *, CLayout, DeviceType > &freq_offsets, const View< Complex **, CLayout, DeviceType > &spec)
 
KOKKOS_INLINE_FUNCTION bool nonzero_mag (const Complex &c)
 
void filter_scrapeoff_layer (FourierFilter::ScrapeOffLayerMethod sol_method, const View< int *, CLayout, DeviceType > &freq_surf_map, int nsurf, const View< Complex **, CLayout, DeviceType > &spec)
 
void discard_non_resonant (const View< int *, CLayout, DeviceType > &freq_surf_map, const View< int **, CLayout, DeviceType > &m_minmax, int dir, const View< Complex **, CLayout, DeviceType > &spec)
 
void set_nonaligned_vertices (const View< int *, CLayout, DeviceType > non_aligned_vert, const View< int **, CLayout, DeviceType > non_aligned_ff_idx, const View< double **, CLayout, DeviceType > non_aligned_ff_w, const View< double **, CLayout, DeviceType > &x)
 
void fourier_filter_n_m_range_parallel (int nplanes, int nmin, int nmax, int nmin_real, int nmax_real, int bands_on_int, int minm, int maxm, double *view, int bands_int, int mres_q, double inpsi, double outpsi, double bd_width, int div_mix_int)
 

Function Documentation

◆ band_pass_filter()

void band_pass_filter ( const View< int **, CLayout, DeviceType > &  m_minmax,
const View< int *, CLayout, DeviceType > &  freq_surf_map,
const View< int *, CLayout, DeviceType > &  freq_offsets,
const View< Complex **, CLayout, DeviceType > &  spec 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct_theta_coords()

UniformRange construct_theta_coords ( const View< double *, CLayout, HostType > &  theta,
int  n_points,
bool  periodic 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discard_non_resonant()

void discard_non_resonant ( const View< int *, CLayout, DeviceType > &  freq_surf_map,
const View< int **, CLayout, DeviceType > &  m_minmax,
int  dir,
const View< Complex **, CLayout, DeviceType > &  spec 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filter_scrapeoff_layer()

void filter_scrapeoff_layer ( FourierFilter::ScrapeOffLayerMethod  sol_method,
const View< int *, CLayout, DeviceType > &  freq_surf_map,
int  nsurf,
const View< Complex **, CLayout, DeviceType > &  spec 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fourier_filter_n_m_range_parallel()

void fourier_filter_n_m_range_parallel ( int  nplanes,
int  nmin,
int  nmax,
int  nmin_real,
int  nmax_real,
int  bands_on_int,
int  minm,
int  maxm,
double *  view,
int  bands_int,
int  mres_q,
double  inpsi,
double  outpsi,
double  bd_width,
int  div_mix_int 
)
Here is the caller graph for this function:

◆ get_filter_nsurf()

int get_filter_nsurf ( )
Here is the caller graph for this function:

◆ get_grid_m_max_surf_loc()

int* get_grid_m_max_surf_loc ( )
Here is the caller graph for this function:

◆ get_grid_non_aligned_ff_idx_loc()

int* get_grid_non_aligned_ff_idx_loc ( )
Here is the caller graph for this function:

◆ get_grid_non_aligned_ff_w_loc()

double* get_grid_non_aligned_ff_w_loc ( )
Here is the caller graph for this function:

◆ get_grid_non_aligned_vert_loc()

int* get_grid_non_aligned_vert_loc ( )
Here is the caller graph for this function:

◆ get_grid_num_non_aligned()

int get_grid_num_non_aligned ( )
Here is the caller graph for this function:

◆ get_grid_qsafety_loc()

double* get_grid_qsafety_loc ( )
Here is the caller graph for this function:

◆ get_grid_sol_fourier_win_loc()

double* get_grid_sol_fourier_win_loc ( )
Here is the caller graph for this function:

◆ get_grid_surf_idx_loc()

int* get_grid_surf_idx_loc ( )
Here is the caller graph for this function:

◆ get_grid_surf_len_loc()

int* get_grid_surf_len_loc ( )
Here is the caller graph for this function:

◆ get_grid_surf_maxlen()

int get_grid_surf_maxlen ( )
Here is the caller graph for this function:

◆ get_grid_theta_loc()

double* get_grid_theta_loc ( )
Here is the caller graph for this function:

◆ get_grid_theta_sort_idx_loc()

int* get_grid_theta_sort_idx_loc ( )
Here is the caller graph for this function:

◆ get_nsurf_sol()

int get_nsurf_sol ( )
Here is the caller graph for this function:

◆ get_separatrix_start_len()

void get_separatrix_start_len ( const MagneticField< DeviceType > &  magnetic_field,
const Grid< DeviceType > &  grid,
int  sep_surf_index,
int &  i0_sep,
int &  len_sep 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_sml_sep_surf_index()

int get_sml_sep_surf_index ( )
Here is the caller graph for this function:

◆ get_surf_damp_fac()

void get_surf_damp_fac ( const FourierFilter::Options options,
const View< double *, CLayout, DeviceType > &  psi,
const View< double *, CLayout, DeviceType > &  damp_fac 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_back()

void map_back ( FourierFilter::ScrapeOffLayerMethod  sol_method,
const View< int *, CLayout, DeviceType > &  node_mapping,
const View< int *, CLayout, DeviceType > &  node_surf_map,
const View< double *, CLayout, DeviceType > &  win,
const View< double **, CLayout, DeviceType > &  x_ordered,
const View< double *, CLayout, DeviceType > &  damp_fac,
const View< double **, CLayout, DeviceType > &  x 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_x()

void map_x ( const View< int *, CLayout, DeviceType > &  node_mapping,
const View< double **, CLayout, DeviceType > &  x_in,
const View< double **, CLayout, DeviceType > &  x_ordered 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nearest_int()

KOKKOS_INLINE_FUNCTION int nearest_int ( double  x)
Here is the caller graph for this function:

◆ nonzero_mag()

KOKKOS_INLINE_FUNCTION bool nonzero_mag ( const Complex c)
Here is the caller graph for this function:

◆ reverse_fft()

void reverse_fft ( const View< double *, CLayout, DeviceType > &  theta,
const View< Complex **, CLayout, DeviceType > &  spec,
const View< double *, CLayout, DeviceType > &  inv_npt,
const View< int **, CLayout, DeviceType > &  m_minmax,
const View< int *, CLayout, DeviceType > &  node_offsets,
const View< int *, CLayout, DeviceType > &  freq_offsets,
const View< int *, CLayout, DeviceType > &  node_surf_map,
const View< double **, CLayout, DeviceType > &  x 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_is_periodic()

void set_is_periodic ( const MagneticField< DeviceType > &  magnetic_field,
const Grid< DeviceType > &  grid,
const View< bool *, CLayout, HostType > &  run_filter,
int  sep_surf_index,
const View< bool *, CLayout, HostType > &  is_periodic 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_m_limit()

void set_m_limit ( const MagneticField< DeviceType > &  magnetic_field,
const Grid< DeviceType > &  grid,
Plasma plasma,
const View< bool *, CLayout, HostType > &  run_filter,
double  mode_select_max_kth_rho,
const View< int *, CLayout, DeviceType > &  m_limit_d 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_nonaligned_vertices()

void set_nonaligned_vertices ( const View< int *, CLayout, DeviceType non_aligned_vert,
const View< int **, CLayout, DeviceType non_aligned_ff_idx,
const View< double **, CLayout, DeviceType non_aligned_ff_w,
const View< double **, CLayout, DeviceType > &  x 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_m_min_max()

void setup_m_min_max ( const FourierFilter filter,
const FourierFilter::Options options,
const View< int **, CLayout, DeviceType > &  m_minmax 
)
Here is the call graph for this function:
Here is the caller graph for this function: