GR Engine
A physics engine in curved space-time
 All Classes Files Functions Variables
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Metric Class Referenceabstract

Class representing a metric on a manifold. More...

#include <geometry.h>

Inheritance diagram for Metric:
KerrEFMetric KerrNearPoleMetric SchwEFMetric SchwNearPoleMetric

Public Member Functions

 Metric (int cS)
 Constructor. More...
 
virtual ~Metric ()
 Destructor.
 
double g (int i, int j, Point p)
 Component of the metric. More...
 
double invg (int i, int j, Point p)
 Component of the inverse metric. More...
 
double christoffel (int i, int j, int k, Point p)
 Component of the Christoffel symbol. More...
 
double g (vector4 u, vector4 v, Point p)
 Dot product. More...
 
vector4 christoffel (vector4 u, vector4 v, Point p)
 Christoffel symbol acting on two vectors. More...
 

Protected Member Functions

double dg (int i, int j, int k, Point p)
 Partial derivative of the metric. More...
 
virtual double _g (int i, int j, Point p)=0
 Component of the metric. More...
 
virtual double _invg (int i, int j, Point p)=0
 Component of the inverse metric. More...
 
virtual double _christoffel (int i, int j, int k, Point p)=0
 Component of the Christoffel symbol. More...
 

Protected Attributes

int coordSystem
 

Detailed Description

Class representing a metric on a manifold.

This class represents the metric tensor on a manifold, expressed in some coordinate system.

Constructor & Destructor Documentation

Metric::Metric ( int  cS)

Constructor.

Parameters
cSCoordinate system.

Member Function Documentation

virtual double Metric::_christoffel ( int  i,
int  j,
int  k,
Point  p 
)
protectedpure virtual

Component of the Christoffel symbol.

Function calculating a component of the Christoffel symbol.

Parameters
iFirst index of the component
jSecond index of the component
kThird index of the component
pThe point at which the component is evaluated
Returns
Gamma^i_jk(p)

Implemented in KerrNearPoleMetric, SchwNearPoleMetric, KerrEFMetric, and SchwEFMetric.

virtual double Metric::_g ( int  i,
int  j,
Point  p 
)
protectedpure virtual

Component of the metric.

Function calculating a component of the metric.

Parameters
iFirst index of the component
jSecond index of the component
pThe point at which the component is evaluated
Returns
g_ij(p)

Implemented in KerrNearPoleMetric, SchwNearPoleMetric, KerrEFMetric, and SchwEFMetric.

virtual double Metric::_invg ( int  i,
int  j,
Point  p 
)
protectedpure virtual

Component of the inverse metric.

Function calculating a component of the inverse metric.

Parameters
iFirst index of the component
jSecond index of the component
pThe point at which the component is evaluated
Returns
g^ij(p)

Implemented in KerrNearPoleMetric, SchwNearPoleMetric, KerrEFMetric, and SchwEFMetric.

double Metric::christoffel ( int  i,
int  j,
int  k,
Point  p 
)

Component of the Christoffel symbol.

Function returning a component of the Christoffel symbol Uses internal caching.

Parameters
iFirst index of the component
jSecond index of the component
kThird index of the component
pThe point at which the component is evaluated
Returns
Gamma^i_jk(p)
vector4 Metric::christoffel ( vector4  u,
vector4  v,
Point  p 
)

Christoffel symbol acting on two vectors.

Function returning result of contraction of the Christoffel symbol with two vectors.

Parameters
uFirst vector
vSecond vector
pThe point at which the dot product is evaluated
Returns
Gamma^i_jk(p) u^j v^k
double Metric::dg ( int  i,
int  j,
int  k,
Point  p 
)
protected

Partial derivative of the metric.

Returns partial derivative of a component of the metric with respect to some coordinate.

Parameters
iFirst index of the component
jSecond index of the component
kThe index of the coordinate, with respect to which the derivative is calculated
pThe point at which the derivative is evaluated
Returns
dg_ij/dx^k(p)
double Metric::g ( int  i,
int  j,
Point  p 
)

Component of the metric.

Function returning a component of the metric Uses internal caching.

Parameters
iFirst index of the component
jSecond index of the component
pThe point at which the component is evaluated
Returns
g_ij(p)
double Metric::g ( vector4  u,
vector4  v,
Point  p 
)

Dot product.

Function returning the dot product of two vectors.

Parameters
uFirst vector
vSecond vector
pThe point at which the dot product is evaluated
Returns
g_ij(p) u^i v^j
double Metric::invg ( int  i,
int  j,
Point  p 
)

Component of the inverse metric.

Function returning a component of the inverse metric Uses internal caching.

Parameters
iFirst index of the component
jSecond index of the component
pThe point at which the component is evaluated
Returns
g^ij(p)

The documentation for this class was generated from the following files: