Source code for reslumen.core.solver

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Benjamin Vial
# License: MIT
from __future__ import annotations

from abc import ABC, abstractmethod


[docs] class Solver(ABC): """Abstract base class for all solvers.""" @abstractmethod
[docs] def solve(self) -> None: """Run the numerical solver.""" raise NotImplementedError
[docs] class NonlinearSolver(Solver): """Nonlinear solvers.""" @abstractmethod
[docs] def solve(self) -> None: """Run the numerical solver.""" raise NotImplementedError