diff src/LazyTensors/lazy_tensor_operations.jl @ 1106:b4ee47f2aafb feature/boundary_conditions

Start implementing functions for boundary conditions associated with Laplace
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 13 Jun 2022 13:46:24 +0200
parents 2e606d4c0ab1
children bdcdbd4ea9cd
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Sun May 08 11:35:22 2022 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Mon Jun 13 13:46:24 2022 +0200
@@ -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{T}) where T = (-one(T))*tm
 
 """
     InflatedTensor{T,R,D} <: LazyTensor{T,R,D}