https://github.com/lsw9021/DexterousManipulation
Raw File
Tip revision: 11269e20e5283c3f31b6ce1ea9a4805c8bdeecac authored by Lee Seung Hwan on 07 October 2021, 05:40:43 UTC
Create LICENSE
Tip revision: 11269e2
Tensor3333.h
#ifndef __FEM_TENSOR_3333_H__
#define __FEM_TENSOR_3333_H__
#include <iostream>
#include <Eigen/Core>
#include <Eigen/Sparse>
#include <Eigen/Geometry>
namespace FEM
{
class Tensor3333
{
public:
	Tensor3333();
	Tensor3333(const Tensor3333& other);
	Tensor3333& operator=(const Tensor3333& other);

	Tensor3333 operator+() const;
	Tensor3333 operator-() const;
	Tensor3333 operator+(const Tensor3333& B) const;
	Tensor3333 operator-(const Tensor3333& B) const;
	Tensor3333 operator*(const Eigen::Matrix3d& m) const;
	Tensor3333 operator*(double a) const;

	Eigen::Matrix3d& operator()(int i, int j);

	void SetIdentity();
	void SetZero();
	Tensor3333 Transpose();

public:
	Eigen::Matrix3d A[3][3];
};

Tensor3333 operator*(double a,const Tensor3333& B);
Tensor3333 operator*(const Eigen::Matrix3d& m,const Tensor3333& B);
std::ostream& operator<<(std::ostream& os,const Tensor3333& B);
}
#endif
back to top