-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Milestone
Description
The zero element is always a special element. Therefore it should be treated as such. It should shorten computations and certainly be immutable. This ticket is devoted to that topic. (Similarly for the one element in the scalar field and mixed form algebra).
This ticket is part of the metaticket #28519.
Features
- an assertion error arises when altering the fixed elements zero or one
- a new attribute
_is_zero
is added to tensor fields and mixed form (similar to scalar fields) - computations with involved zero or one are shortened by using a simple check
- due to immutability of algebra elements, no copies are returned anymore for scalar field operations with zero or one
_is_zero
attribute is applied for copies
CC: @tscrim @egourgoulhon
Component: geometry
Keywords: tensor fields, scalar fields, mixed forms
Author: Michael Jung
Branch/Commit: f2928f8
Reviewer: Eric Gourgoulhon, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/28562