ogstools.propertylib.vector module#
- ogstools.propertylib.vector.vector_norm(values)[source]#
- Returns:
The norm of the vector.
- Parameters:
values (PlainQuantity | ndarray) –
- Return type:
PlainQuantity | ndarray
- class ogstools.propertylib.vector.Vector[source]#
Bases:
Property
Represent a vector property.
Vector properties 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 property as a specific component of the vector property.
- Parameters:
index (int | Literal['x', 'y', 'z']) – The index of the component.
- Returns:
A scalar property as a vector component.
- Return type:
- __init__(data_name, data_unit='', output_unit='', output_name='', mask='', func=<function identity>, mesh_dependent=False, process_with_units=False, cmap='coolwarm', bilinear_cmap=False, categoric=False)#
- Parameters:
data_name (str) –
data_unit (str) –
output_unit (str) –
output_name (str) –
mask (str) –
func (Callable) –
mesh_dependent (bool) –
process_with_units (bool) –
cmap (Colormap | str) –
bilinear_cmap (bool) –
categoric (bool) –
- Return type:
None
- class ogstools.propertylib.vector.VectorList[source]#
Bases:
Property
Represent a list of vector properties.
- __getitem__(index)[source]#
- Returns:
A vector property as a component of the vectorlist property.
- Parameters:
index (int) –
- Return type:
- __init__(data_name, data_unit='', output_unit='', output_name='', mask='', func=<function identity>, mesh_dependent=False, process_with_units=False, cmap='coolwarm', bilinear_cmap=False, categoric=False)#
- Parameters:
data_name (str) –
data_unit (str) –
output_unit (str) –
output_name (str) –
mask (str) –
func (Callable) –
mesh_dependent (bool) –
process_with_units (bool) –
cmap (Colormap | str) –
bilinear_cmap (bool) –
categoric (bool) –
- Return type:
None