base_card Package
base_card
Module
digraph inheritance8d9d52593d {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.bdf.cards.base_card.BaseCard" [URL="#pyNastran.bdf.cards.base_card.BaseCard",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="Defines a series of base methods for every card class"];
"pyNastran.bdf.cards.base_card.Element" [URL="#pyNastran.bdf.cards.base_card.Element",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="defines the Element class"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.base_card.Element" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.base_card.Material" [URL="#pyNastran.bdf.cards.base_card.Material",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="Base Material Class"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.base_card.Material" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.base_card.Property" [URL="#pyNastran.bdf.cards.base_card.Property",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="Base Property Class"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.base_card.Property" [arrowsize=0.5,style="setlinewidth(0.5)"];
}
- defines:
BaseCard()
Element()
Property()
Material()
word, num = break_word_by_trailing_integer(pname_fid)
word, num = break_word_by_trailing_parentheses_integer_ab(pname_fid)
- class pyNastran.bdf.cards.base_card.BaseCard[source]
Bases:
object
Defines a series of base methods for every card class (e.g., GRID, CTRIA3) including:
deepcopy()
get_stats()
validate()
object_attributes(mode=’public’, keys_to_skip=None)
object_methods(self, mode=’public’, keys_to_skip=None)
comment
update_field(self, n, value)
- property comment: str
accesses the comment
- get_field(n: int) int | float | str | None [source]
Gets a field based on it’s field number
- Parameters:
- nint
the field number
- Returns:
- valueint/float/str/None
the value of the field
- object_attributes(mode: str = 'public', keys_to_skip: list[str] | None = None, filter_properties: bool = False) list[str] [source]
See also
pyNastran.utils.object_attributes(…)
- object_methods(mode: str = 'public', keys_to_skip: list[str] | None = None) list[str] [source]
See also
pyNastran.utils.object_methods(…)
- print_card(size: int = 8, is_double: bool = False) str [source]
prints the card in 8/16/16-double format
- repr_fields() list[int | float | str | None] [source]
Gets the fields in their simplified form
- Returns:
- fieldslist[varies]
the fields that define the card
- abstract property type: str
- update_field(n: int, value: int | float | str | None) None [source]
Updates a field based on it’s field number.
- Parameters:
- nint
the field number
- valueint/float/str/None
the value to update the field to
- .. note::
This is dynamic if the card length changes.
- update_field can be used as follows to change the z coordinate
- of a node::
>>> nid = 1 >>> node = model.nodes[nid] >>> node.update_field(3, 0.1)
- class pyNastran.bdf.cards.base_card.Element[source]
Bases:
BaseCard
defines the Element class
dummy init
- get_node_positions(nodes: Any = None) ndarray [source]
returns the positions of multiple node objects
- get_node_positions_no_xref(model: BDF, nodes: list[Any] = None) np.ndarray [source]
returns the positions of multiple node objects
- pid = 0
- class pyNastran.bdf.cards.base_card.Material[source]
Bases:
BaseCard
Base Material Class
dummy init
- property TRef: float
- class pyNastran.bdf.cards.base_card.Property[source]
Bases:
BaseCard
Base Property Class
dummy init
- pyNastran.bdf.cards.base_card.break_word_by_trailing_integer(pname_fid: str) tuple[str, str] [source]
Splits a word that has a value that is an integer
- Parameters:
- pname_fidstr
the DVPRELx term (e.g., A(11), NSM(5))
- Returns:
- wordstr
the value not in parentheses
- valueint
the value in parentheses
Examples
>>> break_word_by_trailing_integer('T11') ('T', '11') >>> break_word_by_trailing_integer('THETA11') ('THETA', '11')
- pyNastran.bdf.cards.base_card.break_word_by_trailing_parentheses_integer_ab(pname_fid: str) tuple[str, str] [source]
Splits a word that has a value that can be A/B as well as an integer
- Parameters:
- pname_fidstr
the DVPRELx term; A(11), NSM(5), NSM(B)
- Returns:
- wordstr
the value not in parentheses
- valueint/str
the value in parentheses
Examples
>>> break_word_by_trailing_parentheses_integer('A(11)') ('A', '11') >>> break_word_by_trailing_parentheses_integer('NSM(11)') ('NSM', '11') >>> break_word_by_trailing_parentheses_integer('NSM(B)') ('NSM', 'B')