Skip to content
Closed
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
38 changes: 11 additions & 27 deletions sympde/core/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,48 +274,32 @@ def __new__(cls, *args, **options):
else:
return r

class Inner_2d(InnerBasic):

@classmethod
def eval(cls, *_args):
"""."""

if not _args:
return

if not( len(_args) == 2):
if len(_args) != 2:
raise ValueError('Expecting two arguments')

u = _args[0]
v = _args[1]
u, v = _args

u = Matrix(u)
v = Matrix(v)

# TODO add conjugate
M = u.transpose()*v
M = u.transpose() * v
return M.trace()

# ...
class Inner_1d(InnerBasic):
pass

class Inner_3d(InnerBasic):

@classmethod
def eval(cls, *_args):
"""."""

if not _args:
return

if not( len(_args) == 2):
raise ValueError('Expecting two arguments')

u = _args[0]
v = _args[1]

u = Matrix(u)
v = Matrix(v)
# ...
class Inner_2d(InnerBasic):
pass

# TODO add conjugate
M = u.transpose()*v
return M.trace()
# ...
class Inner_3d(InnerBasic):
pass
2 changes: 1 addition & 1 deletion sympde/expr/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from sympde.core.basic import _coeffs_registery
from sympde.core.basic import CalculusFunction
from sympde.core.algebra import (Dot_1d,
from sympde.core.algebra import (Dot_1d, Inner_1d,
Dot_2d, Inner_2d, Cross_2d,
Dot_3d, Inner_3d, Cross_3d)
from sympde.core.utils import random_string
Expand Down