Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
tensor[contract] - contract a tensor over one or more pairs of indices
Calling Sequence
contract(A, [i1,i2], ...)
Parameters
A
-
tensor_type object of rank > 1
[i1, i2]
pair of indices of opposite index character to be contracted over given as a list. There must be at least one pair in the call, and the total number of pairs cannot exceed rank(A)/2.
Description
The function contract(A, [i1,i2], [i3,i4], ...) computes the contraction of the tensor A over the pairs of indices i1 and i2, i3 and i4, etc.
There must not be any duplicates in the given indices (it is impossible to contract over a single index more than once) and the indices of each pair must be of opposite covariant-contravariant character.
The return value is the resultant tensor_type object of rank equal to rank(A) - 2 * (# of pairs in the call).
Simplification: This routine uses the `tensor/prod/simp` routine for simplification purposes. The simplification routine is applied to each component of the result after it is computed. By default, `tensor/prod/simp` is initialized to the `tensor/simp` routine. It is recommended that the `tensor/prod/simp` routine be customized to suit the needs of the particular problem.
This function is part of the tensor package, and so can be used in the form contract(..) only after performing the command with(tensor), or with(tensor,contract). This function can always be accessed in the long form tensor[contract](..).
Examples
Create a rank-2 tensor and contract it to form a scalar (the trace)
See Also
tensor, tensor/permute_indices, tensor[prod], tensor[simp]
Download Help Document