4.1.1.1.1.1. pyfem.core.api module
High-level API for programmatic control of a PyFEM analysis.
This module provides the PyFEMAPI class which encapsulates the complete calculation machinery (input reader, solver, output manager) and exposes a step-wise interface so callers can advance the analysis one step at a time or drive the entire run to completion.
- Usage:
api = PyFEMAPI(‘mycase.pro’) while api.is_active:
api.step()
results = api.get_results()
- class PyFEMAPI(props: str | Path | Tuple[Any, Any])[source]
Bases:
objectProgrammatic API to run PyFEM analyses step-by-step.
- The class can be constructed with either:
a path to a .pro file (string or Path), OR
a pre-built (props, globdat) tuple returned by InputRead.
- run_all()
run until globdat.active becomes False
- is_active()
boolean property exposing globdat.active
- get_results()
return a light-weight results dict (placeholder)
- property isActive: bool
- step(nCyc: int = 1) None[source]
Perform a single solver step (by default) followed by output processing .