scimba_torch.physical_models.kinetic_pde.vlasov¶
Model for the Vlasov equation.
Functions
|
Returns a tensor of zeros with shape (x.shape[0], 1). |
Classes
|
Base class for representing Vlasov PDEs. |
- scalar_zero(t, x, v, mu)[source]¶
Returns a tensor of zeros with shape (x.shape[0], 1).
- Parameters:
t (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorv (
LabelTensor) – Velocity coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
A tensor of zeros with shape (x.shape[0], 1)
- class Vlasov(space, initial_condition, electric_field, f=<function scalar_zero>, g=<function scalar_zero>, **kwargs)[source]¶
Bases:
KineticPDEBase class for representing Vlasov PDEs.
- Parameters:
space (
AbstractApproxSpace) – Approximation space used for the PDEinitial_condition (
Callable) – Initial condition functionelectric_field (
Callable) – Electric field functionf (
Callable) – Source term functiong (
Callable) – Boundary condition function**kwargs – Additional keyword arguments
- rhs(w, t, x, v, mu)[source]¶
Compute the right-hand side (RHS) of the PDE.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorv (
LabelTensor) – Velocity coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
RHS tensor
- dot_product_of_tuples(f, g)[source]¶
Performs a dot product between two tuples of tensors.
- Parameters:
f (
tuple[Tensor]) – First tuple of tensorsg (
tuple[Tensor]) – Second tuple of tensors
- Return type:
Tensor- Returns:
Dot product result
- dot_product_of_tensor_and_tuple(f, g)[source]¶
Performs a dot product between a tensor and a tuple of tensors.
(the tuple should have the same size as the tensor).
- Parameters:
f (
Tensor) – Tensorg (
tuple[Tensor]) – Tuple of tensors
- Return type:
Tensor- Returns:
Dot product result
- a(t, xv, mu)[source]¶
Full advection field: a = [v, E].
- Parameters:
t (
LabelTensor) – Temporal coordinate tensorxv (
LabelTensor) – Concatenated spatial and velocity coordinate tensorsmu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Advection field tensor
- space_operator(w, t, x, v, mu)[source]¶
Apply the PDE operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorv (
LabelTensor) – Velocity coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Operator tensor
- bc_rhs(w, t, x, v, n, mu)[source]¶
Compute the boundary condition RHS.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorv (
LabelTensor) – Velocity coordinate tensorn (
LabelTensor) – Normal vector tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Boundary condition RHS tensor
- bc_operator(w, t, x, v, n, mu)[source]¶
Apply the periodic boundary condition operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorv (
LabelTensor) – Velocity coordinate tensorn (
LabelTensor) – Normal vector tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Boundary condition operator tensor
- initial_condition(x, v, mu)[source]¶
Compute the initial condition.
- Parameters:
x (
LabelTensor) – Spatial coordinate tensorv (
LabelTensor) – Velocity coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Initial condition tensor