CardSet#

class ansys.dyna.core.lib.card_set.CardSet(set_type: type, length_func: Callable = None, active_func: Callable = None, option_specs: List[ansys.dyna.core.lib.option_card.OptionSpec] = None, **kwargs)#

Bases: ansys.dyna.core.lib.card_interface.CardInterface

Abstract base class for all the implementations of keyword cards.

Overview#

initialize

add_item

Add a card to the set. Return the index of the added card.

items

write

Renders the card in the dyna keyword format.

read

Reads the card data from an input text buffer.

option_specs

active

Return whether the card is active.

bounded

format

Get the card format type.

Import detail#

from ansys.dyna.core.lib.card_set import CardSet

Property detail#

property CardSet.option_specs#
property CardSet.active: bool#

Return whether the card is active.

property CardSet.bounded: bool#
property CardSet.format: ansys.dyna.core.lib.format_type.format_type#

Get the card format type.

Method detail#

CardSet.initialize()#
CardSet.add_item(**kwargs) int#

Add a card to the set. Return the index of the added card.

CardSet.items() List[ansys.dyna.core.lib.cards.Cards]#
CardSet.write(format: ansys.dyna.core.lib.format_type.format_type | None = None, buf: TextIO | None = None, comment: bool | None = True) str | None#

Renders the card in the dyna keyword format. :param buf: Buffer to write to. If None, the output is returned as a string :param format: format_type to use. Default to standard.

CardSet.read(buf: TextIO, parameter_set: ansys.dyna.core.lib.parameters.ParameterSet = None) bool#

Reads the card data from an input text buffer.