![]() |
ORB5
v4.9.4
|
Data Types | |
type | field_type |
Field data structure. More... | |
interface | part_grid |
Functions/Subroutines | |
subroutine, public | init_module |
subroutine, public | init_field (field) |
Allocate derived type members and set default values. More... | |
subroutine, public | copyin_field_gpu (field) |
Copy field boolean arrays to GPU. More... | |
subroutine, public | add_field_attributes (field, isp, natts) |
Add marker attributes to store potential fields and their gradients. More... | |
subroutine, public | setrho (i_att) |
Compute RHS of Poisson/Ampere equations. More... | |
subroutine, public | create_rhs (no_species_flag, filter_flag, rho_bspl_loc, rhs_f_loc, sig2noi, transform_) |
Interface for the create_rhs_* routines. More... | |
subroutine | create_rhs_pptransp (no_species_flag, filter_flag, rho_bspl_loc, rhs_f_loc, sig2noi, transform_) |
Create RHS using the pptransp algorithm. More... | |
subroutine | init_mode_distribution (filter, mbounds, width_m) |
subroutine | create_rhs_local_dft (no_species_flag, filter_flag, rho_bspl_loc, rhs_f_loc, transform_) |
Create RHS using the local DFT algorithm. More... | |
subroutine | create_rhs_passing (rho_passing) |
Creates the rhs contribution of the passing electrons for the hybrid electron model (Idomura2016) More... | |
subroutine, public | create_field_bspl (field_bspl_loc, rhs_f_loc, computephibar, transform_) |
Interface routine for create_field_bspl* routines. More... | |
subroutine | create_field_bspl_pptransp (field_bspl_loc, rhs_f_loc, computephibar, transform_) |
Convert RHS in Fourier to field in real space. More... | |
subroutine | create_field_bspl_local_dft (field_bspl_loc, rhs_f_loc, computephibar, transform_) |
Convert RHS in Fourier to field in real space. More... | |
subroutine, public | pde_solver (nsel_solve, create_flag) |
Solve Poisson or Ampere equation. More... | |
subroutine, public | solve_mass_matrix (adin) |
Solve identity (only used when building islands) More... | |
subroutine, public | output_back_pot (fresid, time) |
Write the background potential to hdf5. More... | |
subroutine, public | fdiag_energy (isp, step) |
subroutine, public | fdiag_fields (step) |
subroutine, public | get_phi0 (sigma, chi, lnaveg, chit, sigmat, chi_sigma_gradients, emf, potential) |
Evaluate gyroaverage of n=0 component of electrostatic potential and its gradients. More... | |
subroutine | add_to_1d (fieldin, diag_index, indexes, ithread, to_add_list) |
subroutine | polarisation_terms_p0q0 (isp, sigma, chi, sigmat, chit, ithread, lnaveg, diag_weight, ephi) |
subroutine, public | init_filter |
integer function, dimension(0:fields%nphi-1, islw:isup, 0:fields%nchip-1) | get_filter (iact, mshift) |
3D filter function More... | |
subroutine, public | get_pot_disp (st, chit, phit, pot, field_select, isp) |
real function, public | getpot (st, chit, zphit, field_bspl, ephi_q) |
subroutine, public | profrz (s, c, potsc, potsp, rsc, zsc, field_select) |
subroutine | spectrum2 (ispec, mdim, ndim, spec, spec_loc, isp) |
subroutine, public | sphibar (st, phi0, phib, phit) |
Compute flux surface average of phi. More... | |
subroutine | initgrids |
Initialize grids. More... | |
subroutine | backsolve (nsel_backsolve) |
Perform backsolve. More... | |
subroutine | backsolve_generic (matnum, rhs_f) |
subroutine | alloc_fields_array |
subroutine | def_mass_mat |
Define DFT of the mass matrix and its inverse (1/M) More... | |
subroutine | alloc_rhs |
subroutine, public | getrhoav (rhoav) |
subroutine | def_matrix_filter |
Define array mmin_f, mmax_f for poloidal filter. More... | |
subroutine, public | correct_current |
Use the enhanced control variates method to split the weights. More... | |
subroutine | set_apar_ramp (time) |
subroutine, public | vecmatmul (vec_out, imat, vec_in) |
Compute vec_out = MATS(imat) * vec_in. More... | |
subroutine, public | solve_fem (time) |
Solve potential equations and compute field vector. More... | |
subroutine, public | initialize_fem () |
Initialize. More... | |
real function | func_init_potential (ps, chit, phit) |
Generate initial perturbation. More... | |
subroutine, public | read_write_field_data_disp (iflag, datn) |
subroutine | read_write_field_data (iflag, field_bspl, field_select, datn) |
subroutine, public | copy_fields (field_select) |
subroutine | const_phi (phi) |
subroutine, public | fieldp2fieldc (matnum, zarrP, zarrC) |
Solve potential equations and compute field vector. More... | |
subroutine, public | bspl2fft (rho_loc, rhs_f_loc) |
subroutine, public | fft2bspl (rhs_f_loc, phi_bspl_loc) |
subroutine, public | matmul_ami (matnum, zarrC, zarrP) |
Variables | |
integer, dimension(4), save, public | lb |
integer, dimension(4), save, public | ub |
integer, save, public | islw |
integer, save, public | isup |
integer, save | islw1 |
integer, save | isup1 |
integer, save, public | jclw |
integer, save, public | jcup |
integer, save | jclw1 |
integer, save | jcup1 |
integer, save, public | kplw |
integer, save, public | kpup |
integer, save | kplw1 |
integer, save | kpup1 |
integer, save | islw_b |
integer, save | isup_b |
integer, dimension(8), save | filter_modes |
integer, save, public | nblocks_eff |
integer, dimension(:,:,:), allocatable, save, public | filter |
integer, dimension(:,:,:), allocatable, save, public | filter2 |
integer, dimension(:,:), allocatable, save, public | mmin_f |
integer, dimension(:,:), allocatable, save | mmax_f |
integer, dimension(:,:), allocatable | mmin_f_global |
integer, dimension(:,:), allocatable | mmax_f_global |
integer, dimension(:,:,:), allocatable | mbounds |
integer, dimension(:), allocatable, save, public | blsize |
integer, dimension(:), allocatable, save, public | iblock |
real, dimension(:), allocatable, save, public | sgrid |
real, dimension(:), allocatable, save, public | chigrid |
real, dimension(:), allocatable, save, public | phigrid |
real, dimension(:,:,:), allocatable, save | phi1_bspl |
real, dimension(:,:,:), allocatable, save | phi2_bspl |
real, dimension(:,:,:), allocatable, save | apar_bspl_old |
real, dimension(:,:), allocatable, save | phi0 |
n=0 component of phi More... | |
real, dimension(:,:,:,:), allocatable, save, public | rho_bspl |
real, dimension(:,:,:), allocatable, save, public | moment_sp_bspl |
real, dimension(:,:), allocatable, save | rho_passing_bspl |
real, dimension(:,:,:,:), allocatable, save, public | curr_bspl |
real, dimension(:,:,:,:), allocatable, save | curr_temp |
real, dimension(:,:,:), allocatable, save | rho_mass_bspl |
real, dimension(:,:,:), allocatable, save | curr_corr_bspl |
real, dimension(:,:,:), allocatable, save, public | curr_sympl_bspl |
real, dimension(:,:,:), allocatable, save, public | apar_ham_bspl |
real, dimension(:,:,:), allocatable, save, public | mom_sp_bspl |
complex, dimension(:,:), allocatable, save, public | rhs_f |
complex, dimension(:,:), allocatable, save, public | rhs_f_mass |
complex, dimension(:,:), allocatable, save, public | rhs_f_amp |
complex, dimension(:,:), allocatable, save, public | rhs_f_apar_sympl |
complex, dimension(:,:), allocatable, save | rhs_f_adi_curr |
complex, dimension(:,:), allocatable, save, public | rhs_f_lapl |
complex, dimension(:,:), allocatable, save, public | mom_rhs |
real, dimension(:,:), allocatable, save | rhs_tmp |
real, dimension(:,:), allocatable, save | rhs_mass |
real, dimension(:), allocatable, save, public | fftminv |
complex, dimension(:), allocatable, save | dfftmass |
real, save, public | dsgrid |
real, save, public | dchigrid |
real, save, public | dphigrid |
real, save, public | dsgrid_inv |
real, save, public | dchigrid_inv |
real, save, public | dphigrid_inv |
complex, dimension(:,:,:), allocatable, target, public | crhs |
complex, dimension(:,:,:), allocatable, target, public | crhs_fft |
complex, dimension(:,:,:), allocatable, target | crhs_buffer |
complex, dimension(:,:,:), allocatable, target | crhs_filtered |
real, dimension(:,:), allocatable, save, public | density_1d_fluxest |
real, dimension(:,:), allocatable, save, public | density_1d_marker |
real, dimension(:), allocatable, save | bnrm2 |
integer, save, public | neq |
integer, save, public | neq_f |
real, dimension(:), allocatable, save | phib |
real, dimension(:), allocatable, save | phib2 |
real, dimension(:), allocatable, save, public | zrhs0 |
logical, save | lbuild =.false. |
integer, save | dim1 |
integer, save | dim2 |
integer, save | dim3 |
integer, dimension(:), allocatable | local_n_modes |
integer, dimension(:), allocatable | local_n_start |
integer, dimension(:), allocatable | local_n_end |
integer, dimension(:), allocatable | local_n_disp |
integer | width_m |
type(mpi_datatype), save | mpi_rtype_c |
type(mpi_datatype), save | mpi_rtype_r |
type(mpi_datatype), save | mpi_stype_c |
type(mpi_datatype), save | mpi_stype_r |
type(field_type), public | phi |
Electrostatic potential. More... | |
type(field_type), public | apar |
Electromagnetic potential. More... | |
type(field_type), public | apar_sympl |
Symplectic electromagnetic potential. More... | |
subroutine, public fields_mod::add_field_attributes | ( | type(field_type), intent(inout) | field, |
integer, intent(in) | isp, | ||
integer, intent(inout) | natts | ||
) |
Add marker attributes to store potential fields and their gradients.
[in,out] | field | Potential field |
[in] | isp | Species index |
[in,out] | natts | Number of attributes (incremented by the routine) |
subroutine fields_mod::add_to_1d | ( | type(diag1d), intent(inout) | fieldin, |
integer, intent(in) | diag_index, | ||
integer, dimension(:), intent(in) | indexes, | ||
integer, intent(in) | ithread, | ||
real, dimension(:), intent(in) | to_add_list | ||
) |
subroutine fields_mod::alloc_fields_array |
|
private |
|
private |
Perform backsolve.
[in] | nsel_backsolve | Selector for field to be solved |
subroutine fields_mod::backsolve_generic | ( | integer, intent(in) | matnum, |
complex, dimension(1:neq_f,0:fields%nphip-1), intent(inout) | rhs_f | ||
) |
subroutine, public fields_mod::bspl2fft | ( | real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(in) | rho_loc, |
complex, dimension(1:neq_f, 0:fields%nphip-1), intent(out) | rhs_f_loc | ||
) |
subroutine fields_mod::const_phi | ( | real, dimension(islw:isup,jclw:jcup,kplw:kpup), intent(out) | phi | ) |
subroutine, public fields_mod::copy_fields | ( | integer, intent(in) | field_select | ) |
subroutine, public fields_mod::copyin_field_gpu | ( | type(field_type), intent(inout) | field | ) |
Copy field boolean arrays to GPU.
subroutine, public fields_mod::correct_current |
Use the enhanced control variates method to split the weights.
subroutine, public fields_mod::create_field_bspl | ( | real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(out) | field_bspl_loc, |
complex, dimension(1:neq_f, 0:fields%nphip-1), intent(in) | rhs_f_loc, | ||
logical, intent(in) | computephibar, | ||
logical, intent(in), optional | transform_ | ||
) |
Interface routine for create_field_bspl*
routines.
[out] | field_bspl_loc | Field in real space |
[in] | rhs_f_loc | Right-hand-side in Fourier space |
[in] | computephibar | Compute \(\bar\phi\) |
[in] | transform_ | Change basis back |
subroutine fields_mod::create_field_bspl_local_dft | ( | real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(out) | field_bspl_loc, |
complex, dimension(1:neq_f, 0:fields%nphip-1), intent(in) | rhs_f_loc, | ||
logical, intent(in) | computephibar, | ||
logical, intent(in), optional | transform_ | ||
) |
Convert RHS in Fourier to field in real space.
[in] | transform_ | Change basis back |
[in] | computephibar | Compute \(\bar\phi\) |
[out] | field_bspl_loc | Field in real space |
[in] | rhs_f_loc | Right-hand-side in Fourier space |
|
private |
Convert RHS in Fourier to field in real space.
[in] | transform_ | Change basis back |
[in] | computephibar | Compute \(\bar\phi\) |
[out] | field_bspl_loc | Field in real space |
[in] | rhs_f_loc | Right-hand-side in Fourier space |
subroutine, public fields_mod::create_rhs | ( | integer, intent(in) | no_species_flag, |
logical, intent(in) | filter_flag, | ||
real, dimension(islw:isup, jclw:jcup, kplw:kpup, basic%nspecies), intent(in) | rho_bspl_loc, | ||
complex, dimension(1:neq_f, 0:fields%nphip-1), intent(out), target | rhs_f_loc, | ||
integer, intent(in), optional | sig2noi, | ||
logical, intent(in), optional | transform_ | ||
) |
Interface for the create_rhs_*
routines.
|
private |
Create RHS using the local DFT algorithm.
[in] | transform_ | Change basis |
subroutine fields_mod::create_rhs_passing | ( | real, dimension(lb(1):ub(1),lb(2):ub(2)), intent(out) | rho_passing | ) |
Creates the rhs contribution of the passing electrons for the hybrid electron model (Idomura2016)
This is a first implementation of the rhs coming from the passing electron contribution for Idomura's hybrid model. In a first approach, the passing contribution if filtered and then added to the total rhs BEFORE it is filtered and the boundary conditions are applied. This is not the best approach since only me_sd=0 will do the work while the other processes wait.
[out] | rho_passing | Array containing passing electrons charge |
|
private |
Create RHS using the pptransp algorithm.
[in] | transform_ | Change basis |
|
private |
Define DFT of the mass matrix and its inverse (1/M)
|
private |
Define array mmin_f, mmax_f for poloidal filter.
subroutine, public fields_mod::fdiag_energy | ( | integer, intent(in) | isp, |
integer, intent(in) | step | ||
) |
subroutine, public fields_mod::fdiag_fields | ( | integer, intent(in) | step | ) |
subroutine, public fields_mod::fft2bspl | ( | complex, dimension(1:neq_f, 0:fields%nphip-1), intent(inout) | rhs_f_loc, |
real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(out) | phi_bspl_loc | ||
) |
subroutine, public fields_mod::fieldp2fieldc | ( | integer, intent(in) | matnum, |
real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(in) | zarrP, | ||
real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(out) | zarrC | ||
) |
Solve potential equations and compute field vector.
real function fields_mod::func_init_potential | ( | real | ps, |
real | chit, | ||
real | phit | ||
) |
Generate initial perturbation.
ps | Radial position in \(s\) |
chit | Poloidal position |
phit | Toroidal position |
integer function, dimension(0:fields%nphi-1,islw:isup,0:fields%nchip-1) fields_mod::get_filter | ( | integer, intent(in) | iact, |
integer, intent(in) | mshift | ||
) |
3D filter function
[in] | iact | Defines the type of filter (rectangular, field-aligned, etc) |
[in] | mshift | Add a shift around toroidal modes for diagonal filter |
subroutine, public fields_mod::get_phi0 | ( | real, intent(in) | sigma, |
real, intent(in) | chi, | ||
integer, intent(in) | lnaveg, | ||
real, dimension(:), intent(in) | chit, | ||
real, dimension(:), intent(in) | sigmat, | ||
real, dimension(:,:), intent(in) | chi_sigma_gradients, | ||
real, dimension(2), intent(out) | emf, | ||
real, intent(out) | potential | ||
) |
Evaluate gyroaverage of n=0 component of electrostatic potential and its gradients.
subroutine, public fields_mod::get_pot_disp | ( | real, intent(in) | st, |
real, intent(in) | chit, | ||
real, intent(in) | phit, | ||
real, intent(out) | pot, | ||
integer, intent(in) | field_select, | ||
integer, intent(in), optional | isp | ||
) |
real function, public fields_mod::getpot | ( | real, intent(in) | st, |
real, intent(in) | chit, | ||
real, intent(in) | zphit, | ||
real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(in) | field_bspl, | ||
real, intent(out), optional | ephi_q | ||
) |
subroutine, public fields_mod::getrhoav | ( | real, dimension(islw:isup), intent(inout) | rhoav | ) |
subroutine, public fields_mod::init_field | ( | type(field_type), intent(inout) | field | ) |
Allocate derived type members and set default values.
subroutine, public fields_mod::init_filter |
subroutine fields_mod::init_mode_distribution | ( | integer, dimension(:, :, :), intent(in), allocatable | filter, |
integer, dimension(:, :, :), intent(inout), allocatable | mbounds, | ||
integer, intent(out) | width_m | ||
) |
subroutine, public fields_mod::init_module |
subroutine fields_mod::initgrids |
Initialize grids.
subroutine, public fields_mod::initialize_fem |
Initialize.
subroutine, public fields_mod::matmul_ami | ( | integer, intent(in) | matnum, |
real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(in) | zarrC, | ||
real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(out) | zarrP | ||
) |
subroutine, public fields_mod::output_back_pot | ( | integer, intent(in) | fresid, |
real, intent(in) | time | ||
) |
Write the background potential to hdf5.
subroutine, public fields_mod::pde_solver | ( | integer, intent(in) | nsel_solve, |
logical, intent(in) | create_flag | ||
) |
Solve Poisson or Ampere equation.
[in] | nsel_solve | Which solver |
[in] | create_flag | Transform solution field from Fourier back to real space |
|
private |
subroutine, public fields_mod::profrz | ( | real, dimension(0:), intent(in) | s, |
real, dimension(0:), intent(in) | c, | ||
real, dimension(0:,0:), intent(out) | potsc, | ||
real, dimension(0:,0:), intent(out) | potsp, | ||
real, dimension(0:,0:), intent(out) | rsc, | ||
real, dimension(0:,0:), intent(out) | zsc, | ||
integer, intent(in) | field_select | ||
) |
|
private |
subroutine, public fields_mod::read_write_field_data_disp | ( | integer, intent(in) | iflag, |
integer, intent(in) | datn | ||
) |
subroutine fields_mod::set_apar_ramp | ( | real, intent(in) | time | ) |
subroutine, public fields_mod::setrho | ( | integer, intent(in) | i_att | ) |
Compute RHS of Poisson/Ampere equations.
[in] | i_att | The number of the iteration of the larmor point arrays |
nl_chargecorr hasn't been tested for anything except basic adiabatic electrons/electrostatic case.
subroutine, public fields_mod::solve_fem | ( | real, intent(in) | time | ) |
Solve potential equations and compute field vector.
subroutine, public fields_mod::solve_mass_matrix | ( | integer, intent(in) | adin | ) |
Solve identity (only used when building islands)
subroutine fields_mod::spectrum2 | ( | integer, intent(in) | ispec, |
integer, intent(in) | mdim, | ||
integer, intent(in) | ndim, | ||
real, dimension(1:ndim,1:2*mdim), intent(out) | spec, | ||
real, dimension(1:ndim,1:2*mdim), intent(out) | spec_loc, | ||
integer, intent(in), optional | isp | ||
) |
subroutine, public fields_mod::sphibar | ( | real, intent(in) | st, |
real, dimension(:), intent(in) | phi0, | ||
real, intent(out) | phib, | ||
real, intent(in), optional | phit | ||
) |
Compute flux surface average of phi.
[in] | st | Radial position |
[in] | phi0 | Electrostatic potential |
[out] | phib | Flux-surface averaged potential |
subroutine, public fields_mod::vecmatmul | ( | complex, dimension(:,:), intent(inout), allocatable | vec_out, |
integer, intent(in) | imat, | ||
complex, dimension(:,:), intent(in), allocatable | vec_in | ||
) |
Compute vec_out = MATS(imat) * vec_in.
type(field_type), public fields_mod::apar |
Electromagnetic potential.
|
private |
real, dimension(:,:,:), allocatable, save, public fields_mod::apar_ham_bspl |
type(field_type), public fields_mod::apar_sympl |
Symplectic electromagnetic potential.
integer, dimension(:), allocatable, save, public fields_mod::blsize |
|
private |
real, dimension(:), allocatable, save, public fields_mod::chigrid |
complex, dimension(:,:,:), allocatable, target, public fields_mod::crhs |
|
private |
complex, dimension(:,:,:), allocatable, target, public fields_mod::crhs_fft |
|
private |
real, dimension(:,:,:,:), allocatable, save, public fields_mod::curr_bspl |
|
private |
real, dimension(:,:,:), allocatable, save, public fields_mod::curr_sympl_bspl |
|
private |
real, save, public fields_mod::dchigrid |
real, save, public fields_mod::dchigrid_inv |
real, dimension(:,:), allocatable, save, public fields_mod::density_1d_fluxest |
real, dimension(:,:), allocatable, save, public fields_mod::density_1d_marker |
|
private |
|
private |
|
private |
|
private |
real, save, public fields_mod::dphigrid |
real, save, public fields_mod::dphigrid_inv |
real, save, public fields_mod::dsgrid |
real, save, public fields_mod::dsgrid_inv |
real, dimension(:), allocatable, save, public fields_mod::fftminv |
integer, dimension(:,:,:), allocatable, save, public fields_mod::filter |
integer, dimension(:,:,:), allocatable, save, public fields_mod::filter2 |
|
private |
integer, dimension(:), allocatable, save, public fields_mod::iblock |
integer, save, public fields_mod::islw |
|
private |
|
private |
integer, save, public fields_mod::isup |
|
private |
|
private |
integer, save, public fields_mod::jclw |
|
private |
integer, save, public fields_mod::jcup |
|
private |
integer, save, public fields_mod::kplw |
|
private |
integer, save, public fields_mod::kpup |
|
private |
integer, dimension(4), save, public fields_mod::lb |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
integer, dimension(:,:), allocatable, save, public fields_mod::mmin_f |
|
private |
complex, dimension(:,:), allocatable, save, public fields_mod::mom_rhs |
real, dimension(:,:,:), allocatable, save, public fields_mod::mom_sp_bspl |
real, dimension(:,:,:), allocatable, save, public fields_mod::moment_sp_bspl |
|
private |
|
private |
|
private |
|
private |
integer, save, public fields_mod::nblocks_eff |
integer, save, public fields_mod::neq |
integer, save, public fields_mod::neq_f |
type(field_type), public fields_mod::phi |
Electrostatic potential.
|
private |
n=0 component of phi
|
private |
|
private |
|
private |
|
private |
real, dimension(:), allocatable, save, public fields_mod::phigrid |
real, dimension(:,:,:,:), allocatable, save, public fields_mod::rho_bspl |
|
private |
|
private |
complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f |
|
private |
complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_amp |
complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_apar_sympl |
complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_lapl |
complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_mass |
|
private |
|
private |
real, dimension(:), allocatable, save, public fields_mod::sgrid |
integer, dimension(4), save, public fields_mod::ub |
|
private |
real, dimension(:), allocatable, save, public fields_mod::zrhs0 |