solve

Function solve 

Source
pub fn solve(pde: &Pde) -> PDEResult
Expand description

Solves a PDE using automatic solver selection.

Classifies the PDE and dispatches to the appropriate solver based on PDE type (parabolic, hyperbolic, elliptic) using the registry system.

§Arguments

  • pde - The partial differential equation to solve

§Returns

Returns the PDE solution wrapped in PDESolution type, or an error if solving fails.

§Examples

use mathhook_core::calculus::pde;
use mathhook_core::{symbol, expr};

let u = symbol!(u);
let x = symbol!(x);
let t = symbol!(t);
let equation = expr!(u);
let pde = pde::Pde::new(equation, u, vec![x, t]);

let solution = pde::solve(&pde).unwrap();

§Errors

Returns PDEError if:

  • PDE classification fails
  • No solver available for the PDE type
  • Solver execution fails