scimba_torch.physical_models.temporal_pde.transport_equation¶
1D transport equation in strong form.
Classes
|
Implementation of a 1D transport equation with Dirichlet boundary conditions. |
|
1D transport equation with Dirichlet boundary conditions for implicit PINNs. |
- class Transport1D(space, init, f, g, **kwargs)[source]¶
Bases:
FirstOrderTemporalPDEImplementation of a 1D transport equation with Dirichlet boundary conditions.
- Parameters:
space (
AbstractApproxSpace) – The approximation space for the probleminit (
Callable) – Initial condition functionf (
Callable) – Source term functiong (
Callable) – Dirichlet boundary condition function**kwargs – Additional keyword arguments
- space_operator(w, t, x, mu)[source]¶
Apply the spatial operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Spatial operator tensor
- time_operator(w, t, x, mu)[source]¶
Apply the temporal operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Temporal operator tensor
- bc_operator(w, t, x, n, mu)[source]¶
Apply the boundary condition operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorn (
LabelTensor) – Normal vector tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Boundary condition operator tensor
- rhs(w, t, x, mu)[source]¶
Compute the right-hand side (RHS) of the PDE.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
RHS tensor
- bc_rhs(w, t, x, n, mu)[source]¶
Compute the boundary condition RHS.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorn (
LabelTensor) – Normal vector tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Boundary condition RHS tensor
- initial_condition(x, mu)[source]¶
Compute the initial condition.
- Parameters:
x (
LabelTensor) – Spatial coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Initial condition tensor
- functional_operator(func, t, x, mu, theta)[source]¶
Compute the functional operator for the PDE.
- Parameters:
func (
VarArgCallable) – Function to differentiatet (
Tensor) – Temporal tensorx (
Tensor) – Spatial tensormu (
Tensor) – Parameter tensortheta (
Tensor) – Parameter tensor
- Return type:
Tensor- Returns:
Result of the functional operator
- functional_operator_bc(func, t, x, n, mu, theta)[source]¶
Compute the functional operator for the boundary condition.
- Parameters:
func (
VarArgCallable) – Function to differentiatet (
Tensor) – Temporal tensorx (
Tensor) – Spatial tensorn (
Tensor) – Normal vector tensormu (
Tensor) – Parameter tensortheta (
Tensor) – Parameter tensor
- Return type:
Tensor- Returns:
Result of the boundary functional operator
- functional_operator_ic(func, x, mu, theta)[source]¶
Compute the functional operator for the initial condition.
- Parameters:
func (
VarArgCallable) – Function to differentiatex (
Tensor) – Spatial tensormu (
Tensor) – Parameter tensortheta (
Tensor) – Parameter tensor
- Return type:
Tensor- Returns:
Result of the initial condition functional operator
- class Transport1DImplicit(space, init, f, g, **kwargs)[source]¶
Bases:
FirstOrderTemporalPDE1D transport equation with Dirichlet boundary conditions for implicit PINNs.
- Parameters:
space (
AbstractApproxSpace) – The approximation space for the probleminit (
Callable) – Initial condition functionf (
Callable) – Source term functiong (
Callable) – Dirichlet boundary condition function**kwargs – Additional keyword arguments
- space_operator(w, t, x, mu)[source]¶
Apply the spatial operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Spatial operator tensor
- bc_operator(w, t, x, n, mu)[source]¶
Apply the boundary condition operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensorn (
LabelTensor) – Normal vector tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Boundary condition operator tensor
- rhs(w, t, x, mu)[source]¶
Compute the right-hand side (RHS) of the PDE.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensorx (
LabelTensor) – Spatial coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
RHS tensor
- initial_condition(x, mu)[source]¶
Compute the initial condition.
- Parameters:
x (
LabelTensor) – Spatial coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Initial condition tensor
- bc_rhs(w, x, n, mu)[source]¶
Compute the boundary condition RHS.
- Parameters:
w (
MultiLabelTensor) – Solution tensorx (
LabelTensor) – Spatial coordinate tensorn (
LabelTensor) – Normal vector tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor- Returns:
Boundary condition RHS tensor
- functional_operator(func, x, mu, theta)[source]¶
Compute the functional operator for the PDE.
- Parameters:
func (
VarArgCallable) – Function to differentiatex (
Tensor) – Spatial tensormu (
Tensor) – Parameter tensortheta (
Tensor) – Parameter tensor
- Return type:
Tensor- Returns:
Result of the functional operator
- functional_operator_bc(func, t, x, n, mu, theta)[source]¶
Compute the functional operator for the boundary condition.
- Parameters:
func (
VarArgCallable) – Function to differentiatet (
LabelTensor) – Temporal tensorx (
Tensor) – Spatial tensorn (
Tensor) – Normal vector tensormu (
Tensor) – Parameter tensortheta (
Tensor) – Parameter tensor
- Return type:
Tensor- Returns:
Result of the boundary functional operator
- functional_operator_ic(func, x, mu, theta)[source]¶
Compute the functional operator for the initial condition.
- Parameters:
func (
VarArgCallable) – Function to differentiatex (
Tensor) – Spatial tensormu (
Tensor) – Parameter tensortheta (
Tensor) – Parameter tensor
- Return type:
Tensor- Returns:
Result of the initial condition functional operator