neofoam.framework.context

Simulation context: shared field/model state passed through operations.

class neofoam.framework.context.Context(*, fields: dict[str, Any], models: dict[str, Any], mesh: Any = None, runtime: Any = None)[source]

Bases: BaseModel

The Context object holds the state of the framework at a given point in time. It contains fields and models that are used by various components of the framework.

The relevant fields or models are injected into the operations

model_config = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class neofoam.framework.context.FieldUpdates[source]

Bases: dict[str, Any]

A dictionary that collects the pending field updates for Context.fields.