Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the components of the Ricci curvature for a metric
ResourceFunction["RicciCurvature"][m,{u,v}] computes the components of the Ricci curvature for a metric. |
The monkey saddle surface:
| In[1]:= |
| In[2]:= |
| Out[2]= |
Plot the surface:
| In[3]:= |
| Out[3]= | ![]() |
The covariant basis:
| In[4]:= |
| Out[4]= |
The metric tensor:
| In[5]:= |
| Out[5]= | ![]() |
The Ricci curvature:
| In[6]:= |
| Out[6]= |
Alternatively, Ricci curvature can be computed contracting an index of the Riemann tensor. Compute the same tensor as above:
| In[7]:= |
| Out[7]= |
| In[8]:= |
| Out[8]= |
The same result is found using the resource functions ArrayContract and RiemannTensor:
| In[9]:= |
| Out[9]= |
This work is licensed under a Creative Commons Attribution 4.0 International License