XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Types | Macros | Functions/Subroutines
es_poisson.F90 File Reference
#include "petsc_v3_10_defs.h"
#include <petsc/finclude/petsc.h>
Include dependency graph for es_poisson.F90:

Data Types

module  f90moduleinterfaces
 
interface  f90moduleinterfaces::pcsetapplicationcontext
 
interface  f90moduleinterfaces::pcgetapplicationcontext
 

Macros

#define XGC1   1
 

Functions/Subroutines

subroutine init_poisson (grid, psn, iflag_dummy)
 
subroutine psn_init_poisson_private (psn, grid, nrhs)
 
subroutine pcshermanmorrisonapply (pc, xin, yout, ierr)
 
subroutine getnnz (grid, nloc, low, high, d_nnz, o_nnz, xgc_petsc, nglobal, ierr)
 
subroutine create_solver (this, grid, bc, ierr)
 
subroutine create_1field_solver (grid, solver)
 
subroutine create_2field_solver (grid, bd, solver)
 
subroutine make_12mat (grid, Bmat, BIdentMat, FSAMass_Te, solver, bd, scale, xgc_petsc)
 
subroutine make_21mat (grid, Cmat, Bmat, CConstBCVec, bd, xgc_petsc)
 
subroutine solve_poisson (grid, psn, n0_only, iflag)
 High level Poisson solver routine, offers choice of outer iterative solver, two-step solver, and FSA solver. More...
 
subroutine solve_poisson_private (grid, psn, iflag)
 
subroutine zero_out_wall (var)
 
subroutine solve_poisson_iter (grid, psn, n0_only, iflag)
 Poisson solver that uses an iterative method to solve for the axisymmetric electrostatic potential: The Poisson equation for the axisymmetric mode is

\[ -\nabla_\perp \cdot \xi \nabla_\perp \overline{\phi}_{k+1} + \frac{e n_0/T_{e,0}} \overline{\phi}_{k+1} = e \left( \langle \overline{\delta n_i} \rangle_g - \overline{\delta n_{e,NA}} \right) + \frac{e n_0/T_{e,0}} \langle \phi_{k} \rangle_{fs} \]

where \(k\) is the iteration index, \(xi\) is the electric susceptibility, \(e\) is the elementary charge, \(n_0\) and \(T_0\) are the background density and temperature, \(\langle \overline{\delta n_i} \rangle_g\) is the gyroaveraged ion (gyrocenter) charge density, \(\overline{\delta n_{e,NA}}\) is the non-adiabatic electron charge density, and \(\langle\dots\rangle\) is the the flux-surface average. \(\overline{\dots}\) is the toroidal average. More...

 
subroutine update_poisson_solver (grid, psn)
 Updates the LHS matrix of the Poisson equation (density and electron temperature) More...
 

Macro Definition Documentation

#define XGC1   1

Function/Subroutine Documentation

subroutine create_1field_solver ( type(grid_type)  grid,
type(xgc_solver)  solver 
)

Here is the caller graph for this function:

subroutine create_2field_solver ( type(grid_type)  grid,
type(boundary2_type)  bd,
type(xgc_solver)  solver 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine create_solver ( type(xgc_solver)  this,
type(grid_type), intent(in)  grid,
type(boundary2_type), intent(in)  bc,
  ierr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine getnnz ( type(grid_type), intent(in)  grid,
  nloc,
  low,
  high,
  d_nnz,
  o_nnz,
dimension(grid%nnode), intent(in)  xgc_petsc,
  nglobal,
  ierr 
)

Here is the caller graph for this function:

subroutine init_poisson ( type(grid_type)  grid,
type(psn_type)  psn,
integer  iflag_dummy 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine make_12mat ( type(grid_type)  grid,
intent(out)  Bmat,
  BIdentMat,
intent(in)  FSAMass_Te,
type(xgc_solver)  solver,
type(boundary2_type), intent(in)  bd,
real (8), intent(in)  scale,
dimension(grid%nnode), intent(in)  xgc_petsc 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine make_21mat ( type(grid_type)  grid,
  Cmat,
intent(in)  Bmat,
  CConstBCVec,
type(boundary2_type), intent(in)  bd,
dimension(grid%nnode), intent(in)  xgc_petsc 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine pcshermanmorrisonapply (   pc,
  xin,
  yout,
  ierr 
)

Here is the caller graph for this function:

subroutine psn_init_poisson_private ( type(psn_type)  psn,
type(grid_type)  grid,
integer  nrhs 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine solve_poisson ( type(grid_type), intent(in)  grid,
type(psn_type), intent(inout)  psn,
logical, intent(in)  n0_only,
integer, intent(in)  iflag 
)

High level Poisson solver routine, offers choice of outer iterative solver, two-step solver, and FSA solver.

Parameters
[in]gridXGC grid data object
[in,out]psnXGC field data object
[in]n0_onlyFlag for solving only n=0 mode and then exit, logical
[in]iflagFlag to indicate whether adiabatic elec or full eq. is solved, integer

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine solve_poisson_iter ( type(grid_type), intent(in)  grid,
type(psn_type), intent(inout)  psn,
logical, intent(in)  n0_only,
integer, intent(in)  iflag 
)

Poisson solver that uses an iterative method to solve for the axisymmetric electrostatic potential: The Poisson equation for the axisymmetric mode is

\[ -\nabla_\perp \cdot \xi \nabla_\perp \overline{\phi}_{k+1} + \frac{e n_0/T_{e,0}} \overline{\phi}_{k+1} = e \left( \langle \overline{\delta n_i} \rangle_g - \overline{\delta n_{e,NA}} \right) + \frac{e n_0/T_{e,0}} \langle \phi_{k} \rangle_{fs} \]

where \(k\) is the iteration index, \(xi\) is the electric susceptibility, \(e\) is the elementary charge, \(n_0\) and \(T_0\) are the background density and temperature, \(\langle \overline{\delta n_i} \rangle_g\) is the gyroaveraged ion (gyrocenter) charge density, \(\overline{\delta n_{e,NA}}\) is the non-adiabatic electron charge density, and \(\langle\dots\rangle\) is the the flux-surface average. \(\overline{\dots}\) is the toroidal average.

The non-axisymmetric Poisson equation is simpler:

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine solve_poisson_private ( type(grid_type)  grid,
type(psn_type)  psn,
integer, intent(in)  iflag 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine update_poisson_solver ( type(grid_type), intent(in)  grid,
type(psn_type), intent(inout)  psn 
)

Updates the LHS matrix of the Poisson equation (density and electron temperature)

Parameters
[in]gridXGC grid data object, type(grid_type)
[in,out]psnXGC field data object, type(psn_type)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine zero_out_wall ( real (8), dimension(grid%nnode), intent(inout)  var)

Here is the caller graph for this function: