ORB5  v4.9.4
fields_mod Module Reference

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...
 

Function/Subroutine Documentation

◆ add_field_attributes()

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.

Author
N. Ohana
Date
08.2018
Parameters
[in,out]fieldPotential field
[in]ispSpecies index
[in,out]nattsNumber of attributes (incremented by the routine)
+ Here is the caller graph for this function:

◆ add_to_1d()

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 
)
+ Here is the caller graph for this function:

◆ alloc_fields_array()

subroutine fields_mod::alloc_fields_array
+ Here is the caller graph for this function:

◆ alloc_rhs()

subroutine fields_mod::alloc_rhs
private
+ Here is the caller graph for this function:

◆ backsolve()

subroutine fields_mod::backsolve ( integer, intent(in)  nsel_backsolve)
private

Perform backsolve.

Parameters
[in]nsel_backsolveSelector for field to be solved
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backsolve_generic()

subroutine fields_mod::backsolve_generic ( integer, intent(in)  matnum,
complex, dimension(1:neq_f,0:fields%nphip-1), intent(inout)  rhs_f 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bspl2fft()

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 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ const_phi()

subroutine fields_mod::const_phi ( real, dimension(islw:isup,jclw:jcup,kplw:kpup), intent(out)  phi)
+ Here is the caller graph for this function:

◆ copy_fields()

subroutine, public fields_mod::copy_fields ( integer, intent(in)  field_select)

◆ copyin_field_gpu()

subroutine, public fields_mod::copyin_field_gpu ( type(field_type), intent(inout)  field)

Copy field boolean arrays to GPU.

Author
N. Ohana
Date
09.2018
+ Here is the caller graph for this function:

◆ correct_current()

subroutine, public fields_mod::correct_current

Use the enhanced control variates method to split the weights.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_field_bspl()

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.

Parameters
[out]field_bspl_locField in real space
[in]rhs_f_locRight-hand-side in Fourier space
[in]computephibarCompute \(\bar\phi\)
[in]transform_Change basis back
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_field_bspl_local_dft()

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.

Parameters
[in]transform_Change basis back
[in]computephibarCompute \(\bar\phi\)
[out]field_bspl_locField in real space
[in]rhs_f_locRight-hand-side in Fourier space
Todo:
Maybe split loop here We could modify the input array so that (n=0) = 0.5*(n=0), same for n=Nphi/2 so that we don't need the following test.
Todo:
Maybe do it globally ?
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_field_bspl_pptransp()

subroutine fields_mod::create_field_bspl_pptransp ( 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_ 
)
private

Convert RHS in Fourier to field in real space.

Parameters
[in]transform_Change basis back
[in]computephibarCompute \(\bar\phi\)
[out]field_bspl_locField in real space
[in]rhs_f_locRight-hand-side in Fourier space
Todo:
Check why we += instead of = in original version
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_rhs()

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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_rhs_local_dft()

subroutine fields_mod::create_rhs_local_dft ( 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,
logical, intent(in), optional  transform_ 
)
private

Create RHS using the local DFT algorithm.

Parameters
[in]transform_Change basis
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_rhs_passing()

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)

Author
Emmanuel Lanti
Date
12/2016

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.

Parameters
[out]rho_passingArray containing passing electrons charge
+ Here is the caller graph for this function:

◆ create_rhs_pptransp()

subroutine fields_mod::create_rhs_pptransp ( 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_ 
)
private

Create RHS using the pptransp algorithm.

Parameters
[in]transform_Change basis
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ def_mass_mat()

subroutine fields_mod::def_mass_mat
private

Define DFT of the mass matrix and its inverse (1/M)

+ Here is the caller graph for this function:

◆ def_matrix_filter()

subroutine fields_mod::def_matrix_filter
private

Define array mmin_f, mmax_f for poloidal filter.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fdiag_energy()

