XGC1
|
#include "petsc_v3_10_defs.h"
#include <petsc/finclude/petsc.h>
Macros | |
#define | __FUNCT__ "addParMat" |
#define | __FUNCT__ "AddHyperVisPhiMat" |
#define | __FUNCT__ "addXGCMat" |
#define | __FUNCT__ "MatXPY" |
#define | __FUNCT__ "ts_init" |
#define | __FUNCT__ "ts_solve" |
#define | __FUNCT__ "scatter_to_xgc" |
#define | __FUNCT__ "scatter_from_xgc" |
Functions/Subroutines | |
subroutine | ts_matrix_init (a_ts, grid, bc, ierr) |
subroutine | addparmat (grid, psn, a_bc, op_mode, xgc_petsc, a_mat, scales, bs, idx, jdx, ierr) |
Adds the parallel gradient or parallel Laplacian to a_mat op_mode adds some additional factors to the derivative. More... | |
subroutine | addhypervisphimat (grid, xgc_petsc, a_mat, damp_fac, bs, idx, jdx, ierr) |
subroutine | addgradphimat (grid, xgc_petsc, a_mat, bs, idx, jdx, ierr) |
subroutine | addxgcmat (grid, psn, a_bc, xgc_petsc, a_mat, xgc_mat, scales, bs, idx, jdx, ierr) |
Adds any matrix in the XGC sparse matrix format to a_mat. More... | |
subroutine | matxpy (dest, src, bs, idx, jdx, ierr) |
subroutine | ts_init (a_grid, a_psn, a_bc, a_ts, ierr2) |
subroutine | ts_solve (a_ts, a_dt, n1, apar, phi, Je, ierr) |
subroutine | formifunction (ts_dummy, t_dummy, a_XX, a_Xdot, a_FF, a_ts, ierr) |
subroutine | formijacobian (ts, t_dummy, a_XX, a_Xdot_dummy, shift, J, Jpre, a_ts, ierr) |
subroutine | formlhsfunctionlocal (n1, apar, phi, lhsn1, lhsapar, lhsphi, nn) |
subroutine | formrhsjacobian (ts, t_dummy, a_XX, J, Jpre, a_ts, ierr) |
subroutine | formrhsjacobianlocal (a_ts, Jpre, n1, apar, phi, lap_A_par, nn, ierr) |
subroutine | formrhsfunctionlocal (a_ts, time, ts_it, snes_it, n1, apar, phi, lap_A_par, rhsn1, rhsapar, rhsphi, nn) |
subroutine | rhsfunction (ts, time, a_XX, a_FF, a_ts, ierr) |
subroutine | scatter_to_xgc (a_ts, a_XX, a_n1, a_apar, a_phi, ierr) |
subroutine | scatter_from_xgc (a_ts, a_XX, a_n1, a_apar, a_phi, ierr) |
subroutine | make_v_dot_grad_mat_petsc (a_ts, xgc_vec, mat, ierr) |
subroutine | make_diag_mat_petsc (a_ts, xgc_scalar, mat, ierr) |
#define __FUNCT__ "addParMat" |
#define __FUNCT__ "AddHyperVisPhiMat" |
#define __FUNCT__ "addXGCMat" |
#define __FUNCT__ "MatXPY" |
#define __FUNCT__ "ts_init" |
#define __FUNCT__ "ts_solve" |
#define __FUNCT__ "scatter_to_xgc" |
#define __FUNCT__ "scatter_from_xgc" |
subroutine addgradphimat | ( | type(grid_type), intent(in) | grid, |
dimension(grid%nnode), intent(in) | xgc_petsc, | ||
a_mat, | |||
intent(in) | bs, | ||
intent(in) | idx, | ||
intent(in) | jdx, | ||
intent(out) | ierr | ||
) |
subroutine addhypervisphimat | ( | type(grid_type), intent(in) | grid, |
dimension(grid%nnode), intent(in) | xgc_petsc, | ||
a_mat, | |||
intent(in) | damp_fac, | ||
intent(in) | bs, | ||
intent(in) | idx, | ||
intent(in) | jdx, | ||
intent(out) | ierr | ||
) |
subroutine addparmat | ( | type(grid_type), intent(in) | grid, |
type(psn_type) | psn, | ||
type(boundary2_type), intent(in) | a_bc, | ||
integer, intent(in) | op_mode, | ||
dimension(grid%nnode), intent(in) | xgc_petsc, | ||
a_mat, | |||
intent(in) | scales, | ||
intent(in) | bs, | ||
intent(in) | idx, | ||
intent(in) | jdx, | ||
intent(out) | ierr | ||
) |
Adds the parallel gradient or parallel Laplacian to a_mat op_mode adds some additional factors to the derivative.
[in] | op_mode | (0) b.grad(X), (1) B [b.grad(X/(eB))], (2) T_0/n_0 [b.grad(X)], (3) [b.grad]^2(X), (4) B0/B_phi0 [b.grad(X)] Careful for mode (2), gridtempe is in Joule, not eV —> 1/sml_e_charge |
subroutine addxgcmat | ( | type(grid_type), intent(in) | grid, |
type(psn_type) | psn, | ||
type(boundary2_type), intent(in) | a_bc, | ||
dimension(grid%nnode), intent(in) | xgc_petsc, | ||
a_mat, | |||
type(mat_type), intent(in) | xgc_mat, | ||
intent(in) | scales, | ||
intent(in) | bs, | ||
intent(in) | idx, | ||
intent(in) | jdx, | ||
intent(out) | ierr | ||
) |
Adds any matrix in the XGC sparse matrix format to a_mat.
subroutine formifunction | ( | ts_dummy, | |
t_dummy, | |||
intent(in) | a_XX, | ||
intent(in) | a_Xdot, | ||
intent(out) | a_FF, | ||
type(xgc_ts) | a_ts, | ||
intent(out) | ierr | ||
) |
subroutine formijacobian | ( | ts, | |
t_dummy, | |||
a_XX, | |||
a_Xdot_dummy, | |||
shift, | |||
J, | |||
Jpre, | |||
type(xgc_ts) | a_ts, | ||
intent(out) | ierr | ||
) |
subroutine formlhsfunctionlocal | ( | real (kind=8), dimension(nn), intent(in) | n1, |
real (kind=8), dimension(nn), intent(in) | apar, | ||
real (kind=8), dimension(nn), intent(in) | phi, | ||
real (kind=8), dimension(nn), intent(out) | lhsn1, | ||
real (kind=8), dimension(nn), intent(out) | lhsapar, | ||
real (kind=8), dimension(nn), intent(out) | lhsphi, | ||
integer | nn | ||
) |
subroutine formrhsfunctionlocal | ( | type(xgc_ts) | a_ts, |
time, | |||
ts_it, | |||
snes_it, | |||
real (kind=8), dimension(nn), intent(in) | n1, | ||
real (kind=8), dimension(nn), intent(in) | apar, | ||
real (kind=8), dimension(nn), intent(in) | phi, | ||
real (kind=8), dimension(nn), intent(in) | lap_A_par, | ||
real (kind=8), dimension(nn), intent(out) | rhsn1, | ||
real (kind=8), dimension(nn), intent(out) | rhsapar, | ||
real (kind=8), dimension(nn), intent(out) | rhsphi, | ||
integer | nn | ||
) |
subroutine formrhsjacobian | ( | ts, | |
t_dummy, | |||
a_XX, | |||
J, | |||
Jpre, | |||
type(xgc_ts) | a_ts, | ||
intent(out) | ierr | ||
) |
subroutine formrhsjacobianlocal | ( | type(xgc_ts) | a_ts, |
intent(inout) | Jpre, | ||
real (kind=8), dimension(nn), intent(in) | n1, | ||
real (kind=8), dimension(nn), intent(in) | apar, | ||
real (kind=8), dimension(nn), intent(in) | phi, | ||
real (kind=8), dimension(nn), intent(in) | lap_A_par, | ||
integer | nn, | ||
intent(out) | ierr | ||
) |
subroutine make_diag_mat_petsc | ( | type(xgc_ts), intent(in) | a_ts, |
real (kind=8), dimension(a_ts%grid%nnode), intent(in) | xgc_scalar, | ||
intent(inout) | mat, | ||
intent(out) | ierr | ||
) |
subroutine make_v_dot_grad_mat_petsc | ( | type(xgc_ts), intent(in) | a_ts, |
real (kind=8), dimension(a_ts%grid%nnode,3), intent(in) | xgc_vec, | ||
intent(out) | mat, | ||
ierr | |||
) |
subroutine matxpy | ( | dest, | |
src, | |||
bs, | |||
idx, | |||
jdx, | |||
ierr | |||
) |
subroutine rhsfunction | ( | ts, | |
time, | |||
a_XX, | |||
a_FF, | |||
type(xgc_ts) | a_ts, | ||
intent(out) | ierr | ||
) |
subroutine scatter_from_xgc | ( | type(xgc_ts) | a_ts, |
a_XX, | |||
real (kind=8), dimension(a_ts%nnode) | a_n1, | ||
real (kind=8), dimension(a_ts%nnode) | a_apar, | ||
real (kind=8), dimension(a_ts%nnode) | a_phi, | ||
intent(out) | ierr | ||
) |
subroutine scatter_to_xgc | ( | type(xgc_ts), intent(in) | a_ts, |
intent(in) | a_XX, | ||
real (kind=8), dimension(a_ts%nnode) | a_n1, | ||
real (kind=8), dimension(a_ts%nnode) | a_apar, | ||
real (kind=8), dimension(a_ts%nnode) | a_phi, | ||
intent(out) | ierr | ||
) |
subroutine ts_init | ( | type(grid_type), intent(in) | a_grid, |
type(psn_type) | a_psn, | ||
type(boundary2_type), intent(in) | a_bc, | ||
type(xgc_ts) | a_ts, | ||
integer, intent(out) | ierr2 | ||
) |
subroutine ts_matrix_init | ( | type(xgc_ts) | a_ts, |
type(grid_type), intent(in) | grid, | ||
type(boundary2_type), intent(in) | bc, | ||
intent(out) | ierr | ||
) |
subroutine ts_solve | ( | type(xgc_ts) | a_ts, |
real (kind=8), intent(in) | a_dt, | ||
real (kind=8), dimension(a_ts%nnode) | n1, | ||
real (kind=8), dimension(a_ts%nnode) | apar, | ||
real (kind=8), dimension(a_ts%nnode) | phi, | ||
real (kind=8), dimension(a_ts%nnode) | Je, | ||
ierr | |||
) |