PRAgMaTIc
master
|
symmetric metric tensor class. More...
#include <MetricTensor.h>
Public Member Functions | |
MetricTensor () | |
Default constructor. More... | |
~MetricTensor () | |
Default destructor. More... | |
MetricTensor (const treal_t *metric) | |
MetricTensor (const MetricTensor< treal_t, dim > &metric) | |
const MetricTensor & | operator= (const MetricTensor< treal_t, dim > &metric) |
void | get_metric (treal_t *metric) |
const treal_t * | get_metric () const |
Give const pointer to metric tensor. More... | |
void | set_metric (const treal_t *metric) |
void | constrain (const treal_t *M_in, bool perserved_small_edges=true) |
void | limit_aspect_ratio (treal_t max_ratio) |
void | scale (treal_t scale_factor) |
treal_t | average_length () const |
treal_t | max_length () const |
double | min_length () const |
void | eigen_decomp (treal_t *eigenvalues, treal_t *eigenvectors) const |
void | eigen_undecomp (const treal_t *D, const treal_t *V) |
Static Public Member Functions | |
static void | positive_definiteness (treal_t *metric) |
Friends | |
std::ostream & | operator<< (std::ostream &out, const MetricTensor< treal_t, dim > &metric) |
symmetric metric tensor class.
Use to store and operate on metric tensors. The upper triangle is stored, i.e.
For 2D: m[0] m[1] .... m[2]
For 3D: m[0] m[1] m[2] .... m[3] m[4] .... .... m[5]
Definition at line 48 of file MetricTensor.h.
|
inline |
Default constructor.
Definition at line 69 of file MetricTensor.h.
|
inline |
Default destructor.
Definition at line 72 of file MetricTensor.h.
|
inline |
Constructor. The upper triangle is expected, i.e.
For 2D: m[0] m[1] .... m[2]
For 3D: m[0] m[1] m[2] .... m[3] m[4] .... .... m[5]
metric | points to the upper triangle of the tensor. |
Definition at line 88 of file MetricTensor.h.
|
inline |
Copy constructor.
metric | is a reference to a MetricTensor object. |
Definition at line 95 of file MetricTensor.h.
|
inline |
Definition at line 370 of file MetricTensor.h.
|
inline |
By default this calculates the superposition of two metrics where by default small edge lengths are preserved. If the optional argument perserved_small_edges==false then large edge lengths are perserved instead.
M | is a reference to a MetricTensor object. |
perserved_small_edges | when true causes small edge lengths to be preserved (default). Otherwise long edge are perserved. |
Definition at line 186 of file MetricTensor.h.
|
inline |
Definition at line 424 of file MetricTensor.h.
|
inline |
Definition at line 455 of file MetricTensor.h.
|
inline |
Copy back the metric tensor field.
metric | is a pointer to the buffer where the metric field can be copied. |
Definition at line 111 of file MetricTensor.h.
|
inline |
Give const pointer to metric tensor.
Definition at line 117 of file MetricTensor.h.
|
inline |
Limits the ratio of the edge lengths.
max_ratio | The maximum allowed ratio between edge lengths in the orthogonal |
Definition at line 313 of file MetricTensor.h.
|
inline |
Definition at line 392 of file MetricTensor.h.
|
inline |
Definition at line 408 of file MetricTensor.h.
|
inline |
Assignment operator.
metric | is a reference to a MetricTensor object. |
Definition at line 102 of file MetricTensor.h.
|
inlinestatic |
Definition at line 143 of file MetricTensor.h.
|
inline |
Definition at line 365 of file MetricTensor.h.
|
inline |
Set the metric tensor field. The upper triangle is expected, i.e.
For 2D: m[0] m[1] .... m[2]
For 3D: m[0] m[1] m[2] .... m[3] m[4] .... .... m[5]
metric | is a pointer to the buffer where the metric field is to be copied from. |
Definition at line 135 of file MetricTensor.h.
|
friend |
Stream operator.
Definition at line 490 of file MetricTensor.h.