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

Functions/Subroutines

subroutine helm_matrix (Amat, alpha, beta, grid, bd, bcflag, xgc_petsc, xgc_petsc_bd, ierr)
 
subroutine diff_matrix (Amat, D, psi_hat, tri_center_r, grid, bd, bcflag, mass_flag, xgc_petsc, ierr)
 Sets up the matrix element of the RHS of Fick's law for diffusive transport: dF/dt = div(D_ij.grad(F) with the diffusion tensor D_ij = D(psi,theta) (psi_hat psi_hat), where D(psi,theta) is a scalar function of the radial and poloidal coordinate, and psi_hat=grad(psi)/|grad(psi)|. More...
 
subroutine diff_matrix_mdof (Amat, D, psi_hat, tri_center_r, grid, bd, bcflag, mass_flag, xgc_petsc, bs, idx, jdx, scale_vec, ierr)
 Same as diff_matrix, but inserts the diffusion matrix into a block matrix. Sets up the matrix element of the RHS of Fick's law for diffusive transport: dF/dt = div(D_ij.grad(F) with the diffusion tensor D_ij = D(psi,theta) (psi_hat psi_hat), where D(psi,theta) is a scalar function of the radial and poloidal coordinate, and psi_hat=grad(psi)/|grad(psi)|. More...
 
subroutine helm_matrix_mdof (Amat, alpha, beta, grid, bd, bcflag, xgc_petsc, xgc_petsc_bd, bs, idx, jdx, scale_vec, ierr)
 
subroutine fem_del2 (fu, uu, grid, bc)
 
subroutine fem_mass (fu, uu, grid, bc)
 
subroutine b_dot_grad_u (bdotgradu, b1, b2, uu, grid)
 
subroutine helm_matrix_private (Amat, alpha, beta, iemax, trind, npts, points, bd, bcflag, xgc_petsc, xgc_petsc_bd, bs, idx, jdx, scale_vec, ierr)
 
subroutine diff_matrix_private (Amat, D, psi_hat_in, tri_center_r, iemax, trind, npts, points, bd, bcflag, mass_flag, xgc_petsc, bs, idx, jdx, scale_vec, ierr)
 Private/abstracted part of the setup routine for the diffusion matrix Sets up the matrix element of the RHS of Fick's law for diffusive transport: dF/dt = div(D_ij.grad(F) with the diffusion tensor D_ij = D(psi,theta) (psi_hat psi_hat), where D(psi,theta) is a scalar function of the radial and poloidal coordinate, and psi_hat=grad(psi)/|grad(psi)|. More...
 
subroutine fem_op_private (fu, uu, iemax, trind, npts, points, bc, isw)
 
subroutine b_dot_grad_u_private (bdotgradu, b1, b2, uu, iemax, trind, npts, points)
 

Function/Subroutine Documentation

subroutine b_dot_grad_u ( real (kind=8), dimension(grid%nnode), intent(out)  bdotgradu,
real (kind=8), dimension(grid%nnode), intent(in)  b1,
real (kind=8), dimension(grid%nnode), intent(in)  b2,
real (kind=8), dimension(grid%nnode), intent(in)  uu,
type(grid_type), intent(in)  grid 
)

Here is the call graph for this function:

