diff src/LazyTensors/lazy_tensor_operations.jl @ 1623:07e8080c9f1a

Merge feature/boundary_conditions
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Mon, 10 Jun 2024 22:39:22 -0700
parents df1856b0e2f0
children 164e26a6cf79 8b64df6cadba
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Sun Jun 09 23:27:11 2024 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Mon Jun 10 22:39:22 2024 -0700
@@ -121,6 +121,7 @@
 
 Base.:*(a::T, tm::LazyTensor{T}) where T = TensorComposition(ScalingTensor{T,range_dim(tm)}(a,range_size(tm)), tm)
 Base.:*(tm::LazyTensor{T}, a::T) where T = a*tm
+Base.:-(tm::LazyTensor) = (-one(eltype(tm)))*tm
 
 """
     InflatedTensor{T,R,D} <: LazyTensor{T,R,D}