2023.10.6

This update corrects problems with sub-input files, variable node elements, leading comments, and it adds more tests.

A summary of the major changes follows. Please note that there will be some breaking changes to the API. I have done my best to document all such changes in these notes, so it is imperative that you read these before updating and trying to run an existing script. I will try to minimize API changes in the future, but the performance and robustness of inpRW will trump API stability concerns for the near future.

The major features of this update are the following:

  • Improved handling of all multi-input file jobs (for example, *INCLUDE, *MANIFEST, INPUT parameter of multiple keywords).
    • Added _subinps attribute to inpKeyword class; this is used only for *INCLUDE and *MANIFEST blocks and should contain only inpRW instances.

    • inpRW formerly created sub-instances of the inpRW class, but used the keywords attribute of the parent instance for the child.

    • When parsing sub-input files (*MANIFEST, *INCLUDE), a new inpRW instance is created for the sub-file, and that instance is placed in the parent block’s _subinps, and the sub-inpRW instance’s keywords attribute is added to the parent block’s suboptions attribute.

  • The _elementTypeDictionary is more useful and more accurate. Each entry is now a new elType class instead of a dictionary. * inpRW should now accurately understand all element types except for submodel or user elements. Variable node elements were a particular problem before.

  • Removed function inpKeyword.inpKeyword._getElementNodeNum() and replaced it with inpKeyword.findElementNodeNum().

  • Better handling of leading comments (i.e. comment lines before the first keyword block). Previous releases would have difficulties in some cases.

  • Corrected a bug related to parsing *REBAR LAYER keywords.

  • Additional tests added for inpRW functionality.

  • Addressed an error when the string ‘INF’ would be converted to a Decimal instance instead of treated as a string.

  • Added __repr__() and __str__() functions to the inpRW class so they produce useful information.

  • Renamed install.bat to install_to_3DEXPERIENCE.bat to clarify its purpose.

  • Corrected several bugs related to string productions, which affected the accuracy of input file writing.

  • Corrected a bug where elements from multiple *ELEMENT keyword blocks would override the elements attribute of shared node instances.

  • Removed python3_inpRW.bat and python3_inpRW.sh from the test suite. test_all.bat and test_all.sh instead set the INPRW_TEST environment variable which point to the desired Python interpreter, and the tests have been rewritten to use INPRW_TEST.

  • Expanded the documentation on Installation and Usage Instructions. The different options for installing inpRW should be more clear. There is also a new section called Using inpRW with Keyword Edit in 3DEXPERIENCE, which includes a video showing how to install inpRW to 3DEXPERIENCE and call inpRW from a Keyword Edit script.

Unless otherwise noted, if a term can refer to a module name or a class name, I am using it to refer to the class name. Thus, inpKeyword is short-hand for inpKeyword.inpKeyword in these update notes.

Performance Improvements:

N/A

Modified signatures:

Modified Modules:

This is a summary of all the modules which have seen some code change. The details are in later sections of this document.

Modified Classes:

This is a summary of all the classes which have seen some code change. The details are in later sections of this document.

Modified Functions:

Modified Attributes:

  • config._elementTypeDictionary

    The value for each element is now the new elType class instead of a csid. inpRW has been updated to account for this change, but any user scripts which directly accessed this dictionary will need to be updated to account for the new structure. This dictionary should include more information about each element type, (description, valid solver, and number of nodes), and it identifies variable node elements (they use numNodesSet instead of numNodesSet).

New Functions:

  • inpRW._inpR.Read._getLeadingCommentsPattern()

    Finds the location where the first keyword block begins and returns a regular expression pattern to identify that location.

  • inpRW.inpRW.__repr__()

    Produces a useful string representation of an inpRW instance.

  • inpRW.inpRW.__str__()

    Produces a string which helps identify the input file which corresponds to this inpRW.inpRW instance.

  • inpKeyword.findElementNodeNum()

    Replaces and simplifies inpKeyword.inpKeyword._getElementNodeNum(). With the exception of user elements, sub-structure elements, and variable number elements, all Abaqus elements have a static number of nodes which can define them. Thus, this function simply performs a dictionary lookup in most cases. For variable node elements, this function looks up the valid number of nodes to define the element. Then, it keeps reading data lines until it finds a line which does not end with a comma. If the number of nodes is in the set of valid node numbers for the element type, this function returns an integer. If the number of nodes is not in the set, an ElementIncorrectNodeNumError is raised. For undefined element type labels, this function will read datalines until it finds one which does not end with a comma. It will return the number of nodes it thinks the element has. For accurate results with user or sub-structure elements, the user should add an entry to inp._elementTypeDictionary before calling inp.parse.

New Attributes:

New Modules:

  • elType

    Provides the elType class.

  • paramTypes

    Internal only module, not yet shipped with inpRW. The handling of *PARAMETER definition and references needs to be improved, and this module is the foundation of that future work.

New Classes:

Removed:

  • inpKeyword.inpKeyword._getElementNodeNum()

    Replaced with inpKeyword.findElementNodeNum().

  • Removed python3_inpRW.bat and python3_inpRW.sh from the test suite.

Automated Tests:

Added automated tests to the following items:

Misc:

N/A