subroutine b_dot_grad_u_private ( real (kind=8), dimension(npts), intent(out)  bdotgradu,
real (kind=8), dimension(npts), intent(in)  b1,
real (kind=8), dimension(npts), intent(in)  b2,
real (kind=8), dimension(npts), intent(in)  uu,
integer, intent(in)  iemax,
integer, dimension(3,iemax), intent(in)  trind,
integer, intent(in)  npts,
real (kind=8), dimension(2,npts), intent(in)  points 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine diff_matrix (   Amat,
real (kind=8), dimension(grid%ntriangle), intent(in)  D,
real (kind=8), dimension(2,grid%ntriangle), intent(in)  psi_hat,
real (kind=8), dimension(grid%ntriangle), intent(in)  tri_center_r,
type(grid_type), intent(in)  grid,
type(boundary2_type), intent(in)  bd,
logical, intent(in)  bcflag,
integer, intent(in)  mass_flag,
dimension(grid%nnode), intent(in)  xgc_petsc,
intent(out)  ierr 
)

Sets up the matrix element of the RHS of Fick's law for diffusive transport: dF/dt = div(D_ij.grad(F) with the diffusion tensor D_ij = D(psi,theta) (psi_hat psi_hat), where D(psi,theta) is a scalar function of the radial and poloidal coordinate, and psi_hat=grad(psi)/|grad(psi)|.

Parameters
[out]AmatPETSc matrix to store the diffusion operator, (PETSc Mat)
[in]DDiffusion coefficient, real(8)
[in]psi_hatUnit vector in grad(psi) direction - grad(psi)/|grad(psi)|
[in]tri_center_rCenter radius of the triangles, real(8)
[in]gridGrid data, type(grid_type)
[in]bdSolver boundary, type(bc_type)
[in]bcflagWhether inhomogeneous boundary conditions are used, logical
[in]mass_flagWhether the mass matrix or diffusion matrix is computed (0|1), integer
[in]xgc_petscMapping between XGC grid and PETSc equation number
[out]ierrError flag, PETScErrorCode

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine diff_matrix_mdof (   Amat,
real (kind=8), dimension(grid%ntriangle), intent(in)  D,
real (kind=8), dimension(2,grid%ntriangle), intent(in)  psi_hat,
real (kind=8), dimension(grid%ntriangle), intent(in)  tri_center_r,
type(grid_type), intent(in)  grid,
type(boundary2_type), intent(in)  bd,
logical, intent(in)  bcflag,
integer, intent(in)  mass_flag,
dimension(grid%nnode), intent(in)  xgc_petsc,
intent(in)  bs,
intent(in)  idx,
intent(in)  jdx,
  scale_vec,
intent(out)  ierr 
)

Same as diff_matrix, but inserts the diffusion matrix into a block matrix. Sets up the matrix element of the RHS of Fick's law for diffusive transport: dF/dt = div(D_ij.grad(F) with the diffusion tensor D_ij = D(psi,theta) (psi_hat psi_hat), where D(psi,theta) is a scalar function of the radial and poloidal coordinate, and psi_hat=grad(psi)/|grad(psi)|.

Parameters
[out]AmatPETSc matrix to store the diffusion operator, (PETSc Mat)
[in]DDiffusion coefficient, real(8)
[in]psi_hatUnit vector in grad(psi) direction - grad(psi)/|grad(psi)|
[in]tri_center_rCenter radius of the triangles, real(8)
[in]gridGrid data, type(grid_type)
[in]bdSolver boundary, type(bc_type)
[in]bcflagWhether inhomogeneous boundary conditions are used, logical
[in]mass_flagWhether the mass matrix or diffusion matrix is computed (0|1), integer
[in]xgc_petscMapping between XGC grid and PETSc equation number
[in]bsBlock size of the big matrix, PetscInt
[in]idxRow number of the target block, PetscInt
[in]jdxColumn number of the target block, PetscInt
[in]scale_vecVector to scale the rows of the final diffusion matrix, PETSc Vec
[out]ierrError flag, PETScErrorCode

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine diff_matrix_private ( intent(inout)  Amat,
real (kind=8), dimension(iemax), intent(in)  D,
real (kind=8), dimension(2,iemax), intent(in)  psi_hat_in,
real (kind=8), dimension(iemax), intent(in)  tri_center_r,
integer, intent(in)  iemax,
integer, dimension(3,iemax), intent(in)  trind,
integer, intent(in)  npts,
real (kind=8), dimension(2,npts), intent(in)  points,
type(boundary2_type), intent(in)  bd,
logical, intent(in)  bcflag,
integer, intent(in)  mass_flag,
dimension(npts), intent(in)  xgc_petsc,
intent(in)  bs,
intent(in)  idx,
intent(in)  jdx,
  scale_vec,
intent(out)  ierr 
)

Private/abstracted part of the setup routine for the diffusion matrix Sets up the matrix element of the RHS of Fick's law for diffusive transport: dF/dt = div(D_ij.grad(F) with the diffusion tensor D_ij = D(psi,theta) (psi_hat psi_hat), where D(psi,theta) is a scalar function of the radial and poloidal coordinate, and psi_hat=grad(psi)/|grad(psi)|.

Parameters
[out]AmatPETSc matrix to store the diffusion operator, (PETSc Mat)
[in]DDiffusion coefficient, real(8)
[in]psi_hat_inUnit vector in grad(psi) direction - grad(psi)/|grad(psi)|
[in]tri_center_rCenter radius of the triangles, real(8)
[in]iemaxNumber of triangles
[in]trindIndices of the triangle vertices in points, integer
[in]nptsNumber of vertices, integer
[in]pointsR,Z coordinates of the vertices, real(8)
[in]bdSolver boundary, type(bc_type)
[in]bcflagWhether inhomogeneous boundary conditions are used, logical
[in]mass_flagWhether the mass matrix or diffusion matrix is computed (0|1), integer
[in]xgc_petscMapping between XGC grid and PETSc equation number
[in]bsBlock size of the big matrix, PetscInt
[in]idxRow number of the target block, PetscInt
[in]jdxColumn number of the target block, PetscInt
[in]scale_vecVector to scale the rows of the final diffusion matrix, PETSc Vec
[out]ierrError flag, PETScErrorCode

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine fem_del2 ( real (kind=8), dimension(grid%nnode), intent(out)  fu,
real (kind=8), dimension(grid%nnode), intent(in)  uu,
type(grid_type), intent(in)  grid,
type(boundary2_type), intent(in)  bc 
)

Here is the call graph for this function:

subroutine fem_mass ( real (kind=8), dimension(grid%nnode), intent(out)  fu,
real (kind=8), dimension(grid%nnode), intent(in)  uu,
type(grid_type), intent(in)  grid,
type(boundary2_type), intent(in)  bc 
)

Here is the call graph for this function:

subroutine fem_op_private ( real (kind=8), dimension(npts), intent(out)  fu,
real (kind=8), dimension(npts), intent(in)  uu,
integer, intent(in)  iemax,
integer, dimension(3,iemax), intent(in)  trind,
integer, intent(in)  npts,
real (kind=8), dimension(2,npts), intent(in)  points,
type(boundary2_type), intent(in)  bc,
integer, intent(in)  isw 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine helm_matrix (   Amat,
real (kind=8), dimension(grid%ntriangle), intent(in)  alpha,
real (kind=8), dimension(grid%ntriangle), intent(in)  beta,
type(grid_type), intent(in)  grid,
type(boundary2_type), intent(in)  bd,
logical, intent(in)  bcflag,
dimension(grid%nnode), intent(in)  xgc_petsc,
dimension(grid%nnode), intent(in)  xgc_petsc_bd,
intent(out)  ierr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine helm_matrix_mdof (   Amat,
real (kind=8), dimension(grid%ntriangle), intent(in)  alpha,
real (kind=8), dimension(grid%ntriangle), intent(in)  beta,
type(grid_type), intent(in)  grid,
type(boundary2_type), intent(in)  bd,
logical, intent(in)  bcflag,
dimension(grid%nnode), intent(in)  xgc_petsc,
dimension(grid%nnode), intent(in)  xgc_petsc_bd,
intent(in)  bs,
intent(in)  idx,
intent(in)  jdx,
  scale_vec,
intent(out)  ierr 
)

Here is the call graph for this function:

subroutine helm_matrix_private ( intent(inout)  Amat,
real (kind=8), dimension(iemax), intent(in)  alpha,
real (kind=8), dimension(iemax), intent(in)  beta,
integer, intent(in)  iemax,
integer, dimension(3,iemax), intent(in)  trind,
integer, intent(in)  npts,
real (kind=8), dimension(2,npts), intent(in)  points,
type(boundary2_type), intent(in)  bd,
logical, intent(in)  bcflag,
dimension(npts), intent(in)  xgc_petsc,
dimension(npts), intent(in)  xgc_petsc_bd,
intent(in)  bs,
intent(in)  idx,
intent(in)  jdx,
  scale_vec,
intent(out)  ierr 
)

Here is the call graph for this function:

Here is the caller graph for this function: