SPEC 3.20
Stepped Pressure Equilibrium Code
dfp200.f90 File Reference

Given the field consistent with the constraints and the geometry, computes local quantites related to the force evaluation. More...

Functions/Subroutines

subroutine dfp200 (LcomputeDerivatives, vvol)
 Given the field consistent with the constraints and the geometry, computes local quantites related to the force evaluation. More...
 
subroutine get_lu_beltrami_matrices (vvol, oBI, NN)
 get LU Beltrami matrices More...
 
subroutine get_perturbed_solution (vvol, oBI, NN)
 This routine evaluates the value of the magnetic field once the interface is perturbed using matrix perturbation theory. More...
 
subroutine evaluate_dmupfdx (innout, idof, ii, issym, irz)
 Evaluate mu and psip derivatives and store them in dmupfdx. More...
 
subroutine evaluate_dbb (lvol, idof, innout, issym, irz, ii, dBB, XX, YY, length, dRR, dZZ, dII, dLL, dPP, Ntz, LcomputeDerivatives)
 Evaluate the derivative of the square of the magnetic field modulus. Add spectral constraint derivatives if required. More...
 
subroutine hessian_dffdrz (lvol, idof, innout, issym, irz, ii, dBB, XX, YY, length, dRR, dZZ, dII, dLL, dPP, Ntz)
 
subroutine hessian3d_dffdrz (lvol, idof, innout, issym, irz, ii, dBB, XX, YY, length, dRR, dZZ, dII, dLL, dPP, Ntz)
 

Detailed Description

Given the field consistent with the constraints and the geometry, computes local quantites related to the force evaluation.

Function/Subroutine Documentation

◆ dfp200()

subroutine dfp200 ( logical, intent(in)  LcomputeDerivatives,
integer  vvol 
)

Given the field consistent with the constraints and the geometry, computes local quantites related to the force evaluation.

Parameters
LcomputeDerivatives
vvol

References inputlist::adiabatic, allocate_beltrami_matrices(), allocate_geometry_matrices(), allglobal::ate, allglobal::ato, allglobal::aze, allglobal::azo, allglobal::bbweight, allglobal::bemn, allglobal::bomn, allglobal::btemn, allglobal::cfmn, allglobal::comn, allglobal::cosi, allglobal::cpus, allglobal::dbbdmp, allglobal::dbdx, deallocate_beltrami_matrices(), deallocate_geometry_matrices(), allglobal::denergydrr, allglobal::denergydzr, allglobal::dessian, allglobal::dffdrz, dfp200(), allglobal::diotadxup, allglobal::ditgpdxtp, allglobal::dma, allglobal::dmb, allglobal::dmd, allglobal::dmg, allglobal::dmupfdx, allglobal::dpflux, allglobal::drij, allglobal::drodr, allglobal::drodz, allglobal::dtflux, allglobal::dvolume, allglobal::dzij, allglobal::dzodr, allglobal::dzodz, allglobal::efmn, inputlist::epsilon, evaluate_dbb(), evaluate_dmupfdx(), allglobal::evmn, inputlist::gamma, get_lu_beltrami_matrices(), get_perturbed_solution(), allglobal::guvij, constants::half, allglobal::hessian, allglobal::iemn, inputlist::igeometry, allglobal::ijreal, allglobal::im, allglobal::in, intghs_workspace_destroy(), intghs_workspace_init(), allglobal::iomn, allglobal::iquad, allglobal::irbc, allglobal::irbs, allglobal::irij, allglobal::ismyvolume(), allglobal::ismyvolumevalue, allglobal::izbc, allglobal::izbs, allglobal::izij, inputlist::lcheck, inputlist::lconstraint, allglobal::lcoordinatesingularity, inputlist::lextrap, inputlist::lfindzero, lforce(), inputlist::lfreebound, allglobal::lgdof, allglobal::lhessian2dallocated, allglobal::lhessian3dallocated, allglobal::lhessianallocated, inputlist::lhmatrix, allglobal::lmns, allglobal::localconstraint, allglobal::lplasmaregion, inputlist::lrad, allglobal::lvacuumregion, allglobal::mmpp, allglobal::mn, allglobal::mne, allglobal::mns, allglobal::mpi_comm_spec, inputlist::mpol, inputlist::mu, allglobal::myid, allglobal::nadof, allglobal::ncpu, allglobal::notstellsym, allglobal::nt, inputlist::ntor, allglobal::ntz, inputlist::nvol, allglobal::nz, allglobal::odmn, allglobal::ofmn, constants::one, fileunits::ounit, packab(), inputlist::pscale, allglobal::psifactor, allglobal::rij, allglobal::semn, allglobal::sfmn, allglobal::sg, allglobal::simn, allglobal::sini, numerical::small, allglobal::solution, allglobal::somn, allglobal::sweight, inputlist::tflux, allglobal::trij, constants::two, allglobal::tzij, volume(), allglobal::vvolume, allglobal::whichcpuid(), inputlist::wmacros, allglobal::yesstellsym, constants::zero, and allglobal::zij.

