Tensors module
Module holding the model’s tendencies tensor encoding each of their additive terms.
qgs tensor module
This module computes and holds the tensor representing the tendencies of the model’s equations.
- class qgs.tensors.qgtensor.QgsTensor(params=None, atmospheric_inner_products=None, oceanic_inner_products=None, ground_inner_products=None)[source]
Bases:
object
qgs tendencies tensor class.
- Parameters
params (None or QgParams, optional) – The models parameters to configure the tensor. None to initialize an empty tensor. Default to None.
atmospheric_inner_products (None or AtmosphericInnerProducts, optional) – The inner products of the atmospheric basis functions on which the model’s PDE atmospheric equations are projected. If None, disable the atmospheric tendencies. Default to None.
oceanic_inner_products (None or OceanicInnerProducts, optional) – The inner products of the oceanic basis functions on which the model’s PDE oceanic equations are projected. If None, disable the oceanic tendencies. Default to None.
ground_inner_products (None or GroundInnerProducts, optional) – The inner products of the ground basis functions on which the model’s PDE ground equations are projected. If None, disable the ground tendencies. Default to None.
- params
The models parameters used to configure the tensor. None for an empty tensor.
- atmospheric_inner_products
The inner products of the atmospheric basis functions on which the model’s PDE atmospheric equations are projected. If None, disable the atmospheric tendencies. Default to None.
- Type
- oceanic_inner_products
The inner products of the oceanic basis functions on which the model’s PDE oceanic equations are projected. If None, disable the oceanic tendencies. Default to None.
- Type
- ground_inner_products
The inner products of the ground basis functions on which the model’s PDE ground equations are projected. If None, disable the ground tendencies. Default to None.
- Type
- tensor
The tensor \(\mathcal{T}_{i,j,k}\) \(i\)-th components.
- Type
- jacobian_tensor
The jacobian tensor \(\mathcal{T}_{i,j,k} + \mathcal{T}_{i,k,j}\) \(i\)-th components.
- Type
- load_from_file(filename, **kwargs)[source]
Function to load previously a saved tensor object with the method
save_to_file()
.
- save_to_file(filename, **kwargs)[source]
Function to save the tensor object to a file with the
pickle
module.