Skip to content

Solver Base Class

ForwardSolver

Abstract base class for forward solvers in tumor growth modeling.

A forward solver numerically integrates the evolution of the tumor density field over specified timepoints, starting from an initial condition.

Methods:

Name Description
solve

Computes the tumor density at each timepoint by solving the growth model. Must be implemented by subclasses.

Raises:

Type Description
NotImplementedError

If a subclass does not implement the solve method.

solve(timepoints, u_initial)

Abstract method to solve the tumor growth model.

Parameters:

Name Type Description Default
timepoints List[datetime]

List of timepoints at which the solution is desired.

required
u_initial Tensor

Initial tumor density field.

required

Returns:

Type Description
Tuple[List[datetime], List[Tensor]]

Tuple[List[datetime], List[torch.Tensor]]: - List of datetime objects corresponding to the solution timepoints. - List of torch.Tensor objects representing the tumor density at each timepoint.

Raises:

Type Description
NotImplementedError

If not implemented by a subclass.