Definition of polygon running within mesh
Initialises polygon in mesh
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(inout) | :: | self |
Instance of type |
||
| class(equilibrium_t) | :: | equi |
Equilibrium |
|||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| integer, | intent(in), | dimension(:) | :: | inds |
Indices (on mesh) of polygon |
|
| logical, | intent(in), | optional | :: | dir_counterclockwise |
If true (=default) the direction of the polygons is set counter-clockwise otherwise it is clockwise |
|
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Returns adjacency for given point list Note: The polygon must be sufficiently uniquely defined, i.e. there must be not more than 2 candidates as adjacent points for any point
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of type |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| integer, | intent(out), | dimension(self%np) | :: | nadj |
Number of adjacent points for given point |
|
| integer, | intent(out), | dimension(self%np, 2) | :: | adjacency |
Adjacency information, i.e. indices (of polygon) of up to two adjacent points If value is zero, no adjacent point could be determined |
Determines segmentation of polygon, i.e. if polygon is closed, number of segments, end points of segments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(inout) | :: | self |
Instance of type |
||
| integer, | intent(in), | dimension(self%np) | :: | nadj |
Number of adjacent points for given point (from build_adjacency) |
|
| integer, | intent(out), | allocatable, dimension(:) | :: | kends |
Polygon indices of end points of polygon segments |
Builds ranking of polygon indices for sorting
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(inout) | :: | self |
Instance of type |
||
| integer, | intent(in), | dimension(self%np) | :: | nadj |
Number of adjacent points for given point (from build_adjacency) |
|
| integer, | intent(in), | dimension(self%np, 2) | :: | adjacency |
Adjacency information (from build_adjacency) |
|
| integer, | intent(in), | dimension(2*self%nsegs) | :: | kends |
Polygon indices of end points of polygon segments. On succesfull return, will be sorted according to segments. |
|
| integer, | intent(out), | dimension(self%np) | :: | rnk |
Ranking array, i.e. indices of polygon to sort |
|
| integer, | intent(out), | dimension(self%nsegs) | :: | np_segs |
Number of points of segment |
Executes sorting of indices based on given ranking
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(inout) | :: | self |
Instance of type |
||
| integer, | intent(in), | dimension(self%np) | :: | rnk |
Ranking array (from build_ranking) |
|
| integer, | intent(in), | dimension(self%nsegs) | :: | np_segs |
Number of points of segment (from build_ranking) |
Sorts polgon in co- or counter-clockwise order, depending on is_cc_wise For open segments, direction of each segment is defined w.r.t. magnetic axis
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(inout) | :: | self |
Instance of type |
||
| class(equilibrium_t) | :: | equi |
Equilibrium |
|||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
Writes polygon_in_mesh to netcdf file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | fgid |
Netcdf file or group id |
Reads polygon_in_mesh from netcdf file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(inout) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | fgid |
Netcdf file or group id |
Frees memory associated with polygon_in_mesh_t
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(polygon_in_mesh_t), | intent(inout) | :: | self |
Datatype for polygon running on mesh points This can either be a single closed polygon, or any positive number of open polygon segments (but not both simultaneously). The polgon must be sufficiently well defined, such that only up to two adjacent points can be uniquely determined for each point.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | allocatable, dimension(:) | :: | ki_seg |
Index of initial point of polygon segment |
| final :: destructor |
| procedure , public :: init => init_polygon_in_mesh Interface | |
| procedure , public :: is_periodic Function | |
| procedure , public :: get_np_total Function | |
| procedure , public :: get_nsegs Function | |
| procedure , public :: get_nps Function | |
| procedure , public :: get_ind_on_mesh Function | |
| procedure , public :: display => display_polygon_in_mesh Subroutine | |
| procedure , public :: write_netcdf => write_netcdf_polygon_in_mesh Interface | |
| procedure , public :: read_netcdf => read_netcdf_polygon_in_mesh Interface |
Returns tru if polygon is closed (periodic)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of the type |
Returns total number of polygon points
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of the type |
Returns number of segements
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of the type |
Returns number of points of segment
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in), | optional | :: | iseg |
Number of segment (default 1) |
Returns mesh index of point of segement
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ks |
Index on segment For closed polygon this is treated periodically For open segments zero is returned |
||
| integer, | intent(in), | optional | :: | iseg |
Number of segment (default 1) |
Displays information on polygon_in_mesh
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polygon_in_mesh_t), | intent(in) | :: | self |
Instance of the type |