Stellarator-Tools
primed_grid Module Reference

Defines the base class of the type primed_grid_class. This contains the state variables to define the currents and positions of the volumn integral. More...

Data Types

interface  primed_grid_class
 Base class representing a primed grid. This is grid the volume integral will be summed over. More...
 

Functions/Subroutines

type(primed_grid_class) function, pointer primed_grid_construct_no_vac (num_v, flags, vmec, siesta_file_name, parallel, io_unit)
 Construct a primed_grid_class object. More...
 
type(primed_grid_class) function, pointer primed_grid_construct (num_v, flags, vmec, vmec_vac_file, siesta_file_name, parallel, io_unit)
 Construct a primed_grid_class object. More...
 
class(primed_grid_class) function, pointer primed_grid_construct_both (num_v, vmec, parallel)
 Construct a primed_grid_class object. More...
 
class(primed_grid_class) function, pointer primed_grid_construct_ju (num_v, vmec, parallel)
 Construct a primed_grid_class object. More...
 
class(primed_grid_class) function, pointer primed_grid_construct_jv (num_v, vmec, parallel)
 Construct a primed_grid_class object. More...
 
class(primed_grid_class) function, pointer primed_grid_construct_siesta (num_v, vmec, siesta_file_name, parallel)
 Construct a primed_grid_class object. More...
 
subroutine primed_grid_destruct (this)
 Deconstruct a primed_grid_class object. More...
 

Detailed Description

Defines the base class of the type primed_grid_class. This contains the state variables to define the currents and positions of the volumn integral.

Function/Subroutine Documentation

◆ primed_grid_construct()

type (primed_grid_class) function, pointer primed_grid::primed_grid_construct ( integer, intent(in)  num_v,
integer, intent(in)  flags,
class (vmec_file_class), intent(in), pointer  vmec,
character (len=*), intent(in)  vmec_vac_file,
character (len=*), intent(in)  siesta_file_name,
type (bmw_parallel_context_class), intent(in)  parallel,
integer, intent(in)  io_unit 
)

Construct a primed_grid_class object.

Allocates memory and initializes a primed_grid_class object depending on the option flags.

Parameters
[in]num_vNumber of toroidal grid points.
[in]flagsNumber of toroidal grid points.
[in]vmecVMEC file object.
[in]vmec_vac_fileName of the zero beta vmec file.
[in]siesta_file_nameName of the siesta restart file.
[in]parallelbmw_parallel_context_class object instance.
[in]io_unitUnit number to write messages to.
Returns
A pointer to a constructed primed_grid_class object.

◆ primed_grid_construct_both()

class (primed_grid_class) function, pointer primed_grid::primed_grid_construct_both ( integer, intent(in)  num_v,
class (vmec_file_class), intent(in), pointer  vmec,
class (bmw_parallel_context_class), intent(in)  parallel 
)

Construct a primed_grid_class object.

Allocates memory and initializes a primed_grid_class object. This computes the currents and positions on the primed grid. Plasma currents are obtained from Curl(B).

Parameters
[in]num_vNumber of toroidal grid points.
[in]vmecVMEC file object.
[in]parallelbmw_parallel_context_class object instance.
Returns
A pointer to a constructed primed_grid_class object.

◆ primed_grid_construct_ju()

class (primed_grid_class) function, pointer primed_grid::primed_grid_construct_ju ( integer, intent(in)  num_v,
class (vmec_file_class), intent(in), pointer  vmec,
class (bmw_parallel_context_class), intent(in)  parallel 
)

Construct a primed_grid_class object.

Allocates memory and initializes a primed_grid_class object with an This computes the currents and positions on the primed grid. J^u plasma current is obtained from force balance.

J^u = (p' + J^v*B^u)/B^v

Parameters
[in]num_vNumber of toroidal grid points.
[in]vmecVMEC file object.
[in]parallelbmw_parallel_context_class object instance.
Returns
A pointer to a constructed primed_grid_class object.

◆ primed_grid_construct_jv()

class (primed_grid_class) function, pointer primed_grid::primed_grid_construct_jv ( integer, intent(in)  num_v,
class (vmec_file_class), intent(in), pointer  vmec,
class (bmw_parallel_context_class), intent(in)  parallel 
)

Construct a primed_grid_class object.

Allocates memory and initializes a primed_grid_class object with an This computes the currents and positions on the primed grid. J^v plasma current is obtained from force balance.

J^v = (J^u*B^v - p')/B^u

Parameters
[in]num_vNumber of toroidal grid points.
[in]vmecVMEC file object.
[in]parallelbmw_parallel_context_class object instance.
Returns
A pointer to a constructed primed_grid_class object.

◆ primed_grid_construct_no_vac()

type (primed_grid_class) function, pointer primed_grid::primed_grid_construct_no_vac ( integer, intent(in)  num_v,
integer, intent(in)  flags,
class (vmec_file_class), intent(in), pointer  vmec,
character (len=*), intent(in)  siesta_file_name,
type (bmw_parallel_context_class), intent(in)  parallel,
integer, intent(in)  io_unit 
)

Construct a primed_grid_class object.

Allocates memory and initializes a primed_grid_class object depending on the option flags.

Parameters
[in]num_vNumber of toroidal grid points.
[in]flagsNumber of toroidal grid points.
[in]vmecVMEC file object.
[in]siesta_file_nameName of the siesta restart file.
[in]parallelbmw_parallel_context_class object instance.
[in]io_unitUnit number to write messages to.
Returns
A pointer to a constructed primed_grid_class object.

◆ primed_grid_construct_siesta()

class (primed_grid_class) function, pointer primed_grid::primed_grid_construct_siesta ( integer, intent(in)  num_v,
class (vmec_file_class), intent(in), pointer  vmec,
character (len=*)  siesta_file_name,
class (bmw_parallel_context_class), intent(in)  parallel 
)

Construct a primed_grid_class object.

Allocates memory and initializes a primed_grid_class object with an This computes the currents and positions on the primed grid. Plasma currents are obtained from Curl(B) of the siesta solution.

Parameters
[in]num_vNumber of toroidal grid points.
[in]vmecVMEC file object.
[in]siesta_file_nameName of the siesta restart file.
[in]parallelbmw_parallel_context_class object instance.
Returns
A pointer to a constructed primed_grid_class object.

◆ primed_grid_destruct()

subroutine primed_grid::primed_grid_destruct ( type (primed_grid_class), intent(inout)  this)

Deconstruct a primed_grid_class object.

Deallocates memory and uninitializes a primed_grid_class object.

Parameters
[in,out]thisA primed_grid_class instance.