-
Notifications
You must be signed in to change notification settings - Fork 98
/
GridapTypes.jl
54 lines (50 loc) · 1.08 KB
/
GridapTypes.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""
abstract type GridapType end
"""
abstract type GridapType end
function Base.show(io::IO,object::GridapType)
print(io,"$(nameof(typeof(object)))()")
end
#"""
#"""
#function operate(op,a)
# s = "Unary operation $op is not defined for objects of type $(typeof(a))\n"
# s *= "Possible fix, define:\n"
# s *= "Gridap.Helpers.operate(::$(typeof(op)),::$(typeof(a)))"
# @unreachable s
#end
#
#"""
#"""
#function operate(op,a,b)
# s = "Binary operation $op is not defined for objects of type $(typeof(a)) and $(typeof(b))\n"
# s *= "Possible fix, define:\n"
# s *= "Gridap.Helpers.operate(::$(typeof(op)),::$(typeof(a)),::$(typeof(b)))"
# @unreachable s
#end
#
#for op in (:+,:-,:tr, :transpose, :adjoint)
# @eval begin
# function ($op)(a::GridapType)
# operate($op,a)
# end
# end
#end
#
#for op in (:+,:-,:*,:cross,:dot,:/)
# @eval begin
#
# function ($op)(a::GridapType,b::GridapType)
# operate($op,a,b)
# end
#
# function ($op)(a::GridapType,b)
# operate($op,a,b)
# end
#
# function ($op)(a,b::GridapType)
# operate($op,a,b)
# end
#
# end
#end