wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
Loading...
Searching...
No Matches
wuzp::Metric< CoordinateSystemT_ > Struct Template Reference

The metric of a coordinate system, Euclidean or Minkowski, its second template parameter, which is Euclidean by default. More...

Detailed Description

template<typename CoordinateSystemT_>
struct wuzp::Metric< CoordinateSystemT_ >

The metric of a coordinate system, Euclidean or Minkowski, its second template parameter, which is Euclidean by default.

A dot product needs a metric, g_ij v^i w^j (Carroll, Lecture Notes on General Relativity, https://arxiv.org/abs/gr-qc/9712019, eq. 1.55): the Euclidean formula sum_i v_i w_i is only right in orthonormal bases of a Euclidean space, while the pairing w_i v^i of a covector and a vector needs none (eq. 1.35). So dotProduct, norm, squaredNorm, crossProduct and the transpose of a vector or a covector, which lowers or raises its index, require the Euclidean metric, and getInvariant() the Minkowski metric. The metric is constant, the identity for orthonormal axes or eta for an inertial frame. Other metrics are not modeled: those of axes that are not orthonormal, e.g. To of a passive linear transformation that is not orthogonal from a Euclidean coordinate system, and those of curvilinear coordinates, which depend on the position, e.g. of polar coordinates. Such coordinate systems are Euclidean by default, so their dot product is wrong (see "Metric" in DESIGN.md).

Definition at line 56 of file CoordinateSystem.hpp.


The documentation for this struct was generated from the following file: