Natural Basis
-
class natural_basis
A class that provides the basis vectors (covariant and contravariant) for the natural frame of reference, with the associated tools to consider its evolution in a differential variety
//====================================== class natural_basis //====================================== { private: protected: public : std::vector<arma::vec> g_i; // Covariant Vectors std::vector<arma::vec> g0i; // Contravariant Vectors arma::mat g_ij; // Covariant components of the metric tensor arma::mat g0ij; // Contravariant components of the metric tensor natural_basis(); //default constructor natural_basis(const std::vector<arma::vec> &); //Constructor with parameters natural_basis(const natural_basis &); //Copy constructor virtual ~natural_basis(); virtual void update(const std::vector<arma::vec> &); //update with a new set of covariant vectors virtual void from_F(const arma::mat &F); //update using the transformation gradient virtual natural_basis& operator = (const natural_basis&); friend std::ostream& operator << (std::ostream&, const natural_basis&); };
The natural basis class provides the objects that allows to work within a material system coordinatea, i.e.
-
std::vector<arma::vec> g_i
The three covariant vectors \(\mathbf{g}_i\)
-
std::vector<arma::vec> g0i
The three contravariant vectors \(\mathbf{g}^i\)
-
arma::mat g_ij
The covariant components of the metric tensor \(\mathbf{g}_{ij}\)
-
arma::mat g0ij
The contravariant components of the metric tensor \(\mathbf{g}^{ij}\)
-
natural_basis()
Default constructor, The size of list (std::vector) vectors g_i
and g0i
are set to three and all basis vectors are initialized with zeros values. The matrices g_ij
and g_ij
are initialized with zeros.
-
natural_basis(const std::vector<arma::vec> &mg_i)
Constructor with parameters. The natural basis is initialized based on the covariant vectors input mg_i
.
-
natural_basis(const natural_basis &nb)
Copy constructor from another basis nb
-
~natural_basis(const natural_basis &nb)
destructor
-
update(const std::vector<arma::vec> &mg_i)
Update with a new set of covariant vectors
mg_i
-
from_F(const arma::mat &F)
Update using the transformation gradient \(\mathbf{F}\).