psipar_penalisation Subroutine

public subroutine psipar_penalisation(comm_handler, equi, mesh_stag, hsolver_stag, map, penalisation_stag, jpar_t_extrapolate, nevar_adv_stag, apar_pen, psipar_pen_vals, sinfo, res)

Sets the penalisation values for the modified electromagnetic potential. Currently, the only option is to set a dirichelet-zero value, which penalised jpar and apar to zero at the boundary

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 (staggered)

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

Elliptic (2D) solver on staggered mesh

type(parallel_map_t), intent(in) :: map

Parallel map

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

Penalisation (staggered)

type(variable_t), intent(in) :: jpar_t_extrapolate

Guess for parallel current at timestep t+1 (e.g. extrapolated)

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

Density at timestep t+1 on staggered grid

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

Penalisation values for the parallel electromagnetic potential Attention: dimension is n_points here for solver On input: initial guess

real(kind=GP), intent(out), dimension(mesh_stag%get_n_points_inner()) :: psipar_pen_vals

Penalisation values for the modified electromagnetic potential

integer, intent(out) :: sinfo

Info from solver

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

Residual of penalisation solve


Contents