V3FIT
Data Types | Functions/Subroutines | Variables
magnetic_response Module Reference

Defines the base class of the type magnetic_response_class. More...

Data Types

type  magnetic_response_class
 Base class representing a magnetic signal response function. More...
 
interface  magnetic_response_construct
 Interface for the construction of magnetic_response_class types using magnetic_response_construct_new, & magnetic_response_construct_point or & magnetic_response_construct_netcdf. More...
 

Functions/Subroutines

type(magnetic_response_class) function, pointer magnetic_response_construct_new (name, date, coil_id, inductance, current_scale, num_t, num_t_shell, rmin, rmax, zmin, zmax, n_field_periods, stell_sym, a_r, a_f, a_z, a_s_r, a_s_f, a_s_z, svd_cut_off)
 Construct a magnetic_response_class object. More...
 
type(magnetic_response_class) function, pointer magnetic_response_construct_point (name, date, coil_id, position, direction, vacuum, current_scale)
 Construct a magnetic_response_class object. More...
 
type(magnetic_response_class) function, pointer magnetic_response_construct_netcdf (mdsig_iou, svd_cut_off)
 Construct a magnetic_response_class object. More...
 
subroutine magnetic_response_destruct (this)
 Deconstruct a magnetic_response_class object. More...
 
logical function magnetic_response_is_stell_sym (this)
 Checks if the stellarator symmetric flag is set. More...
 
logical function magnetic_response_use_plasma (this)
 Checks if the plasma flag is set. More...
 
logical function magnetic_response_use_shell (this)
 Checks if the conducting shell flag is set. More...
 
logical function magnetic_response_use_coil (this)
 Checks if the coil response flag is set. More...
 
subroutine magnetic_response_clr_use_coil (this)
 Clears the coil response bit. More...
 
logical function magnetic_response_is_point (this)
 Checks if the coil response flag is set. More...
 
subroutine magnetic_response_define (this, mdsig_iou)
 Defines the variables for the NETCDF file. More...
 
subroutine magnetic_response_write (this, mdsig_iou)
 Write variables to the NETCDF file. More...
 

Variables

character(len= *), parameter magnetic_response_current = 'MRC 2015-04-27'
 Version for the MDSIG files. This version adds the point diagnostics.
 
character(len= *), parameter magnetic_response_20140928 = 'MRC 2014-09-28'
 Version for the MDSIG files. This version adds the conducting shell. More...
 
integer, parameter magnetic_response_len = 80
 Length for strings.
 
integer, parameter magnetic_response_use_coil_flag = 1
 Bit position for the use coil response flag.
 
integer, parameter magnetic_response_use_plasma_flag = 2
 Bit position for the force coil response flag.
 
integer, parameter magnetic_response_stell_sym_flag = 3
 Bit position for the stellerator symmetry flag.
 
integer, parameter magnetic_response_use_shell_flag = 4
 Bit position for the use conducting shell flag.
 
integer, parameter magnetic_response_is_point_flag = 5
 Bit position for the use conducting shell flag.
 
character(len= *), parameter nc_flags = 'mddc_mrf_flags'
 NETCDF configureation flags.
 
character(len= *), parameter nc_name = 'mddc_mrf_code_name'
 NETCDF code name variable.
 
character(len= *), parameter nc_version = 'mddc_mrf_code_version'
 NETCDF version variable.
 
character(len= *), parameter nc_date = 'mddc_mrf_date_run'
 NETCDF date run variable.
 
character(len= *), parameter nc_coil_id = 'mddc_mrf_field_coils_id'
 NETCDF coil identifier variable.
 
character(len= *), parameter nc_n_field_cg = 'mddc_mrf_n_field_cg'
 NETCDF number of field coils variable.
 
character(len= *), parameter nc_inductance = 'mddc_mrf_rdiag_coilg_1'
 NETCDF mutual inductance variable.
 
character(len= *), parameter nc_current_scale = 'mddc_mrf_extcur_mg'
 NETCDF current scale variable.
 
character(len= *), parameter nc_num_t = 'mddc_mrf_kp'
 NETCDF number torodial planes variable.
 
character(len= *), parameter nc_num_r = 'mddc_mrf_ir'
 NETCDF number radial grid points variable.
 
character(len= *), parameter nc_num_z = 'mddc_mrf_jz'
 NETCDF number vertical grid points variable.
 
character(len= *), parameter nc_rmin = 'mddc_mrf_rmin'
 NETCDF minimum radial grid variable.
 
character(len= *), parameter nc_rmax = 'mddc_mrf_rmax'
 NETCDF maximum radial grid variable.
 
character(len= *), parameter nc_zmin = 'mddc_mrf_zmin'
 NETCDF minimum vertical grid variable.
 
character(len= *), parameter nc_zmax = 'mddc_mrf_zmax'
 NETCDF maximum vertical grid variable.
 
character(len= *), parameter nc_n_field_periods = 'mddc_mrf_n_field_periods'
 NETCDF number of field periods variable.
 
