SolveCompositeBackend#
- class ansys.fluent.mcp.solve.backends.composite.SolveCompositeBackend(*, label: str = 'Solve (PyFluent)')#
Bases:
ansys.fluent.mcp.common.backend.BackendComposite backend that delegates deterministic operations to PyFluent.
Execution & live context are always handled by an in-process
PyFluentBackend.
Overview#
Connect to the configured backend or service. |
|
Close resources for the SolveCompositeBackend object. |
|
Return whether connected. |
|
Best-effort synchronous cleanup for shutdown. |
|
Return backend status information. |
|
List named objects entries. |
|
Return the named object names. |
|
Find named object entries. |
|
Return the state. |
|
Return the active status. |
|
Return the allowed values. |
|
Return the targeted context. |
|
Return the help. |
|
Return the |
|
Describe the child field shape of a NamedObject collection. |
|
Return the keyword-argument signature of a command path. |
|
Enumerate solver field / variable names for reports & post. |
|
Return |
|
Return solver status information from the backend. |
|
Return mesh entity counts. |
|
Return mesh quality information from the backend. |
|
Run the backend mesh check operation. |
|
Execute Python code through the backend runtime. |
|
Validate code. |
|
Capture a screenshot from the backend runtime. |
|
Clear cached backend state. |
|
Clear cached live backend state. |
|
Clear mesh-probe caches on the composite and inner backend. |
Return the backend endpoint description. |
Import detail#
from ansys.fluent.mcp.solve.backends.composite import SolveCompositeBackend
Property detail#
Attribute detail#
- SolveCompositeBackend.kind = 'pyfluent'#
- SolveCompositeBackend.label = 'Solve (PyFluent)'#
Method detail#
- async SolveCompositeBackend.connect(*, ip: str | None = None, port: int | None = None, password: str | None = None, server_info_file: str | None = None, precision: str = 'double', processor_count: int = 1, ui_mode: str = 'gui', product_version: str | None = None, **_: Any) ansys.fluent.mcp.common.models.ConnectResult#
Connect to the configured backend or service.
- Parameters:
- ip
Optional[str] IP address of the Fluent server to connect to.
- port
Optional[int] Port number of the Fluent server to connect to.
- password
Optional[str] Password used when connecting to a Fluent server.
- server_info_file
Optional[str] Server-info file used to connect to an existing Fluent session.
- precision
str Solver precision requested for the Fluent session.
- processor_count
int Number of processors requested for the Fluent session.
- ui_mode
str Fluent UI mode requested for launch.
- product_version
Optional[str] Fluent product version requested for launch.
- _
Any Ignored compatibility options accepted by the backend interface.
- ip
- Returns:
ConnectResultConnectResult produced by the operation.
- async SolveCompositeBackend.disconnect() None#
Close resources for the SolveCompositeBackend object.
- Returns:
NoneThe function completes through its side effects.
- SolveCompositeBackend.is_connected() bool#
Return whether connected.
- Returns:
- bool
Boolean result of the operation.
- SolveCompositeBackend.close_sync() None#
Best-effort synchronous cleanup for shutdown.
- Returns:
NoneThe function completes through its side effects.
- SolveCompositeBackend.status(leaf: str) ansys.fluent.mcp.common.models.SessionStatus#
Return backend status information.
- Parameters:
- leaf
str Leaf MCP server instance under test.
- leaf
- Returns:
SessionStatusSessionStatus produced by the operation.
- async SolveCompositeBackend.get_named_object_names(collection_path: str) list[str]#
Return the named object names.
- async SolveCompositeBackend.find_named_object(name: str) list[dict[str, Any]]#
Find named object entries.
- async SolveCompositeBackend.get_state(paths: list[str] | None = None) dict[str, Any]#
Return the state.
- async SolveCompositeBackend.get_active_status(paths: list[str]) dict[str, bool]#
Return the active status.
- async SolveCompositeBackend.get_allowed_values(paths: list[str]) dict[str, list[Any]]#
Return the allowed values.
- async SolveCompositeBackend.get_targeted_context(*, paths_to_check: list[str], named_object_types: list[str] | None = None, instance_state_fetch: list[str] | None = None) dict[str, Any]#
Return the targeted context.
- Parameters:
- Returns:
- async SolveCompositeBackend.probe_path(paths: list[str]) dict[str, dict[str, Any]]#
Return the
{exists, is_active, is_user_creatable, kind}envelope.Delegates to PyFluent so the executor / validator can pre-flight a batch of mutating writes against the same live session that will run them. The base
BackendraisesBackendUnavailableError; without this delegation theprobe_path/describe_pathtools are dead.
- async SolveCompositeBackend.describe_named_object_template(path: str) dict[str, Any] | None#
Describe the child field shape of a NamedObject collection.
Delegates to PyFluent’s static-settings-class walk. The base
BackendreturnsNone(renderingtemplate: null); this delegation surfaces the real per-field template.
- async SolveCompositeBackend.get_command_arguments(path: str) dict[str, Any] | None#
Return the keyword-argument signature of a command path.
Delegates to PyFluent so
describe_pathcan fuse the create-command signature into its unified descriptor.
- async SolveCompositeBackend.list_fields(*, scope: str = 'any') dict[str, Any] | None#
Enumerate solver field / variable names for reports & post.
Delegates to PyFluent; the base
BackendreturnsNoneand would otherwise strand thelist_fieldstool and any report-def / graphics recipe that validates afieldargument against it.
- async SolveCompositeBackend.mesh_adjacency_probe(cellzones: list[str], *, bc_filter: tuple[str, Ellipsis] | None = None) dict[str, list[str]]#
Return
{cellzone -> [adjacent_face_zone_names]}from PyFluent.
- async SolveCompositeBackend.solver_status() dict[str, Any]#
Return solver status information from the backend.
- async SolveCompositeBackend.mesh_quality() dict[str, float | None]#
Return mesh quality information from the backend.
-
async SolveCompositeBackend.run_code(code: str, *, namespace: dict[str, Any] | None = None, filename: str = '
' ) ansys.fluent.mcp.common.models.RunCodeResult# Execute Python code through the backend runtime.
- async SolveCompositeBackend.validate_code(code: str) ansys.fluent.mcp.common.models.RunCodeResult#
Validate code.
- Parameters:
- code
str Python code or command text to execute or validate.
- code
- Returns:
RunCodeResultRunCodeResult produced by the operation.
- async SolveCompositeBackend.screenshot(*, view: str | None = None) dict[str, Any]#
Capture a screenshot from the backend runtime.
- SolveCompositeBackend.invalidate_cache() None#
Clear cached backend state.
- Returns:
NoneThe function completes through its side effects.