Referenced by dforce(), dfp200(), evaluate_dbb(), evaluate_dmupfdx(), get_lu_beltrami_matrices(), and get_perturbed_solution().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_lu_beltrami_matrices()

subroutine get_lu_beltrami_matrices ( integer, intent(in)  vvol,
type(matrixlu), intent(inout)  oBI,
integer, intent(in)  NN 
)

get LU Beltrami matrices

Parameters
vvol
oBI
NN

References allglobal::cpus, allglobal::dbdx, dforce(), dfp200(), allglobal::dma, allglobal::dmb, allglobal::dmd, allglobal::dmg, constants::half, allglobal::iquad, inputlist::lconstraint, allglobal::lcoordinatesingularity, allglobal::lplasmaregion, inputlist::lrad, allglobal::lsavedguvij, allglobal::lvacuumregion, ma00aa(), matrix(), allglobal::mn, allglobal::mne, allglobal::mpi_comm_spec, inputlist::mu, allglobal::myid, allglobal::ncpu, allglobal::nt, allglobal::nz, constants::one, fileunits::ounit, allglobal::solution, constants::two, inputlist::wmacros, and constants::zero.

Referenced by dfp200().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_perturbed_solution()

subroutine get_perturbed_solution ( integer, intent(in)  vvol,
type(matrixlu), intent(inout)  oBI,
integer, intent(in)  NN 
)

This routine evaluates the value of the magnetic field once the interface is perturbed using matrix perturbation theory.

Parameters
vvol
oBI
NN

References allglobal::cpus, allglobal::dbdx, dfp200(), allglobal::dma, allglobal::dmb, allglobal::dmd, allglobal::dmg, allglobal::dpflux, allglobal::dtflux, constants::half, intghs(), allglobal::iquad, inputlist::lconstraint, inputlist::lrad, allglobal::mn, allglobal::mpi_comm_spec, mtrxhs(), inputlist::mu, allglobal::myid, allglobal::nadof, allglobal::ncpu, constants::one, fileunits::ounit, packab(), allglobal::solution, constants::two, inputlist::wmacros, and constants::zero.

Referenced by dfp200().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluate_dmupfdx()

subroutine evaluate_dmupfdx ( integer  innout,
integer  idof,
integer  ii,
integer  issym,
integer  irz 
)

Evaluate mu and psip derivatives and store them in dmupfdx.

Parameters
innout
idof
ii
issym
irz

