scimba_torch.physical_models.kinetic_pde.vlasov

Model for the Vlasov equation.

Functions

scalar_zero(t, x, v, mu)

Returns a tensor of zeros with shape (x.shape[0], 1).

Classes

Vlasov(space, initial_condition, electric_field)

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:
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: KineticPDE

Base class for representing Vlasov PDEs.

Parameters:
  • space (AbstractApproxSpace) – Approximation space used for the PDE

  • initial_condition (Callable) – Initial condition function

  • electric_field (Callable) – Electric field function

  • f (Callable) – Source term function

  • g (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:
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 tensors

  • g (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) – Tensor

  • g (tuple[Tensor]) – Tuple of tensors

Return type:

Tensor

Returns:

Dot product result

a(t, xv, mu)[source]

Full advection field: a = [v, E].

Parameters:
Return type:

Tensor

Returns:

Advection field tensor

space_operator(w, t, x, v, mu)[source]

Apply the PDE operator.

Parameters:
Return type:

Tensor

Returns:

Operator tensor

bc_rhs(w, t, x, v, n, mu)[source]

Compute the boundary condition RHS.

Parameters:
Return type:

Tensor

Returns:

Boundary condition RHS tensor

bc_operator(w, t, x, v, n, mu)[source]

Apply the periodic boundary condition operator.

Parameters:
Return type:

Tensor

Returns:

Boundary condition operator tensor

initial_condition(x, v, mu)[source]

Compute the initial condition.

Parameters:
Return type:

Tensor

Returns:

Initial condition tensor