Skip to content

Handling parametrized input decksΒ #641

@RaphaelHeiniger

Description

@RaphaelHeiniger

πŸ“ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    KeywordsAnything related to keyword subpackageenhancementGeneral improvements to existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions