freegsnke.refine_passive module
Defines some of the functionality needed by the FreeGSNKE passive_structure object.
Copyright 2025 UKAEA, UKRI-STFC, and The Authors, as per the COPYRIGHT and README files.
This file is part of FreeGSNKE.
FreeGSNKE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
FreeGSNKE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
You should have received a copy of the GNU Lesser General Public License along with FreeGSNKE. If not, see <http://www.gnu.org/licenses/>.
- freegsnke.refine_passive.find_area(R, Z, n_refine)[source]
Finds area inside polygon and builds the path.
- Parameters:
R (array) – R coordinates of the vertices
Z (array) – Z coordinates of the vertices
n_refine (int) – Number of desired refining points
- freegsnke.refine_passive.generate_refinement_G(R, Z, n_refine)[source]
Generates a regular square grid refinement, so to include approximately n_refine points in the shape with vertices R,Z
- Parameters:
R (array) – R coordinates of the vertices
Z (array) – Z coordinates of the vertices
n_refine (int) – Number of desired refining points
- Returns:
refining points
- Return type:
array
- freegsnke.refine_passive.generate_refinement_LH(R, Z, n_refine)[source]
Uses a latine hypercube to fill the shape defined by the input vertices R, Z with exactly n_refine points.
- Parameters:
R (array) – R coordinates of the vertices
Z (array) – Z coordinates of the vertices
n_refine (int) – Number of refining points generated
- Returns:
refining points
- Return type:
array