References allocate_beltrami_matrices(), allocate_geometry_matrices(), allglobal::ate, allglobal::ato, allglobal::aze, allglobal::azo, allglobal::btemn, allglobal::cpus, curent(), allglobal::dbdx, deallocate_beltrami_matrices(), deallocate_geometry_matrices(), dfp100(), dfp200(), allglobal::diotadxup, allglobal::ditgpdxtp, allglobal::dma, allglobal::dmb, allglobal::dmd, allglobal::dmg, allglobal::dmupfdx, allglobal::dpflux, inputlist::drz, allglobal::dtflux, allglobal::dvolume, constants::half, inputlist::igeometry, allglobal::im, allglobal::in, intghs_workspace_destroy(), intghs_workspace_init(), allglobal::ipdtdpf, allglobal::iquad, allglobal::irbc, allglobal::irbs, allglobal::ismyvolume(), allglobal::ismyvolumevalue, allglobal::izbc, allglobal::izbs, inputlist::lcheck, inputlist::lconstraint, allglobal::lcoordinatesingularity, inputlist::lfreebound, allglobal::lmns, allglobal::localconstraint, allglobal::lplasmaregion, inputlist::lrad, allglobal::lvacuumregion, allglobal::mn, allglobal::mne, allglobal::mns, allglobal::mpi_comm_spec, inputlist::mu, inputlist::mupftol, allglobal::myid, allglobal::nadof, allglobal::ncpu, allglobal::ngdof, allglobal::nt, inputlist::nvol, allglobal::nz, constants::one, fileunits::ounit, allglobal::psifactor, allglobal::rij, numerical::small, allglobal::sweight, tr00ab(), constants::two, volume(), allglobal::vvolume, inputlist::wmacros, allglobal::xoffset, constants::zero, and allglobal::zij.

Referenced by dfp200().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluate_dbb()

subroutine evaluate_dbb ( integer  lvol,
integer  idof,
integer  innout,
integer  issym,
integer  irz,
integer  ii,
real, dimension(1:ntz,-1:2)  dBB,
real, dimension(1:ntz)  XX,
real, dimension(1:ntz)  YY,
real, dimension(1:ntz)  length,
real, dimension(1:ntz,-1:2)  dRR,
real, dimension(1:ntz,-1:2)  dZZ,
real, dimension(1:ntz)  dII,
real, dimension(1:ntz)  dLL,
real, dimension(1:ntz)  dPP,
integer  Ntz,
logical, intent(in)  LcomputeDerivatives 
)

Evaluate the derivative of the square of the magnetic field modulus. Add spectral constraint derivatives if required.

Parameters
lvol
idof
innout
issym
irz
ii
dBB
XX
YY
length
dRR
dZZ
dII
dLL
dPP
Ntz
LcomputeDerivatives

References inputlist::adiabatic, allglobal::bbweight, allglobal::cfmn, allglobal::comn, allglobal::cosi, allglobal::cpus, allglobal::dbbdmp, allglobal::dbdx, allglobal::denergydrr, allglobal::denergydrz, allglobal::denergydzr, allglobal::denergydzz, allglobal::dffdrz, dfp200(), allglobal::dpflux, allglobal::drij, allglobal::drodr, allglobal::drodz, inputlist::drz, allglobal::dvolume, allglobal::dzij, allglobal::dzodr, allglobal::dzodz, allglobal::efmn, inputlist::epsilon, allglobal::evmn, inputlist::gamma, allglobal::guvij, constants::half, allglobal::hdffdrz, inputlist::igeometry, allglobal::ijreal, allglobal::im, allglobal::in, allglobal::iquad, allglobal::irbc, allglobal::irbs, allglobal::irij, allglobal::izbc, allglobal::izbs, allglobal::izij, inputlist::lcheck, inputlist::lconstraint, allglobal::lcoordinatesingularity, lforce(), allglobal::lgdof, allglobal::lhessian3dallocated, allglobal::localconstraint, allglobal::lplasmaregion, inputlist::lrad, allglobal::lvacuumregion, allglobal::mmpp, allglobal::mn, allglobal::mns, allglobal::mpi_comm_spec, allglobal::myid, allglobal::nadof, allglobal::ncpu, allglobal::ngdof, allglobal::notstellsym, allglobal::nt, inputlist::ntor, inputlist::nvol, allglobal::nz, allglobal::odmn, allglobal::ofmn, constants::one, fileunits::ounit, inputlist::pscale, allglobal::psifactor, allglobal::rij, allglobal::sfmn, allglobal::sg, allglobal::simn, allglobal::sini, numerical::small, allglobal::sweight, allglobal::trij, constants::two, allglobal::tzij, allglobal::vvolume, inputlist::wmacros, allglobal::xoffset, allglobal::yesstellsym, constants::zero, and allglobal::zij.

Referenced by dfp200().

Here is the call graph for this function:
Here is the caller graph for this function: