method.py 660 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. from abc import ABC, abstractmethod
  2. class _Methods(ABC):
  3. """Abstract Base Class for all methods."""
  4. @abstractmethod
  5. def q(self):
  6. pass
  7. @abstractmethod
  8. def u(self):
  9. pass
  10. @abstractmethod
  11. def bodies(self):
  12. pass
  13. @abstractmethod
  14. def loads(self):
  15. pass
  16. @abstractmethod
  17. def mass_matrix(self):
  18. pass
  19. @abstractmethod
  20. def forcing(self):
  21. pass
  22. @abstractmethod
  23. def mass_matrix_full(self):
  24. pass
  25. @abstractmethod
  26. def forcing_full(self):
  27. pass
  28. def _form_eoms(self):
  29. raise NotImplementedError("Subclasses must implement this.")