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

Handling parametrized input decks #641

Open
RaphaelHeiniger opened this issue Dec 18, 2024 · 0 comments
Open

Handling parametrized input decks #641

RaphaelHeiniger opened this issue Dec 18, 2024 · 0 comments
Labels
enhancement New features or code improvements

Comments

@RaphaelHeiniger
Copy link
Collaborator

📝 Description of the feature

One can define *PARAMTERS and reference to them in the input deck with &myparameter. In the example &vdct is a parameter. Currently each field of a keyword class expects a certain type. If this is type is not matched the keyword will be read as a string. People often parametrize input decks. We should find a way to handle it.

test_string = """*CONTACT_TIED_SHELL_EDGE_TO_SURFACE_BEAM_OFFSET_ID
99999999 Mycontact
99999999 99999998 4 0 0 0
&vdct
1. 1. -2. -2. 1. 1. 1. 1.
*CONTACT_TIED_SHELL_EDGE_TO_SURFACE_BEAM_OFFSET_ID
99999999 Mycontact
99999999 99999998 4 0 0 0

1. 1. -2. -2. 1. 1. 1. 1."""

testdeck = Deck()
testdeck.loads(test_string)
testdeck.keywords
testdeck.string_keywords <-- should be empty once it is handled correctly

💡 Steps for implementing the feature

No response

🔗 Useful links and references

No response

@RaphaelHeiniger RaphaelHeiniger added the enhancement New features or code improvements label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

No branches or pull requests

1 participant