Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dsl: Add ArgProvider inheritance to AbstractSymbol #2482

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devito/types/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def __new__(cls, *args, **kwargs):
__hash__ = Cached.__hash__


class DataSymbol(AbstractSymbol, Uncached):
class DataSymbol(AbstractSymbol, Uncached, ArgProvider):

"""
A unique scalar symbol that carries data.
Expand Down
3 changes: 1 addition & 2 deletions devito/types/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

from devito.exceptions import InvalidArgument
from devito.logger import warning
from devito.types.args import ArgProvider
from devito.types.basic import DataSymbol

__all__ = ['Constant']


class Constant(DataSymbol, ArgProvider):
class Constant(DataSymbol):

"""
Symbol representing a constant, scalar value in symbolic equations.
Expand Down
9 changes: 0 additions & 9 deletions devito/types/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,6 @@ def local(self):
def value(self):
return self._value

def _arg_check(self, *args, **kwargs):
pass

def _arg_values(self, grid=None, **kwargs):
# Allow override of thickness values to disable BCs
# However, arguments from the user are considered global
Expand All @@ -597,12 +594,6 @@ def _arg_values(self, grid=None, **kwargs):

return {self.name: tkn}

def _arg_finalize(self, *args, **kwargs):
return {}

def _arg_apply(self, *args, **kwargs):
pass


class AbstractSubDimension(DerivedDimension):

Expand Down
Loading