Base classes¶
BaseComponent¶
- class BaseComponent(data=None, field=None)[source]¶
Base class for reservoir model components.
- apply(func, attr, *args, inplace=False, **kwargs)[source]¶
Apply function to attributes.
- Parameters:
func (callable) – A function to apply. Must accept data as its first argument.
attr (str, array-like) – Attributes to get data from.
args (misc) – Any additional positional arguments to
func.kwargs (misc) – Any additional named arguments to
func.
- Returns:
output – Transformed component.
- Return type:
- property empty¶
True if component is empty else False.
SpatialComponent¶
- class SpatialComponent(data=None, field=None)[source]¶
Bases:
BaseComponentBase component for spatial-type attributes.
- pad_na(attr, fill_na=0.0, inplace=True)[source]¶
Add dummy cells into the state vector in the positions of non-active cells if necessary.
- Parameters:
- Returns:
output
- Return type:
component if inplace else padded attribute.
BaseTree¶
- class BaseTree(root=None, **kwargs)[source]¶
Bases:
BaseComponentBase tree component.
Contains nodes and groups in a single tree structure.
- Parameters:
node (TreeSegment, optional) – Root node for the tree.
- property names¶
List of node names excluding group nodes.
- property resolver¶
Tree resolver.
- property root¶
Tree root.