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

Create object-oriented version of source mesh generation #40

Merged
merged 13 commits into from
Mar 5, 2024

Conversation

gonuke
Copy link
Member

@gonuke gonuke commented Mar 2, 2024

closes #42

@gonuke gonuke changed the base branch from main to oo_version March 2, 2024 19:25
create_if_missing = True
)

return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this return is just hanging out, rest looks good as far as I can tell

@gonuke gonuke added this to the First OO version milestone Mar 4, 2024
@gonuke gonuke linked an issue Mar 4, 2024 that may be closed by this pull request
@gonuke gonuke self-assigned this Mar 4, 2024
num_phi_exp = 4
tor_ext = 90.0

source_mesh = SourceMesh(vmec, num_s_exp, num_theta_exp, num_phi_exp,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be something like src.sourcemesh.SourceMesh?

num_s_exp = 4
num_theta_exp = 8
num_phi_exp = 4
tor_ext = 90.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be tor_ext_exp?


def test_meshbasics():

vmec = read_vmec.read_vmec_data(vmec_file)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read_vmec.vmec_data

assert source_mesh.num_phi == num_phi_exp
assert source_mesh.tor_ext == np.deg2rad(tor_ext_exp)

def test_vertices():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same changes as in test_meshbasics got these tests working for me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was able to test this in my env, confirmed tests pass with just a couple syntactical changes

@Edgar-21 Edgar-21 merged commit b261386 into svalinn:oo_version Mar 5, 2024
This was referenced Mar 7, 2024
@gonuke gonuke linked an issue Apr 3, 2024 that may be closed by this pull request
connoramoreno pushed a commit that referenced this pull request Sep 10, 2024
Create object-oriented version of source mesh generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First pass to OO for source mesh Add a first unit test
2 participants