Penalisation
Wrapper function for zero-finding routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(func_1d_charfun_t), | intent(in) | :: | this |
Instance of test function class |
||
| real(kind=GP), | intent(in) | :: | t | |||
| integer, | intent(in), | dimension(:) | :: | iuser |
Integer inputs, (1) sets hermite_order |
|
| real(kind=GP), | intent(in), | dimension(:) | :: | ruser |
Float inputs, (1) sets charfun_at_target (2) sets charfun_parwidth |
Sets parameters for penalisation, either via namelist from file, or setting explicitly
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in) | :: | dphi |
Toroidal grid distance |
||
| character(len=*), | intent(in), | optional | :: | filename |
Filename where parameter are read from |
|
| integer, | intent(in), | optional | :: | pen_method_in |
Method of penalisation |
|
| integer, | intent(in), | optional | :: | penfuns_type_in |
Type of penalisation function |
|
| integer, | intent(in), | optional | :: | hermite_order_in |
Order of Hermite polynomial used as penalisation function |
|
| real(kind=GP), | intent(in), | optional | :: | charfun_parwidth_in |
Parallel decay length of characteristic penalisation function |
|
| real(kind=GP), | intent(in), | optional | :: | charfun_radlimwidth_in |
Radial decay length (only for limiter geometry) |
|
| real(kind=GP), | intent(in), | optional | :: | dirindfun_parwidth_in |
Parallel decay length of direction indicator function |
|
| real(kind=GP), | intent(in), | optional | :: | dphi_max_in |
Parallel decay length of direction indicator function |
|
| real(kind=GP), | intent(in), | optional | :: | charfun_at_target_in |
Contourvalue of characteristic function at location of target plate |
|
| real(kind=GP), | intent(in), | optional | :: | max_step_size_in |
Maximum step size for the tracing |
|
| real(kind=GP), | intent(in), | optional | :: | rho_min_in |
For the build VIA_STABLE_TRACE: grid points that have smaller rho values than this, all penalization functions are automatically zero |
Builds penalisation functions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Comunication handler |
||
| class(equilibrium_t) | :: | equi |
Equilibrium (not changed) |
|||
| type(mesh_cart_t), | intent(inout) | :: | mesh |
Mesh |
||
| type(multigrid_t), | intent(inout) | :: | multigrid |
Multigrid |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Builds penalisation functions based on field line tracing with smooth transition
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Comunication handler |
||
| class(equilibrium_t) | :: | equi |
Equilibrium (not changed) |
|||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Builds penalisation functions based on sub-field line tracing subsequently from plane to plane with smooth transition
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Comunication handler |
||
| class(equilibrium_t) | :: | equi |
Equilibrium (not changed) |
|||
| type(mesh_cart_t), | intent(inout) | :: | mesh |
Mesh |
||
| type(multigrid_t), | intent(inout) | :: | multigrid |
Multigrid |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Builds penalisation functions based on equilibrium's in_vessel function (hard transition)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Comunication handler |
||
| class(equilibrium_t) | :: | equi |
Equilibrium (not changed) |
|||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Builds penalisation functions based on field line tracing that can handle every target shape, with smooth transition
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Comunication handler |
||
| class(equilibrium_t) | :: | equi |
Equilibrium (not changed) |
|||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Builds penalisation functions based on equilibrium's rho flux surface label
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Comunication handler |
||
| character(len=*), | intent(in) | :: | filepath |
Path to file where to read parameters specific for rho penalisation from |
||
| class(equilibrium_t) | :: | equi |
Equilibrium (not changed) |
|||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Build storage of indices in penalisation/bordering penalisation region Note that index is w.r.t full mesh, but points must be from inner mesh
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of class |
||
| type(mesh_cart_t) | :: | mesh |
Mesh |
|||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Displays information on penalisation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
Writes penalisation to netcdf file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | fgid |
netcdf file or group id |
Reads penalisation from netcdf file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | fgid |
netcdf file or group id |
Frees memory associated with penalisation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(penalisation_t), | intent(inout) | :: | self |
Instance of the type |
Builds penalisation functions for 3d equilibria based on parallel diffusion equation This is yet an experimental feature
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(inout) | :: | pen_cano |
Penalisation for canonical mesh |
||
| class(penalisation_t), | intent(inout) | :: | pen_stag |
Penalisation for staggered mesh |
||
| type(comm_handler_t), | intent(in) | :: | comm_handler |
Comunication handler |
||
| class(equilibrium_t) | :: | equi |
Equilibrium (not changed) |
|||
| class(equilibrium_storage_t), | intent(inout) | :: | equi_on_cano |
Equilibrim quantities on canonical mesh |
||
| class(equilibrium_storage_t), | intent(inout) | :: | equi_on_stag |
Equilibrim quantities on staggered mesh |
||
| type(mesh_cart_t), | intent(inout) | :: | mesh_cano |
Mesh (canonical) |
||
| type(mesh_cart_t), | intent(inout) | :: | mesh_stag |
Mesh (staggered) |
||
| type(multigrid_t), | intent(inout) | :: | multigrid_cano |
Multigrid (canonical) |
||
| type(multigrid_t), | intent(inout) | :: | multigrid_stag |
Multigrid (staggered) |
||
| type(parallel_map_t), | intent(in) | :: | map |
Map |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Datatype for penalisation
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=GP), | public, | allocatable, dimension(:) | :: | charfun |
Characteristic function of penalisation Formerly known as chi |
||
| real(kind=GP), | public, | allocatable, dimension(:) | :: | dirindfun |
Function indicating direction of magnetic field (towards/away from target) Formerly known as xi or zeta |
||
| integer, | public, | allocatable, dimension(:) | :: | p_inds |
Indices on full mesh which lie in penalisation region |
||
| integer, | public | :: | n_p_inds |
Size of p_inds |
|||
| integer, | public, | allocatable, dimension(:) | :: | pb_inds |
Indices on full mesh with charfun value 0 that have direct neighbors in the penalisation region |
||
| integer, | public | :: | n_pb_inds |
Size of pb_inds |
| final :: destructor |
| procedure , public :: set_parameters => set_parameters_penalisation Interface | |
| procedure , public :: build => build_penalisation Interface | |
| procedure , public :: build_wip3d => build_wip3d_penalisation Interface | |
| procedure , public :: write_netcdf => write_netcdf_penalisation Interface | |
| procedure , public :: read_netcdf => read_netcdf_penalisation Interface | |
| procedure , public :: display => display_penalisation Interface | |
| procedure , public :: get_dphi Function | |
| procedure , public :: get_dphi_max Function | |
| procedure , public :: get_penfuns_type Function | |
| procedure , public :: get_hermite_order Function | |
| procedure , public :: get_charfun_parwidth Function | |
| procedure , public :: get_charfun_radlimwidth Function | |
| procedure , public :: get_dirindfun_parwidth Function | |
| procedure , public :: get_charfun_at_target Function | |
| procedure , public :: get_charfun_val Function | |
| procedure , public :: get_dirindfun_val Function |
Returns type of penalisation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Returns order of Hermite polynomial used as penalisation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Returns parallel decay length of characteristic penalisation function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Radial radial decay length (only for limiter geometry)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Returns parallel decay length of direction indicator function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Toroidal grid distance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Maximum angle to be traced for building penalisation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Contourvalue of characteristic function at target plate
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
Returns value of characteristic function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ki |
Running index for inner grid |
Returns value of direction indicator function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(penalisation_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ki |
Running index for inner grid |