character(len= *), parameter nc_stell_sym = 'mddc_mrf_lstell_sym'
 NETCDF stell symmetric variable. More...
 
character(len= *), parameter nc_a_r = 'mddc_mrf_a_r'
 NETCDF radial response grid variable.
 
character(len= *), parameter nc_a_f = 'mddc_mrf_a_f'
 NETCDF toroidal response grid variable.
 
character(len= *), parameter nc_a_z = 'mddc_mrf_a_z'
 NETCDF vertical response grid variable.
 
character(len= *), parameter nc_use_shell = 'mddc_mrf_use_con_shell'
 NETCDF use conducting shell variable. More...
 
character(len= *), parameter nc_num_t_shell = 'mddc_mrf_kp_shell'
 NETCDF number torodial shell grid points variable.
 
character(len= *), parameter nc_a_s_r = 'mddc_mrf_a_s_r'
 NETCDF radial response shell grid variable.
 
character(len= *), parameter nc_a_s_f = 'mddc_mrf_a_s_f'
 NETCDF toroidal response shell grid variable.
 
character(len= *), parameter nc_a_s_z = 'mddc_mrf_a_s_z'
 NETCDF vertical response shell grid variable.
 
character(len= *), parameter nc_position = 'mddc_mrf_position'
 NETCDF use conducting shell variable.
 
character(len= *), parameter nc_direction = 'mddc_mrf_direction'
 NETCDF number torodial shell grid points variable.
 

Detailed Description

Defines the base class of the type magnetic_response_class.

Function/Subroutine Documentation

◆ magnetic_response_clr_use_coil()

subroutine magnetic_response::magnetic_response_clr_use_coil ( type (magnetic_response_class), intent(inout)  this)

Clears the coil response bit.

This is a convenience method so that outside callers do not need to clear bits directly.

Parameters
[in]thisA magnetic_response_class instance.
Returns
True if the flag is set.

Definition at line 893 of file magnetic_response.f.

◆ magnetic_response_construct_netcdf()

type (magnetic_response_class) function, pointer magnetic_response::magnetic_response_construct_netcdf ( integer, intent(in)  mdsig_iou,
real (rprec), intent(in)  svd_cut_off 
)

Construct a magnetic_response_class object.

Allocates memory and initializes a magnetic_response_class object from a mdsig file.

Parameters
[in]mdsig_iouAn instance of a the netcdf id of the open mdsig file.
[in]svd_cut_offCutoff on singular values for data compression.
Returns
A pointer to a constructed magnetic_response_class object.

Definition at line 489 of file magnetic_response.f.

◆ magnetic_response_construct_new()

type (magnetic_response_class) function, pointer magnetic_response::magnetic_response_construct_new ( character (len=*), intent(in)  name,
character (len=*), intent(in)  date,
character (len=*), intent(in)  coil_id,
real (rprec), dimension(:), pointer  inductance,
real (rprec), dimension(:), pointer  current_scale,
integer, intent(in)  num_t,
integer, intent(in)  num_t_shell,
real (rprec), intent(in)  rmin,
real (rprec), intent(in)  rmax,
real (rprec), intent(in)  zmin,
real (rprec), intent(in)  zmax,
integer, intent(in)  n_field_periods,
logical, intent(in)  stell_sym,
real (rprec), dimension(:,:,:), pointer  a_r,
real (rprec), dimension(:,:,:), pointer  a_f,
real (rprec), dimension(:,:,:), pointer  a_z,
real (rprec), dimension(:,:), pointer  a_s_r,
real (rprec), dimension(:,:), pointer  a_s_f,
real (rprec), dimension(:,:), pointer  a_s_z,
real (rprec), intent(in)  svd_cut_off 
)

Construct a magnetic_response_class object.

Allocates memory and initializes a magnetic_response_class object.

Parameters
[in]nameName of the code which computed the responses.
[in]dateData and time the code was run.
[in]coil_idIdenifier of field-coils.
[in]inductanceArray of diagnostic field-coil-group responses.
[in]current_scaleArray of external current scales.
[in]num_tNumber of phi planes per field period in plasma grid.
[in]num_t_shellNumber of phi planes per field period in the conducting shell grid.
[in]rminMinimum R for plasma grid.
[in]rmaxMaximum R for plasma grid.
[in]zminMinimum z for plasma grid.
[in]zmaxMaximum z for plasma grid.
[in]n_field_periodsNumber of field periods.
[in]stell_symUse stellarator symmetry.
[in]a_rR component of plasma response function.
[in]a_fPhi component of plasma response function.
[in]a_zZ component of plasma response function.
[in]a_s_rR component of the conducting shell response function.
[in]a_s_fPhi component of the conducting shell response function.
[in]a_s_zZ component of the conducting shell response function.
[in]svd_cut_offCutoff on singular values for data compression.
Returns
A pointer to a constructed magnetic_response_class object.

Definition at line 267 of file magnetic_response.f.

