apar_solve Subroutine

public subroutine apar_solve(comm_handler, equi, mesh_stag, hsolver_stag, boundaries, psiparv, aparv, sinfo, res, co_inert, co_te, penalisation_stag, tstep_ohm)

Solves for parallel electromagnetic potential if co_inert presents, \f[ \beta A_\parallel -\frac{mu}{n}\nabla_\perp^2A_\parallel= \psi_\parallel \f] otherwise, \f[ -\nabla_\perp^2A_\parallel= \psi_\parallel \f]

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), intent(in) :: comm_handler

Communicators

class(equilibrium_t), intent(in) :: equi

Equilibrium

type(mesh_cart_t), intent(in) :: mesh_stag

Mesh within poloidal plane

class(helmholtz_solver_t), intent(inout) :: hsolver_stag

Elliptic (2D) solver on staggered mesh

type(boundaries_braginskii_t), intent(inout) :: boundaries

Boundary information for the BRAGINSKII model

real(kind=GP), intent(in), dimension(mesh_stag%get_n_points()) :: psiparv

Values for generalised electromagnetic potential

real(kind=GP), intent(inout), dimension(mesh_stag%get_n_points()) :: aparv

Values for parallel electromagnetic potential, on input initial guess

integer, intent(out) :: sinfo

Info from solver

real(kind=GP), intent(out) :: res

Residual of solution

real(kind=GP), intent(in), optional, dimension(mesh_stag%get_n_points()) :: co_inert

Coefficient in inertial term (= Values of density at time t+1 on staggered grid)

real(kind=GP), intent(in), optional, dimension(mesh_stag%get_n_points()) :: co_te

Coefficient in implicit resistivity (= Values of electron temperature at time t+1 on staggered grid)

type(penalisation_t), intent(in), optional :: penalisation_stag

Penalisation (staggered)

type(karniadakis_t), intent(inout), optional :: tstep_ohm

Time-step integrator for Ohm's law


Contents