Defines the base class of the type bmw_context_class. This contains the state variables needed by BMW.
More...
|
interface | bmw_context_class |
| Base class representing a bmw context. This contains all memory needed to operate bmw. More...
|
|
|
class(bmw_context_class) function, pointer | bmw_context_construct (mgrid_file_name, wout_file_name, siesta_file_name, flags, num_p, parallel, io_unit) |
| Construct a bmw_context_class object. More...
|
|
class(bmw_context_class) function, pointer | bmw_context_construct_plasma (wout_file_name, siesta_file_name, flags, num_r, num_p, num_z, rmax, rmin, zmax, zmin, parallel, io_unit) |
| Construct a bmw_context_class object. More...
|
|
subroutine | bmw_context_destruct (this) |
| Deconstruct a bmw_context_class object. More...
|
|
subroutine | bmw_context_set_up_grid_m (this, p_start, p_end, parallel, io_unit) |
| Set the unprimed grid. More...
|
|
subroutine | bmw_context_set_up_grid_a (this, r_grid, z_grid, dphi, parallel, io_unit) |
| Set the unprimed grid. More...
|
|
subroutine | bmw_context_set_up_grid_c (this, vmec_vac_file, num_v, flags, p_start, p_end, parallel, io_unit) |
| Set the unprimed grid. More...
|
|
subroutine | bmw_context_write (this, result_file_name, parallel) |
| Write NetCDF based result file. More...
|
|
|
integer, parameter | series = 3 |
| Version number.
|
|
Defines the base class of the type bmw_context_class. This contains the state variables needed by BMW.
◆ bmw_context_construct()
class (bmw_context_class) function, pointer bmw_context::bmw_context_construct |
( |
character (len=*), intent(in) |
mgrid_file_name, |
|
|
character (len=*), intent(in) |
wout_file_name, |
|
|
character (len=*), intent(in) |
siesta_file_name, |
|
|
integer, intent(in) |
flags, |
|
|
integer, intent(inout) |
num_p, |
|
|
class (bmw_parallel_context_class), intent(in) |
parallel, |
|
|
integer, intent(in) |
io_unit |
|
) |
| |
Construct a bmw_context_class object.
Allocates memory and initializes a bmw_context_class object.
- Parameters
-
[in] | mgrid_file_name | Path and name of the mgrid file. |
[in] | wout_file_name | Path and name of the wout file. |
[in] | siesta_file_name | Path and name of the siesta file. |
[in] | flags | Option flags. |
[in] | num_p | Number of phi planes per field period. |
[in] | parallel | bmw_parallel_context_class object instance. |
[in] | io_unit | Unit number to write messages to. |
- Returns
- A pointer to a constructed bmw_context_class object.
◆ bmw_context_construct_plasma()
class (bmw_context_class) function, pointer bmw_context::bmw_context_construct_plasma |
( |
character (len=*), intent(in) |
wout_file_name, |
|
|
character (len=*), intent(in) |
siesta_file_name, |
|
|
integer, intent(in) |
flags, |
|
|
integer, intent(in) |
num_r, |
|
|
integer, intent(in) |
num_p, |
|
|
integer, intent(in) |
num_z, |
|
|
real (rprec), intent(in) |
rmax, |
|
|
real (rprec), intent(in) |
rmin, |
|
|
real (rprec), intent(in) |
zmax, |
|
|
real (rprec), intent(in) |
zmin, |
|
|
class (bmw_parallel_context_class), intent(in) |
parallel, |
|
|
integer, intent(in) |
io_unit |
|
) |
| |
Construct a bmw_context_class object.
Allocates memory and initializes a bmw_context_class object.
- Parameters
-
[in] | mgrid_file_name | Path and name of the mgrid file. |
[in] | wout_file_name | Path and name of the wout file. |
[in] | siesta_file_name | Path and name of the siesta file. |
[in] | flags | Option flags. |
[in] | num_r | Number of radial points. |
[in] | num_p | Number of toroidal points. |
[in] | num_z | Number of vertical points. |
[in] | rmax | Maximum radial position. |
[in] | rmin | Minimum radial position. |
[in] | zmax | Maximum vertical position. |
[in] | zmin | Minimum vertical position. |
[in] | parallel | bmw_parallel_context_class object instance. |
[in] | io_unit | Unit number to write messages to. |
- Returns
- A pointer to a constructed bmw_context_class object.
◆ bmw_context_destruct()
subroutine bmw_context::bmw_context_destruct |
( |
type (bmw_context_class), intent(inout) |
this | ) |
|
◆ bmw_context_set_up_grid_a()
subroutine bmw_context::bmw_context_set_up_grid_a |
( |
class (bmw_context_class), intent(inout) |
this, |
|
|
real (rprec), dimension(:,:,:), intent(in) |
r_grid, |
|
|
real (rprec), dimension(:,:,:), intent(in) |
z_grid, |
|
|
real (rprec), intent(in) |
dphi, |
|
|
class (bmw_parallel_context_class), intent(in) |
parallel, |
|
|
integer, intent(in) |
io_unit |
|
) |
| |
Set the unprimed grid.
This initializes the unprimed file using supplied grid as the unprimed grid.
- Parameters
-
[in,out] | this | A bmw_context_class instance. |
[in] | r_grid | 3D Array of r positions. |
[in] | z_grid | 3D Array of z positions. |
[in] | dphi | Phi grid spacing. |
[in] | parallel | bmw_parallel_context_class object instance. |
[in] | io_unit | Unit number to write messages to. |
- Returns
- A pointer to a constructed bmw_context_class object.
◆ bmw_context_set_up_grid_c()
subroutine bmw_context::bmw_context_set_up_grid_c |
( |
class (bmw_context_class), intent(inout) |
this, |
|
|
character (len=*), intent(in) |
vmec_vac_file, |
|
|
integer, intent(in) |
num_v, |
|
|
integer, intent(in) |
flags, |
|
|
integer, intent(in) |
p_start, |
|
|
integer, intent(in) |
p_end, |
|
|
class (bmw_parallel_context_class), intent(in) |
parallel, |
|
|
integer, intent(in) |
io_unit |
|
) |
| |
Set the unprimed grid.
This initializes the unprimed file using supplied grid as the unprimed grid. This run the vacuum corrected unprimed grid.
- Parameters
-
[in,out] | this | A bmw_context_class instance. |
[in] | vmec_vac_file | Name of the zero beta vmec file. |
[in] | num_v | Number of toroidal grid points. |
[in] | flags | Number of toroidal grid points. |
[in] | r_grid | 3D Array of r positions. |
[in] | z_grid | 3D Array of z positions. |
[in] | dphi | Phi grid spacing. |
[in] | parallel | bmw_parallel_context_class object instance. |
[in] | io_unit | Unit number to write messages to. |
- Returns
- A pointer to a constructed bmw_context_class object.
◆ bmw_context_set_up_grid_m()
subroutine bmw_context::bmw_context_set_up_grid_m |
( |
class (bmw_context_class), intent(inout) |
this, |
|
|
integer, intent(in) |
p_start, |
|
|
integer, intent(in) |
p_end, |
|
|
class (bmw_parallel_context_class), intent(in) |
parallel, |
|
|
integer, intent(in) |
io_unit |
|
) |
| |
Set the unprimed grid.
This initializes the unprimed file using the mgrid grid as the unprimed grid.
- Parameters
-
[in,out] | this | A bmw_context_class instance. |
[in] | p_start | Starting phi index to compute fields to. |
[in] | p_end | Ending phi index to compute fields to. |
[in] | parallel | bmw_parallel_context_class object instance. |
[in] | io_unit | Unit number to write messages to. |
- Returns
- A pointer to a constructed bmw_context_class object.
◆ bmw_context_write()
Write NetCDF based result file.
Defines dimensions and variables for the BMW result file. Flat internal arrays need to be reshaped to the dimension.
- Parameters
-
[in] | this | A bmw_context_class instance. |
[in] | result_file_name | NetCDF file id of the result file. |
[in] | parallel | bmw_parallel_context_class object instance. |