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.
 
 
 
 
 
 

79 lines
2.1 KiB

// NODE.H
#ifndef NODE_H
#define NODE_H
#define vertex_NODE 3
#define edge_NODE 2
#define surf_NODE 1
#define vol_NODE 0
#include "vtr.h"
#include "cvtr.h"
#include "material.h"
#include "../dgtd-performance.hpp"
typedef enum{
VOL_NODE = 0,
SURF_NODE,
EDGE_NODE,
VERTEX_NODE
} PointType;
class node{
friend class tetra;
friend class face;
friend class FemGrp;
friend class edge;
friend class portMesh;
private:
// cVtr e, h;
int n; //position in ndARRAY
int cnt;
int num2D;
int globalId; //position in ndARRAY
int pType; //pType_ in int form
int bType;
char Mark;
char SpatialNode;
fp_t singORDER; //order of the node
vtr coord; // cordinates of the node
Material* prop;
PointType pType_; //type of point (vol, surf. edge or vertex)
public:
// constructor
node(int = 0, int = 0, fp_t = 0.0, fp_t = 0.0, fp_t = 0.0, fp_t = 0.0);
// operators
int operator>(const node &) const;
int operator<(const node &) const;
// set functions
void set_n(int id ){n = id;}
void set_globalId(int gid){globalId = gid;}
void set_pType(int p_type){pType = p_type;}
void setPType(PointType pType){pType_ = pType;}
void set_singORDER(fp_t se){singORDER = se;}
void setbType(int b_type){bType = (b_type > bType) ? b_type : bType;}
void setcnt(int nn){cnt = nn;}
void setnum2D(int ID){num2D = ID;}
void setMark(){Mark = 1;}
void resetMark(){Mark = 0;}
void setSpatialNode(char );
void set_coord(fp_t x, fp_t y, fp_t z){coord.setvtr(x, y, z);}
// get functions
int getid(){return n;}
int getbType(){return bType;}
int getpType(){return pType;}
PointType getPType(){return pType_;}
int getcnt(){return cnt;}
vtr getCoord(){return coord;}
int getnum2D(){return num2D;}
char getMark(){return Mark;}
Material *getPropPtr(){return prop;}
char getSpatialNode(){return SpatialNode;}
fp_t getSingOrder(){return singORDER;}
// print functions
void print();
};
#endif