nos.physics package¶
Submodules¶
nos.physics.helmholtz_residual module¶
- class nos.physics.helmholtz_residual.HelmholtzDomainMSE¶
Bases:
Module
- forward(y: Tensor, v: Tensor, k: Tensor) Tensor ¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class nos.physics.helmholtz_residual.HelmholtzDomainResidual¶
Bases:
Module
- forward(y: Tensor, v: Tensor, k: Tensor) Tensor ¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
nos.physics.laplace module¶
- class nos.physics.laplace.Laplace(shapes: OperatorShapes | None = None, device: device | None = None)¶
Bases:
Operator
- forward(x: Tensor, u: Tensor, y: Tensor = None) Tensor ¶
Forward pass through the operator.
- Parameters:
x – Sensor positions of shape (batch_size, x_dim, num_sensors…).
u – Input function values of shape (batch_size, u_dim, num_sensors…).
y – Evaluation coordinates of shape (batch_size, y_dim, num_evaluations…).
- Returns:
Evaluations of the mapped function with shape (batch_size, v_dim, num_evaluations…).
nos.physics.weight_scheduler_lin module¶
- class nos.physics.weight_scheduler_lin.WeightSchedulerLinear(pde_loss_start: int, pde_loss_full: int)¶
Bases:
Module
- forward(epoch: float | tensor) tensor ¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
Module contents¶
- class nos.physics.HelmholtzDomainMSE¶
Bases:
Module
- forward(y: Tensor, v: Tensor, k: Tensor) Tensor ¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class nos.physics.HelmholtzDomainResidual¶
Bases:
Module
- forward(y: Tensor, v: Tensor, k: Tensor) Tensor ¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class nos.physics.Laplace(shapes: OperatorShapes | None = None, device: device | None = None)¶
Bases:
Operator
- forward(x: Tensor, u: Tensor, y: Tensor = None) Tensor ¶
Forward pass through the operator.
- Parameters:
x – Sensor positions of shape (batch_size, x_dim, num_sensors…).
u – Input function values of shape (batch_size, u_dim, num_sensors…).
y – Evaluation coordinates of shape (batch_size, y_dim, num_evaluations…).
- Returns:
Evaluations of the mapped function with shape (batch_size, v_dim, num_evaluations…).
- class nos.physics.WeightSchedulerLinear(pde_loss_start: int, pde_loss_full: int)¶
Bases:
Module
- forward(epoch: float | tensor) tensor ¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.