ogstools.variables.vector module#
- ogstools.variables.vector.vector_norm(values)[source]#
- Returns:
The norm of the vector.
- Return type:
PlainQuantity | ndarray
- class ogstools.variables.vector.Vector[source]#
Bases:
Variable
Represent a vector variable.
Vector variables should contain either 2 (2D) or 3 (3D) components. Vector components can be accesses with brackets e.g. displacement[0]
- __getitem__(index)[source]#
Get a scalar variable as a specific component of the vector variable.
- Parameters:
index (int | Literal['x', 'y', 'z']) – The index of the component.
- Returns:
A scalar variable as a vector component.
- Return type:
- __init__(data_name, data_unit='', output_unit='', output_name='', symbol='', mask='', func=<function identity>, mesh_dependent=False, process_with_units=False, cmap='coolwarm', bilinear_cmap=False, categoric=False, color=None, linestyle=None)#
- class ogstools.variables.vector.VectorList[source]#
Bases:
Variable
Represent a list of vector variables.
- __getitem__(index)[source]#
- Returns:
A vector variable as a component of the vectorlist variable.
- Return type:
- __init__(data_name, data_unit='', output_unit='', output_name='', symbol='', mask='', func=<function identity>, mesh_dependent=False, process_with_units=False, cmap='coolwarm', bilinear_cmap=False, categoric=False, color=None, linestyle=None)#