This repository serve as a backup for my Maxwell-TD code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
822 B

// tensor.H
#ifndef tensor_H
#define tensor_H
#include "vtr.h"
#include "../dgtd-performance.hpp"
class tensor {
private:
fp_t val[3][3];
public:
tensor(fp_t = 0.0, fp_t = 0.0, fp_t = 0.0,
fp_t = 0.0, fp_t = 0.0, fp_t = 0.0,
fp_t = 0.0, fp_t = 0.0, fp_t = 0.0);
void setEntry(int, int, fp_t );
void settensor(vtr, vtr, vtr);
// operators
tensor operator+(const tensor &) const;
tensor operator-(const tensor &) const;
tensor operator*(const fp_t &) const;
tensor operator*(const tensor &) const;
tensor operator/(const fp_t &) const;
tensor operator/(const tensor &) const;
vtr operator*(vtr &);
tensor& operator=(const tensor &);
tensor inverse() const;
tensor transpose() const;
// get functions
fp_t getEntry(int, int);
// print function
void print() const;
};
#endif