Opened 2 years ago

Last modified 2 years ago

#28562 closed enhancement

Tensor Fields: Better Zero Treatment — at Version 2

Reported by: gh-DeRhamSource Owned by:
Priority: major Milestone: sage-9.0
Component: geometry Keywords: manifolds, tensor fields, scalar fields, mixed forms
Cc: tscrim, egourgoulhon Merged in:
Authors: Michael Jung Reviewers:
Report Upstream: N/A Work issues:
Branch: u/gh-DeRhamSource/better_zero_treatment (Commits, GitHub, GitLab) Commit: 9f91503dce5cbe14f52a6a77a34ae5a18f722f7d
Dependencies: Stopgaps:

Status badges

Description (last modified by gh-DeRhamSource)

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

Change History (2)

comment:1 Changed 2 years ago by gh-DeRhamSource

  • Branch set to u/gh-DeRhamSource/better_zero_treatment

comment:2 Changed 2 years ago by gh-DeRhamSource

  • Commit set to 9f91503dce5cbe14f52a6a77a34ae5a18f722f7d
  • Description modified (diff)

New commits:

9f91503'_is_zero' attribute added and modified
Note: See TracTickets for help on using tickets.