ansys.fluent.core.data_model_cache#

Module to manage datamodel cache.

Classes:

DataModelCache()

Class to manage datamodel cache.

NameKey(value[, names, module, qualname, ...])

Name key.

class ansys.fluent.core.data_model_cache.DataModelCache#

Bases: object

Class to manage datamodel cache.

Classes:

Empty()

Class representing unassigned cached state.

Methods:

__init__()

get_config(rules, name)

Get datamodel cache configuration value.

get_state(rules, obj[, name_key])

Retrieve state from datamodel cache.

is_unassigned(state)

Check whether a cached state is unassigned.

set_config(rules, name, value)

Set datamodel cache configuration value.

set_state(rules, obj, value)

Set datamodel cache state.

update_cache(rules, state, deleted_paths)

Update datamodel cache from streamed state.

Attributes:

class Empty#

Bases: object

Class representing unassigned cached state.

__init__()#
get_config(rules, name)#

Get datamodel cache configuration value.

Parameters:
rulesstr

datamodel rules

namestr

configuration name

Returns:
Any

configuration value

get_state(rules, obj, name_key=None)#

Retrieve state from datamodel cache.

Parameters:
rulesstr

datamodel rules

objobject

datamodel object, optional

name_keyNameKey, optional

if NameKey.INTERNAL, the returned state will contain internal names in keys. if NameKey.DISPLAY, the returned state will contain display names in keys. Default value is picked from configuration.

Returns:
stateAny

cached state

static is_unassigned(state)#

Check whether a cached state is unassigned.

Parameters:
stateAny

state

Returns:
bool

whether a cached state is unassigned

set_config(rules, name, value)#

Set datamodel cache configuration value.

Parameters:
rulesstr

datamodel rules

namestr

configuration name

valueAny

configuration value

set_state(rules, obj, value)#

Set datamodel cache state.

Parameters:
rulesstr

datamodel rules

objobject

datamodel object

valueAny

state

update_cache(rules, state, deleted_paths)#

Update datamodel cache from streamed state.

Parameters:
rulesstr

datamodel rules

stateVariant

streamed state

deleted_pathsList[str]

list of deleted paths

use_display_name = False#
class ansys.fluent.core.data_model_cache.NameKey(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

Name key.

Attributes:

DISPLAY = '_name_'#
INTERNAL = '__iname__'#