subroutine, public fields_mod::fdiag_energy ( integer, intent(in)  isp,
integer, intent(in)  step 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fdiag_fields()

subroutine, public fields_mod::fdiag_fields ( integer, intent(in)  step)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fft2bspl()

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 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fieldp2fieldc()

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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ func_init_potential()

real function fields_mod::func_init_potential ( real  ps,
real  chit,
real  phit 
)

Generate initial perturbation.

Returns
Initial perturbation
Parameters
psRadial position in \(s\)
chitPoloidal position
phitToroidal position
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_filter()

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

Parameters
[in]iactDefines the type of filter (rectangular, field-aligned, etc)
[in]mshiftAdd a shift around toroidal modes for diagonal filter
Returns
Mask array for the modes inside the filter
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_phi0()

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.

+ Here is the caller graph for this function:

◆ get_pot_disp()

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 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getpot()

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 
)
+ Here is the caller graph for this function:

◆ getrhoav()

subroutine, public fields_mod::getrhoav ( real, dimension(islw:isup), intent(inout)  rhoav)
+ Here is the caller graph for this function:

◆ init_field()

subroutine, public fields_mod::init_field ( type(field_type), intent(inout)  field)

Allocate derived type members and set default values.

Author
N. Ohana
Date
08.2018
+ Here is the caller graph for this function:

◆ init_filter()

subroutine, public fields_mod::init_filter
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_mode_distribution()

