Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guesses for jxa and jxi to b2mn parsing #26

Open
eldond opened this issue Feb 15, 2024 · 0 comments
Open

Add guesses for jxa and jxi to b2mn parsing #26

eldond opened this issue Feb 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@eldond
Copy link
Collaborator

eldond commented Feb 15, 2024

Jeremy Lore wrote in #23:

Here is some logic for default values of jxa, jxi.

First you need to identify the topology. Use nncut and nnreg from b2fgmtry

if (Geo.nncut == 1) && (Geo.nnreg(1) == 4) % SN case
Geo.geometry = 'SN';
elseif (Geo.nncut == 2) && (Geo.nnreg(1) == 8) && (Geo.nnreg(2) == 13) % DDN case
Geo.geometry = 'DDN';
elseif (Geo.nncut == 2) && (Geo.nnreg(1) == 8) && (Geo.nnreg(2) == 12) % CDN case
Geo.geometry = 'CDN';
endif

Then you can guess jxa, jxi. These guesses can be pretty far off depending on the poloidal spacing, but these are the code defaults. Use leftcut and rightcut from b2fgmtry.

if strcmp(Geo.geometry,'SN')
Geo.jxa_guess = ceil(Geo.rightcut(1) - (Geo.rightcut(1) - Geo.leftcut(1))/4);
Geo.jxi_guess = floor(Geo.leftcut(1) + (Geo.rightcut(1) - Geo.leftcut(1))/4);
elseif strcmp(Geo.geometry,'DDN') || strcmp(Geo.geometry,'CDN')
Geo.jxa_guess = ceil((Geo.rightcut(1) + Geo.rightcut(2))/2);
Geo.jxi_guess = floor((Geo.leftcut(1) + Geo.leftcut(2))/2);
end
@eldond eldond added the enhancement New feature or request label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant