ansys.dyna.core.lib.option_card#

Classes#

OptionSpec

OptionCardSet

Abstract base class for all the implementations of keyword cards.

OptionsInterface

Abstract base class for option card api interface.

OptionAPI

API for an individual option associated with a keyword.

Options

Option collection associated with an options API.

Module Contents#

class ansys.dyna.core.lib.option_card.OptionSpec(name: str, card_order: int, title_order: int)[source]#
property name: str[source]#
property card_order: int[source]#
property title_order: int[source]#
__repr__() str[source]#
class ansys.dyna.core.lib.option_card.OptionCardSet(option_spec: OptionSpec, cards: List[ansys.dyna.core.lib.card_interface.CardInterface], **kwargs)[source]#

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

Abstract base class for all the implementations of keyword cards.

property cards: List[ansys.dyna.core.lib.card_interface.CardInterface][source]#
property option_spec: OptionSpec[source]#
property name: str[source]#
property title_order: int[source]#
property card_order: int[source]#
property active: bool[source]#

Return whether the card is active.

property format: ansys.dyna.core.lib.format_type.format_type[source]#

Get the card format type.

__hash__()[source]#
__lt__(other: OptionCardSet)[source]#
read(buf: TextIO, parameter_set: ansys.dyna.core.lib.parameters.ParameterSet = None) bool[source]#

Read from buf.

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

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.

class ansys.dyna.core.lib.option_card.OptionsInterface[source]#

Abstract base class for option card api interface.

abstractmethod get_option_spec(name: str) OptionSpec[source]#
abstractmethod deactivate_option(name: str) None[source]#
abstractmethod activate_option(name: str) None[source]#
abstractmethod is_option_active(name: str) bool[source]#
property option_specs: Iterable[OptionSpec][source]#
Abstractmethod:

Get the card format type.

class ansys.dyna.core.lib.option_card.OptionAPI(options_api: OptionsInterface, name: str)[source]#

API for an individual option associated with a keyword.

property active: bool[source]#
class ansys.dyna.core.lib.option_card.Options(api: OptionsInterface)[source]#

Option collection associated with an options API.

__getitem__(name: str) OptionAPI[source]#

Gets the option with the given name.

__repr__() str[source]#
property api: OptionsInterface[source]#