subroutine fields_mod::init_mode_distribution ( integer, dimension(:, :, :), intent(in), allocatable  filter,
integer, dimension(:, :, :), intent(inout), allocatable  mbounds,
integer, intent(out)  width_m 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_module()

subroutine, public fields_mod::init_module
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initgrids()

subroutine fields_mod::initgrids

Initialize grids.

+ Here is the caller graph for this function:

◆ initialize_fem()

subroutine, public fields_mod::initialize_fem

Initialize.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matmul_ami()

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 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ output_back_pot()

subroutine, public fields_mod::output_back_pot ( integer, intent(in)  fresid,
real, intent(in)  time 
)

Write the background potential to hdf5.

+ Here is the call graph for this function:

◆ pde_solver()

subroutine, public fields_mod::pde_solver ( integer, intent(in)  nsel_solve,
logical, intent(in)  create_flag 
)

Solve Poisson or Ampere equation.

Parameters
[in]nsel_solveWhich solver
[in]create_flagTransform solution field from Fourier back to real space
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ polarisation_terms_p0q0()

subroutine fields_mod::polarisation_terms_p0q0 ( integer, intent(in)  isp,
real, intent(in)  sigma,
real, intent(in)  chi,
real, intent(in)  sigmat,
real, intent(in)  chit,
integer, intent(in)  ithread,
integer, intent(in)  lnaveg,
real, intent(in)  diag_weight,
real, intent(in)  ephi 
)
private
+ Here is the call graph for this function:

◆ profrz()

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 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_write_field_data()

subroutine fields_mod::read_write_field_data ( integer, intent(in)  iflag,
real, dimension(islw:isup, jclw:jcup, kplw:kpup), intent(inout)  field_bspl,
character(3), intent(in)  field_select,
integer, intent(in)  datn 
)
private
+ Here is the caller graph for this function:

◆ read_write_field_data_disp()

subroutine, public fields_mod::read_write_field_data_disp ( integer, intent(in)  iflag,
integer, intent(in)  datn 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_apar_ramp()

subroutine fields_mod::set_apar_ramp ( real, intent(in)  time)
+ Here is the caller graph for this function:

◆ setrho()

subroutine, public fields_mod::setrho ( integer, intent(in)  i_att)

Compute RHS of Poisson/Ampere equations.

Parameters
[in]i_attThe number of the iteration of the larmor point arrays

nl_chargecorr hasn't been tested for anything except basic adiabatic electrons/electrostatic case.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ solve_fem()

subroutine, public fields_mod::solve_fem ( real, intent(in)  time)

Solve potential equations and compute field vector.

Note
This assumes that electrons are always the second species ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ solve_mass_matrix()

subroutine, public fields_mod::solve_mass_matrix ( integer, intent(in)  adin)

Solve identity (only used when building islands)

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ spectrum2()

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 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sphibar()

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.

Parameters
[in]stRadial position
[in]phi0Electrostatic potential
[out]phibFlux-surface averaged potential
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vecmatmul()

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.

+ Here is the caller graph for this function:

Variable Documentation

◆ apar

type(field_type), public fields_mod::apar

Electromagnetic potential.

◆ apar_bspl_old

real, dimension(:,:,:), allocatable, save fields_mod::apar_bspl_old
private

◆ apar_ham_bspl

real, dimension(:,:,:), allocatable, save, public fields_mod::apar_ham_bspl

◆ apar_sympl

type(field_type), public fields_mod::apar_sympl

Symplectic electromagnetic potential.

◆ blsize

integer, dimension(:), allocatable, save, public fields_mod::blsize

◆ bnrm2

real, dimension(:), allocatable, save fields_mod::bnrm2
private

◆ chigrid

real, dimension(:), allocatable, save, public fields_mod::chigrid

◆ crhs

complex, dimension(:,:,:), allocatable, target, public fields_mod::crhs

◆ crhs_buffer

complex, dimension(:,:,:), allocatable, target fields_mod::crhs_buffer
private

◆ crhs_fft

complex, dimension(:,:,:), allocatable, target, public fields_mod::crhs_fft

◆ crhs_filtered

complex, dimension(:,:,:), allocatable, target fields_mod::crhs_filtered
private

◆ curr_bspl

real, dimension(:,:,:,:), allocatable, save, public fields_mod::curr_bspl

◆ curr_corr_bspl

real, dimension(:,:,:), allocatable, save fields_mod::curr_corr_bspl
private

◆ curr_sympl_bspl

real, dimension(:,:,:), allocatable, save, public fields_mod::curr_sympl_bspl

◆ curr_temp

real, dimension(:,:,:,:), allocatable, save fields_mod::curr_temp
private

◆ dchigrid

real, save, public fields_mod::dchigrid

◆ dchigrid_inv

real, save, public fields_mod::dchigrid_inv

◆ density_1d_fluxest

real, dimension(:,:), allocatable, save, public fields_mod::density_1d_fluxest

◆ density_1d_marker

real, dimension(:,:), allocatable, save, public fields_mod::density_1d_marker

◆ dfftmass

complex, dimension(:), allocatable, save fields_mod::dfftmass
private

◆ dim1

integer, save fields_mod::dim1
private

◆ dim2

integer, save fields_mod::dim2
private

◆ dim3

integer, save fields_mod::dim3
private

◆ dphigrid

real, save, public fields_mod::dphigrid

◆ dphigrid_inv

real, save, public fields_mod::dphigrid_inv

◆ dsgrid

real, save, public fields_mod::dsgrid

◆ dsgrid_inv

real, save, public fields_mod::dsgrid_inv

◆ fftminv

real, dimension(:), allocatable, save, public fields_mod::fftminv

◆ filter

integer, dimension(:,:,:), allocatable, save, public fields_mod::filter

◆ filter2

integer, dimension(:,:,:), allocatable, save, public fields_mod::filter2

◆ filter_modes

integer, dimension(8), save fields_mod::filter_modes
private

◆ iblock

integer, dimension(:), allocatable, save, public fields_mod::iblock

◆ islw

integer, save, public fields_mod::islw

◆ islw1

integer, save fields_mod::islw1
private

◆ islw_b

integer, save fields_mod::islw_b
private

◆ isup

integer, save, public fields_mod::isup

◆ isup1

integer, save fields_mod::isup1
private

◆ isup_b

integer, save fields_mod::isup_b
private

◆ jclw

integer, save, public fields_mod::jclw

◆ jclw1

integer, save fields_mod::jclw1
private

◆ jcup

integer, save, public fields_mod::jcup

◆ jcup1

integer, save fields_mod::jcup1
private

◆ kplw

integer, save, public fields_mod::kplw

◆ kplw1

integer, save fields_mod::kplw1
private

◆ kpup

integer, save, public fields_mod::kpup

◆ kpup1

integer, save fields_mod::kpup1
private

◆ lb

integer, dimension(4), save, public fields_mod::lb

◆ lbuild

logical, save fields_mod::lbuild =.false.
private

◆ local_n_disp

integer, dimension(:), allocatable fields_mod::local_n_disp
private

◆ local_n_end

integer, dimension(:), allocatable fields_mod::local_n_end
private

◆ local_n_modes

integer, dimension(:), allocatable fields_mod::local_n_modes
private

◆ local_n_start

integer, dimension(:), allocatable fields_mod::local_n_start
private

◆ mbounds

integer, dimension(:,:,:), allocatable fields_mod::mbounds
private

◆ mmax_f

integer, dimension(:,:), allocatable, save fields_mod::mmax_f
private

◆ mmax_f_global

integer, dimension(:,:), allocatable fields_mod::mmax_f_global
private

◆ mmin_f

integer, dimension(:,:), allocatable, save, public fields_mod::mmin_f

◆ mmin_f_global

integer, dimension(:,:), allocatable fields_mod::mmin_f_global
private

◆ mom_rhs

complex, dimension(:,:), allocatable, save, public fields_mod::mom_rhs

◆ mom_sp_bspl

real, dimension(:,:,:), allocatable, save, public fields_mod::mom_sp_bspl

◆ moment_sp_bspl

real, dimension(:,:,:), allocatable, save, public fields_mod::moment_sp_bspl

◆ mpi_rtype_c

type(mpi_datatype), save fields_mod::mpi_rtype_c
private

◆ mpi_rtype_r

type(mpi_datatype), save fields_mod::mpi_rtype_r
private

◆ mpi_stype_c

type(mpi_datatype), save fields_mod::mpi_stype_c
private

◆ mpi_stype_r

type(mpi_datatype), save fields_mod::mpi_stype_r
private

◆ nblocks_eff

integer, save, public fields_mod::nblocks_eff

◆ neq

integer, save, public fields_mod::neq

◆ neq_f

integer, save, public fields_mod::neq_f

◆ phi

type(field_type), public fields_mod::phi

Electrostatic potential.

◆ phi0

real, dimension(:,:), allocatable, save fields_mod::phi0
private

n=0 component of phi

◆ phi1_bspl

real, dimension(:,:,:), allocatable, save fields_mod::phi1_bspl
private

◆ phi2_bspl

real, dimension(:,:,:), allocatable, save fields_mod::phi2_bspl
private

◆ phib

real, dimension(:), allocatable, save fields_mod::phib
private

◆ phib2

real, dimension(:), allocatable, save fields_mod::phib2
private

◆ phigrid

real, dimension(:), allocatable, save, public fields_mod::phigrid

◆ rho_bspl

real, dimension(:,:,:,:), allocatable, save, public fields_mod::rho_bspl

◆ rho_mass_bspl

real, dimension(:,:,:), allocatable, save fields_mod::rho_mass_bspl
private

◆ rho_passing_bspl

real, dimension(:,:), allocatable, save fields_mod::rho_passing_bspl
private

◆ rhs_f

complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f

◆ rhs_f_adi_curr

complex, dimension(:,:), allocatable, save fields_mod::rhs_f_adi_curr
private

◆ rhs_f_amp

complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_amp

◆ rhs_f_apar_sympl

complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_apar_sympl

◆ rhs_f_lapl

complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_lapl

◆ rhs_f_mass

complex, dimension(:,:), allocatable, save, public fields_mod::rhs_f_mass

◆ rhs_mass

real, dimension(:,:), allocatable, save fields_mod::rhs_mass
private

◆ rhs_tmp

real, dimension(:,:), allocatable, save fields_mod::rhs_tmp
private

◆ sgrid

real, dimension(:), allocatable, save, public fields_mod::sgrid

◆ ub

integer, dimension(4), save, public fields_mod::ub

◆ width_m

integer fields_mod::width_m
private

◆ zrhs0

real, dimension(:), allocatable, save, public fields_mod::zrhs0