◆ magnetic_response_construct_point()

type (magnetic_response_class) function, pointer magnetic_response::magnetic_response_construct_point ( character (len=*), intent(in)  name,
character (len=*), intent(in)  date,
character (len=*), intent(in)  coil_id,
real (rprec), dimension(3)  position,
real (rprec), dimension(3)  direction,
real (rprec), dimension(:), pointer  vacuum,
real (rprec), dimension(:), pointer  current_scale 
)

Construct a magnetic_response_class object.

Allocates memory and initializes a magnetic_response_class object.

Parameters
[in]nameName of the code which computed the responses.
[in]dateData and time the code was run.
[in]coil_idIdenifier of field-coils.
[in]positionPosition of the point measurement.
[in]directionDirection of the point measurement.
[in]vacuumArray of diagnostic vacuum responses.
[in]current_scaleArray of external current scales.
Returns
A pointer to a constructed magnetic_response_class object.

Definition at line 413 of file magnetic_response.f.

◆ magnetic_response_define()

subroutine magnetic_response::magnetic_response_define ( type (magnetic_response_class), intent(in)  this,
integer, intent(in)  mdsig_iou 
)

Defines the variables for the NETCDF file.

Write out the magnetic response to an mdsig file.

Parameters
[in]thisA magnetic_response_class instance.
[in]mdsig_iouAn instance of a the netcdf id of the open mdsig file.

Definition at line 955 of file magnetic_response.f.

◆ magnetic_response_destruct()

subroutine magnetic_response::magnetic_response_destruct ( type (magnetic_response_class), pointer  this)

Deconstruct a magnetic_response_class object.

Deallocates memory and uninitializes a magnetic_response_class object.

Parameters
[in,out]thisA magnetic_response_class instance.

Definition at line 695 of file magnetic_response.f.

◆ magnetic_response_is_point()

logical function magnetic_response::magnetic_response_is_point ( type (magnetic_response_class), intent(in)  this)

Checks if the coil response flag is set.

This is a convenience method so that outside callers do not need to test bits directly.

Parameters
[in]thisA magnetic_response_class instance.
Returns
True if the flag is set.

Definition at line 922 of file magnetic_response.f.

◆ magnetic_response_is_stell_sym()

logical function magnetic_response::magnetic_response_is_stell_sym ( type (magnetic_response_class), intent(in)  this)

Checks if the stellarator symmetric flag is set.

This is a convenience method so that outside callers do not need to test bits directly.

Parameters
[in]thisA magnetic_response_class instance.
Returns
True if the flag is set.

Definition at line 769 of file magnetic_response.f.

◆ magnetic_response_use_coil()

logical function magnetic_response::magnetic_response_use_coil ( type (magnetic_response_class), intent(in)  this)

Checks if the coil response flag is set.

This is a convenience method so that outside callers do not need to test bits directly.

Parameters
[in]thisA magnetic_response_class instance.
Returns
True if the flag is set.

Definition at line 862 of file magnetic_response.f.

◆ magnetic_response_use_plasma()

logical function magnetic_response::magnetic_response_use_plasma ( type (magnetic_response_class), intent(in)  this)

Checks if the plasma flag is set.

This is a convenience method so that outside callers do not need to test bits directly.

Parameters
[in]thisA magnetic_response_class instance.
Returns
True if the flag is set.

Definition at line 800 of file magnetic_response.f.

◆ magnetic_response_use_shell()

logical function magnetic_response::magnetic_response_use_shell ( type (magnetic_response_class), intent(in)  this)

Checks if the conducting shell flag is set.

This is a convenience method so that outside callers do not need to test bits directly.

Parameters
[in]thisA magnetic_response_class instance.
Returns
True if the flag is set.

Definition at line 831 of file magnetic_response.f.

◆ magnetic_response_write()

subroutine magnetic_response::magnetic_response_write ( type (magnetic_response_class), intent(in)  this,
integer, intent(in)  mdsig_iou 
)

Write variables to the NETCDF file.

Write out the magnetic response to an mdsig file.

Parameters
[in]thisA magnetic_response_class instance.
[in]mdsig_iouAn instance of a the netcdf id of the open mdsig file.

Definition at line 1050 of file magnetic_response.f.

Variable Documentation

◆ magnetic_response_20140928

character (len=*), parameter magnetic_response::magnetic_response_20140928 = 'MRC 2014-09-28'

Version for the MDSIG files. This version adds the conducting shell.

Deprecated:

Definition at line 33 of file magnetic_response.f.

◆ nc_stell_sym

character (len=*), parameter magnetic_response::nc_stell_sym = 'mddc_mrf_lstell_sym'

NETCDF stell symmetric variable.

Deprecated:

Definition at line 98 of file magnetic_response.f.

◆ nc_use_shell

character (len=*), parameter magnetic_response::nc_use_shell = 'mddc_mrf_use_con_shell'

NETCDF use conducting shell variable.

Deprecated:

Definition at line 111 of file magnetic_response.f.