Opened 3 years ago

Last modified 3 years ago

#28554 closed enhancement

Scalar Field Restrictions — at Initial Version

Reported by: gh-DeRhamSource Owned by:
Priority: major Milestone: sage-9.0
Component: geometry Keywords: manifolds, scalar fields
Cc: tscrim, egourgoulhon Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

How is a scalar field implemented which is split into different expressions in one particular chart?

Take for instance a scalar field f on the real line with standard "top" chart x, defined via f(x)=0 for x<-1, f(x)=x+1 for -1<=x<0, f(x)=1-x for 0<=x<1 and f(x)=0 for x>=1. Currently, this is solved by using

f = M.scalar_field( unit_step(x + 1)*unit_step(1 - x)*(1 - abs(x)) )

(see https://trac.sagemath.org/ticket/28519#comment:46).

This solution is quite unhandy and becomes even more so for more complicated scalar fields.

In this ticket, I try to solve this issue by adding a set_restriction method (similar to tensor fields) and modifying the display method.

Change History (0)

Note: See TracTickets for help on using tickets.