Skip to content

Commit 508b5e9

Browse files
committed
Handle Diagonal objects with symbolic (as opposed to numeric) indices.
1 parent 9451c9b commit 508b5e9

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

cmake/version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set(CADABRA_VERSION_MAJOR 2)
22
set(CADABRA_VERSION_MINOR 3)
33
set(CADABRA_VERSION_PATCH 6)
4-
set(CADABRA_VERSION_TWEAK 4)
4+
set(CADABRA_VERSION_TWEAK 5)
55
set(COPYRIGHT_YEARS "2001-2021")
66
math(EXPR SYSTEM_BITS "${CMAKE_SIZEOF_VOID_P} * 8")
77
find_program(GIT git PATHS ${GIT_DIR})

core/Cleanup.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,12 @@ namespace cadabra {
798798
ret=true;
799799
zero(it->multiplier);
800800
}
801+
if(!(c1->is_rational() && c2->is_rational())) {
802+
if(subtree_compare(0, c1, c2)!=0) {
803+
ret=true;
804+
zero(it->multiplier);
805+
}
806+
}
801807

802808
return ret;
803809
}

tests/canonicalise.cdb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,3 +830,14 @@ def test55():
830830
print("Test 55 passed")
831831

832832
test55()
833+
834+
def test56():
835+
__cdbkernel__=create_scope()
836+
{t,r}::Coordinate;
837+
{a,b}::Indices(values={t,r},position=fixed);
838+
A_{a b}::Diagonal;
839+
ex:=A_{t r} + A_{r r} + A_{r t} + A_{t t};
840+
assert(str(ex)=='A_{r r} + A_{t t}')
841+
print("Test 56 passed")
842+
843+
test56()

web2/cadabra2/source/download.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ <h2>Binary packages</h2>
9090
<div class="distrotype">
9191
<img src="static/images/debian-logo.jpg"/>
9292
<div class="distronum"><a href="https://cadabra.science/packages/debian9/">Debian Stretch 9</a></div>
93-
<div class="distronum"><a href="https://cadabra.science/packages/debian10/">Debian Buster 10</a></div>
93+
<div class="distronum"><a href="https://cadabra.science/packages/debian10/">Debian
94+
Buster 10</a></div>
95+
<div class="distrotxt">
96+
Cadabra is now also available in Debian Unstable (`Sid') as <code>cadabra2</code>.
97+
</div>
9498
</div>
9599

96100
<div class="distrotype">

0 commit comments

Comments
 (0)