pybdf
Module
digraph inheritance6f4e02cf23 {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.bdf.bdf_interface.pybdf.BDFInputPy" [URL="#pyNastran.bdf.bdf_interface.pybdf.BDFInputPy",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="BDF reader class that only handles lines and not building cards or parsing cards"];
}
- Main BDF class. Defines:
BDFInputPy
- BEGIN [BULK] = [
AFPM = afpmid ARBMODEL = arbmid AUXMODEL = auxmind MASSID = massid[LABEL = masslabel] MODULE= moduleid[APPEND][LABEL = modlabel] FLXBDY = flexbody SUPER = seid TRMC = trimid UDS
]
BEGIN BULK BEGIN AUXMODEL=22 BEGIN BULK TRMC=101 BEGIN TRMC=102
- class pyNastran.bdf.bdf_interface.pybdf.BDFInputPy(read_includes: bool, dumplines: bool, encoding: str, nastran_format: str = 'msc', consider_superelements: bool = True, log: Any = None, debug: bool = False)[source]
Bases:
object
BDF reader class that only handles lines and not building cards or parsing cards
BDF reader class that only handles lines and not building cards or parsing cards
- Parameters:
- read_includesbool
should include files be read
- dumplinesbool
Writes ‘pyNastran_dump.bdf’ up to some failed line index
- encodingstr
the character encoding (e.g., utf8, latin1, cp1252)
- nastran_formatstr; default=’msc’
‘zona’ has a special read method {msc, nx, zona}
- consider_superelementsbool; default=True
parse ‘begin super=2’
- loglogger(); default=None
a logger for printing INCLUDE files that are loadaed
- debugbool; default=False
used when testing; for the logger
- get_lines(bdf_filename: str | StringIO, punch: bool | None = False, make_ilines: bool = True) tuple[list[str], list[str], list[str], list[str], ndarray | None, dict[tuple[str, str], list[str]]] [source]
Opens the bdf and extracts the lines by group
- Parameters:
- bdf_filenamestr
the main bdf_filename
- punchbool / None; default=False
is this a punch file None : guess True : no executive/case control decks False : executive/case control decks exist
- make_ilinesbool; default=True
flag for bulk_data_ilines
- Returns:
- system_lineslist[str]
the system control lines (typically empty; used for alters)
- executive_control_lineslist[str]
the executive control lines (stores SOL 101)
- case_control_lineslist[str]
the case control lines (stores subcases)
- bulk_data_lineslist[str]
the bulk data lines (stores geometry, boundary conditions, loads, etc.)
- bulk_data_ilinesNone / (nlines, 2) int ndarray
- if make_ilines = True:
the [ifile, iline] pair for each line in the file
- if make_ilines = False:
ilines = None
- superelement_linesdict[int, list[str]]
the superelement data lines (stores geometry, boundary conditions, loads, etc.)
- superelement_ilinesdict[int, np.ndarray]
data: None / (nlines, 2) int ndarray ??? if make_ilines = True:
the [ifile, iline] pair for each line in the file
- if make_ilines = False:
ilines = None
- get_main_lines(bdf_filename: str | StringIO) list[str] [source]
Opens the bdf and extracts the lines
- Parameters:
- bdf_filenamestr / StringIO
the main bdf_filename
- Returns:
- lineslist[str]
all the lines packed into a single line stream
- lines_to_deck_lines(lines: list[str], make_ilines: bool = True) tuple[list[str], int] [source]
Merges the includes into the main deck.
- Parameters:
- lineslist[str]
the lines from the main BDF
- make_ilinesbool; default=True
flag for ilines
- Returns:
- active_lineslist[str]
all the active lines in the deck
- ilines(nlines, 2) int ndarray
- if make_ilines = True:
the [ifile, iline] pair for each line in the file
- if make_ilines = False:
ilines = None
- pyNastran.bdf.bdf_interface.pybdf.add_superelements_from_deck_lines(self, BDF, additional_deck_lines: dict[tuple[str, str], list[str]]) dict [source]
- pyNastran.bdf.bdf_interface.pybdf.lines_to_decks2(lines: list[str], ilines: ndarray[Any, dtype[int64]], punch: bool | None, log: SimpleLogger, nastran_format: str = 'msc') tuple[list[str], list[str], list[str], list[str], dict[tuple[str, str], list[str]]] [source]
- Splits the BDF lines into:
system lines
executive control deck
case control deck
bulk data deck
- Parameters:
- lineslist[str]
all the active lines in the deck
- ilinesNone / (nlines, 2) int ndarray
None : the old behavior narray : the [iline, ifile] pair for each line in the file
- punchbool / None
None : guess True : starts from the bulk data deck False : read the entire deck
- keep_enddatabool; default=True
True : don’t throw away the enddata card False : throw away the enddata card
- Returns:
- system_lineslist[str]
the system control lines (typically empty; used for alters)
- executive_control_lineslist[str]
the executive control lines (stores SOL 101)
- case_control_lineslist[str]
the case control lines (stores subcases)
- bulk_data_lineslist[str]
the bulk data lines (stores geometry, boundary conditions, loads, etc.)
- bulk_data_ilinesNone / (nlines, 2) int ndarray
None : the old behavior narray : the [ifile, iline] pair for each line in the file
- superelement_lineslist[str]
???
- superelement_ilineslist[str]
???
- auxmodel_lineslist[str]
???
- pyNastran.bdf.bdf_interface.pybdf.parse_begin(line_upper: str) None [source]
BEGIN MODULE=2 LABEL=’MODULE2’
BEGIN AUXMODEL=2 BEGIN BULK AUXMODEL=2 BEGIN BULK AUXMODEL = 2
BEGIN AFPM=2 BEGIN BULK AFPM=2 BEGIN BULK AFPM = 2
BEGIN SUPER=2 BEGIN BULK SUPER=2 BEGIN BULK SUPER = 2 BEGIN BULK SUPER 2
BEGIN BULK TRMC=101 BEGIN TRMC=102
- pyNastran.bdf.bdf_interface.pybdf.split_quoted_string(line: str) list[str] [source]
this is “a test” [‘this’,’is’,’a test’]