This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -530,12 +530,13 @@ def wedge(self, other):
530530 dest_map_resu = dest_map .restrict (dom_resu ,
531531 subcodomain = ambient_dom_resu )
532532 ###
533- # Facilitate computations in case self or other is zero:
533+ # Facilitate computations involving zero:
534+ if resu_degree > ambient_dom_resu ._dim :
535+ return dom_resu .diff_form_module (resu_degree ,
536+ dest_map = dest_map_resu ).zero ()
534537 if self ._is_zero or other ._is_zero :
535538 return dom_resu .diff_form_module (resu_degree ,
536539 dest_map = dest_map_resu ).zero ()
537- ###
538- # In case self is other and tensor rank is odd:
539540 if self is other and (self ._tensor_rank % 2 ) == 1 :
540541 return dom_resu .diff_form_module (resu_degree ,
541542 dest_map = dest_map_resu ).zero ()
Original file line number Diff line number Diff line change @@ -614,10 +614,16 @@ def wedge(self, other):
614614 return self * other
615615 fmodule = self ._fmodule
616616 rank_r = self ._tensor_rank + other ._tensor_rank
617+ ###
618+ # Facilitate computations involving zero:
619+ if rank_r > fmodule ._rank :
620+ return fmodule .dual_exterior_power (rank_r ).zero ()
617621 if self ._is_zero or other ._is_zero :
618622 return fmodule .dual_exterior_power (rank_r ).zero ()
619623 if self is other and (self ._tensor_rank % 2 ) == 1 :
620624 return fmodule .dual_exterior_power (rank_r ).zero ()
625+ ###
626+ # Generic case:
621627 basis = self .common_basis (other )
622628 if basis is None :
623629 raise ValueError ("no common basis for the exterior product" )
You can’t perform that action at this time.
0 commit comments