config

Module Contents

In addition, it sets several groupings of keyword names and other similar items that are constant and need to be referenced throughout inpRW. See How do I share global variables across modules? for more information.

config._slash

Stores slash or backslash depending on the OS; this will be inserted into all file paths and makes the script OS independent.

Type:

str

config._openEncoding

Indicates the encoding used to open and write text files. Can be changed if needed before the user calls parse().

Type:

str

config._supFilePath

Supplemental file path, specifies the location of the additional files inpRW needs to read from. Defaults to the directory of inpRW and should not be changed.

Type:

str

config._elementTypeDictionary

A case- and space-insensitive dictionary that contains information for each element type. The element type labels are the keys, and elType instances are the values.

Type:

csid

config._mergeDatalineKeywordsOP

Keywords whose data items can be consolidated by merging them into new datalines with up to X items per line.

Type:

dict

config._appendDatalineKeywordsOP

Keywords whose datalines can be consolidated by appending them one after another.

Type:

set

config._dofXtoYDatalineKeywordsOP

Keywords that can be consolidated as DoF X to DoF Y. Boundary is not included here as it requires special handling.

Type:

set

config._opKeywords

Keywords that can have the OP parameter.

Type:

set

config._subBlockKWs

Dictionary that uses a keyword name as the key, and a list of all keywords that are valid suboptions for that block as the value.

Type:

csid

config._allKwNames

Contains all keyword names. Currently not used.

Type:

set

config._EoFKWs

Keywords that read until the end of a file.

Type:

set

config._dataKWs

Keywords that can read their data from another file.

Type:

set

config._EndKWs

Keywords that have an associated *END KEYWORD.

Type:

set

config._generalSteps

Keywords that are general procedures.

Type:

set

config._perturbationSteps

Keywords that are linear perturbation procedures.

Type:

set

config._keywordsDelayPlacingData = {csiKeyString('element'): 2, csiKeyString('parameter'): 0}

Keywords in this list will not have their data parsed until loop X. This is for specific keywords that need to operate on other parsed data; for example, *ELEMENT needs nd to be fully populated, which requires waiting until all node blocks have been parsed. If a keyword is not in this dictionary, it will be parsed at 1.

Type:

csid

config._maxParsingLoops = 2

The maximum number of loops to parse keyword data. This should match the highest number in the _keywordsDelayPlacingData. The initial loop will use an integer value of 0.

Type:

int