summaryrefslogtreecommitdiff
path: root/tensors.mac
diff options
context:
space:
mode:
authorThomas Guillermo Albers Raviola <thomas@thomaslabs.org>2026-07-20 14:18:41 +0200
committerThomas Guillermo Albers Raviola <thomas@thomaslabs.org>2026-07-20 14:18:41 +0200
commit3f31637dbc349493cd74a389d49413903f146bd1 (patch)
treec446593d832b81a4d5990f023324df9ff8afe232 /tensors.mac
parent34b945681740c320c3a011326d493d7bd09019f3 (diff)
Add wave operator
Diffstat (limited to 'tensors.mac')
-rw-r--r--tensors.mac5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensors.mac b/tensors.mac
index dea722a..6d7248a 100644
--- a/tensors.mac
+++ b/tensors.mac
@@ -19,3 +19,8 @@ contr(expr, var) ::= (
/* Differentiate with respect to nth coordinate */
cdiff(func, coord) := diff(func, ct_coords[coord])$
+
+/* Wave operator */
+box_op(func) := (
+ expand(contr(ug[μ,ν] * cdiff(cdiff(func, ν), μ), [μ,ν])
+ - contr(ug[μ,ν] * mcs[μ,ν,ρ] * cdiff(func, ρ), [μ,ν,ρ])))$