Files
PINA/pina/condition/condition_interface.py
FilippoOlivo 30f865d912 Fix bugs in 0.2 (#344)
* Fix some bugs
2025-03-19 17:46:33 +01:00

22 lines
463 B
Python

from abc import ABCMeta, abstractmethod
class ConditionInterface(metaclass=ABCMeta):
def __init__(self) -> None:
self._problem = None
@abstractmethod
def residual(self, model):
"""
Compute the residual of the condition.
:param model: The model to evaluate the condition.
:return: The residual of the condition.
"""
pass
def set_problem(self, problem):
self._problem = problem