Gyselalib++
 
Loading...
Searching...
No Matches
SingleModePerturbInitialization Class Reference

A class that initializes the distribution function as a perturbed Maxwellian. More...

Inheritance diagram for SingleModePerturbInitialization:
IInitialization IInitialization

Public Member Functions

void perturbation_initialization (DFieldX perturbation, int const perturb_mode, double const perturb_amplitude) const
 Initialization of the perturbation.
 
 SingleModePerturbInitialization (DConstFieldSpVx fequilibrium, host_t< IFieldMemSp > init_perturb_mode, host_t< DFieldMemSp > init_perturb_amplitude)
 Creates an instance of the SingleModePerturbInitialization class.
 
DFieldSpXVx operator() (DFieldSpXVx allfdistribu) const override
 Initializes the distribution function as as a perturbed Maxwellian.
 
void perturbation_initialization (DFieldXY perturbation, int const perturb_mode, double const perturb_amplitude) const
 Initialization of the perturbation.
 
 SingleModePerturbInitialization (DConstFieldSpVxVy fequilibrium, host_t< IFieldMemSp > init_perturb_mode, host_t< DFieldMemSp > init_perturb_amplitude)
 Creates an instance of the SingleModePerturbInitialization class.
 
DFieldSpXYVxVy operator() (DFieldSpXYVxVy allfdistribu) const override
 Initializes the distribution function as as a perturbed Maxwellian.
 
- Public Member Functions inherited from IInitialization
virtual DFieldSpVparMu operator() (DFieldSpVparMu allfdistribu) const =0
 Operator for initializing a distribution function.
 

Static Public Member Functions

static SingleModePerturbInitialization init_from_input (DConstFieldSpVx allfequilibrium, IdxRangeSp idx_range_kinsp, PC_tree_t const &yaml_input_file)
 Read init_perturb_mode and init_perturb amplitude in a YAML input file to initialize the perturbation.
 
static SingleModePerturbInitialization init_from_input (DConstFieldSpVxVy allfequilibrium, IdxRangeSp idx_range_kinsp, PC_tree_t const &yaml_input_file)
 Read init_perturb_mode and init_perturb amplitude in a YAML input file to initialize the perturbation.
 

Detailed Description

A class that initializes the distribution function as a perturbed Maxwellian.

Initialization operator with a sinusoidal perturbation of a Maxwellian. This initializes all species.

A class that initializes the distribution function as a perturbed Maxwellian defined as $f = f_{maxw}(v) * (1 + perturb(x))$, where $f_{maxw}(v)$ is a Maxwellian, and $perturb(x)$ is a sinusoidal perturbation.

Constructor & Destructor Documentation

◆ SingleModePerturbInitialization() [1/2]

SingleModePerturbInitialization::SingleModePerturbInitialization ( DConstFieldSpVx  fequilibrium,
host_t< IFieldMemSp >  init_perturb_mode,
host_t< DFieldMemSp >  init_perturb_amplitude 
)

Creates an instance of the SingleModePerturbInitialization class.

Parameters
[in]fequilibriumA Maxwellian.
[in]init_perturb_modeThe perturbation mode.
[in]init_perturb_amplitudeThe perturbation amplitude.

◆ SingleModePerturbInitialization() [2/2]

SingleModePerturbInitialization::SingleModePerturbInitialization ( DConstFieldSpVxVy  fequilibrium,
host_t< IFieldMemSp >  init_perturb_mode,
host_t< DFieldMemSp >  init_perturb_amplitude 
)

Creates an instance of the SingleModePerturbInitialization class.

Parameters
[in]fequilibriumA Maxwellian.
[in]init_perturb_modeThe perturbation mode.
[in]init_perturb_amplitudeThe perturbation amplitude.

Member Function Documentation

◆ perturbation_initialization() [1/2]

void SingleModePerturbInitialization::perturbation_initialization ( DFieldX  perturbation,
int const  perturb_mode,
double const  perturb_amplitude 
) const

Initialization of the perturbation.

Parameters
[in,out]perturbationOn input: an uninitialized array On output: an array containing a values that has a sinusoidal variation with given amplitude and mode.
[in]perturb_modeThe mode of the perturbation.
[in]perturb_amplitudeThe amplitude of the perturbation.

◆ init_from_input() [1/2]

static SingleModePerturbInitialization SingleModePerturbInitialization::init_from_input ( DConstFieldSpVx  allfequilibrium,
IdxRangeSp  idx_range_kinsp,
PC_tree_t const &  yaml_input_file 
)
static

Read init_perturb_mode and init_perturb amplitude in a YAML input file to initialize the perturbation.

Parameters
[in]allfequilibriumequilibrium distribution function.
[in]idx_range_kinspIndex range for the kinetic species.
[in]yaml_input_fileYAML input file.
Returns
an instance of SingleModePerturbInitialization class.

◆ operator()() [1/2]

DFieldSpXVx SingleModePerturbInitialization::operator() ( DFieldSpXVx  allfdistribu) const
overridevirtual

Initializes the distribution function as as a perturbed Maxwellian.

Parameters
[in,out]allfdistribuThe initialized distribution function.
Returns
The initialized distribution function.

Implements IInitialization.

◆ perturbation_initialization() [2/2]

void SingleModePerturbInitialization::perturbation_initialization ( DFieldXY  perturbation,
int const  perturb_mode,
double const  perturb_amplitude 
) const

Initialization of the perturbation.

Parameters
[in,out]perturbationOn input: an uninitialized array On output: an array containing a values that has a sinusoidal variation with given amplitude and mode.
[in]perturb_modeThe mode of the perturbation.
[in]perturb_amplitudeThe amplitude of the perturbation.

◆ operator()() [2/2]

DFieldSpXYVxVy SingleModePerturbInitialization::operator() ( DFieldSpXYVxVy  allfdistribu) const
overridevirtual

Initializes the distribution function as as a perturbed Maxwellian.

Parameters
[in,out]allfdistribuThe initialized distribution function.
Returns
The initialized distribution function.

Implements IInitialization.

◆ init_from_input() [2/2]

static SingleModePerturbInitialization SingleModePerturbInitialization::init_from_input ( DConstFieldSpVxVy  allfequilibrium,
IdxRangeSp  idx_range_kinsp,
PC_tree_t const &  yaml_input_file 
)
static

Read init_perturb_mode and init_perturb amplitude in a YAML input file to initialize the perturbation.

Parameters
[in]allfequilibriumequilibrium distribution function.
[in]idx_range_kinspIndex range for the kinetic species.
[in]yaml_input_fileYAML input file.
Returns
an instance of SingleModePerturbInitialization class.

The documentation for this class was generated from the following files: