Skip to content

Commit

Permalink
check system for dynamics and energy is added
Browse files Browse the repository at this point in the history
  • Loading branch information
kzqureshi committed Jan 23, 2024
1 parent 12cb9a6 commit 52ffe90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions micromagneticmodel/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def _schedule_commands(self, system, runner):
def _read_data(self, system):
"""Update system with simulation output (magnetisation and scalar data)."""

@abc.abstractmethod
def check_system(self, system):
"""Check if the dynamics of the system is defined."""

def drive(
self,
system,
Expand Down Expand Up @@ -123,7 +127,7 @@ def drive(
# This method is implemented in the derived driver class. It raises
# exception if any of the arguments are not valid.
self.drive_kwargs_setup(kwargs)

self.check_system(system)
workingdir = self._setup_working_directory(
system=system, dirname=dirname, mode="drive", append=append
)
Expand Down Expand Up @@ -233,7 +237,7 @@ def schedule(
# This method is implemented in the derived driver class. It raises
# exception if any of the arguments are not valid.
self.schedule_kwargs_setup(kwargs)

self.check_system(system)
workingdir = self._setup_working_directory(
system=system, dirname=dirname, mode="drive", append=append
)
Expand Down

0 comments on commit 52ffe90

Please sign in to comment.